The MASM Forum

Miscellaneous => Miscellaneous Projects => Topic started by: HSE on December 21, 2021, 03:06:39 AM

Title: Loops macros revisited
Post by: HSE on December 21, 2021, 03:06:39 AM
Hi all!

These macros worked very well in 32 bits for some years. Later some support for 64 bits (with Biterider notation xax, etc). But still very limited.

I noted that can be very easy to improve that, then now it's possible to use differents bitness, variable sizes and auxiliar registers.

These tests are working with ML and ML64 (i think :biggrin:).

    ForLp v1, 0, 5                          ; 32 bits
        .if eax == 3
            CutFor v1
        .endif
        print str$(v1), 13, 10
    Next v1

    mov sizeofarray, 4
    ForLp_df v1, 0, sizeofarray, edx
        .if edx == 1
            CutFor v1
        .endif
        print str$(v1), 13, 10
    Next v1

    ForLpN v2, 5, 0, cx
        .if cx == 3
            CutForN v2
        .endif
        print sword$(v2), 13, 10
    NextN v2

    ForLpR v3, FP4(0.0), FP4(2.0), FP4(0.5)
        print real4$(v3), 13, 10
    NextR v3


Regards, HSE.

update:
    0 - original - tests_loops.zip (6.09 kB - downloaded 77 times.)
    1 - added ForLpD
Title: Re: Loops macros revisited
Post by: zedd151 on September 07, 2022, 11:10:34 PM
Quote from: kakakanga on September 07, 2022, 02:25:12 PM
Ludu sekure kaj gajnu realan monon ĝuste ĉi tie!  :thup:  (https://starvegas-auto.com/%E0%B8%AA%E0%B8%A1%E0%B8%B1%E0%B8%84%E0%B8%A3%E0%B8%AD%E0%B8%B1%E0%B8%95%E0%B9%82%E0%B8%99%E0%B8%A1%E0%B8%B1%E0%B8%95%E0%B8%B4)
???
I'm sorry, I don't understand.
Title: Re: Loops macros revisited
Post by: TimoVJL on September 08, 2022, 01:41:52 AM
Quote from: swordfish on September 07, 2022, 11:10:34 PM
Quote from: kakakanga on September 07, 2022, 02:25:12 PM
Ludu sekure kaj gajnu realan monon ĝuste ĉi tie!  :thup:  (https://starvegas-auto.com/%E0%B8%AA%E0%B8%A1%E0%B8%B1%E0%B8%84%E0%B8%A3%E0%B8%AD%E0%B8%B1%E0%B8%95%E0%B9%82%E0%B8%99%E0%B8%A1%E0%B8%B1%E0%B8%95%E0%B8%B4)
???
I'm sorry, I don't understand.
gooogle tranlator gives
QuotePlay safe and win real money right here
SPAM as "https://starvegas-auto.com/สมัครอัตโนมัติ"
Title: Re: Loops macros revisited
Post by: HSE on September 08, 2022, 03:00:11 AM
Hi all!

Quote from: swordfish on September 07, 2022, 11:10:34 PM
I'm sorry, I don't understand.

kakanga is a very smart bot, and he know I was ready to make an update  :biggrin: :biggrin: :biggrin:

Added ForLpD, wich is a macro to loop arrays from 0 to size-1.

Just replaced:jgDone macro FirstHalf, SecondHalf
jg &FirstHalf&&SecondHalf&
endm


by jeDone macro FirstHalf, SecondHalf
je &FirstHalf&&SecondHalf&
endm


The same than ForLp_df but optimized. 

Updated in first post.

Regards, HSE
Title: Re: Loops macros revisited
Post by: Greenhorn on September 08, 2022, 03:33:46 AM
Quote from: TimoVJL on September 08, 2022, 01:41:52 AM
Quote from: swordfish on September 07, 2022, 11:10:34 PM
Quote from: kakakanga on September 07, 2022, 02:25:12 PM
Ludu sekure kaj gajnu realan monon ĝuste ĉi tie!  :thup:  (https://starvegas-auto.com/%E0%B8%AA%E0%B8%A1%E0%B8%B1%E0%B8%84%E0%B8%A3%E0%B8%AD%E0%B8%B1%E0%B8%95%E0%B9%82%E0%B8%99%E0%B8%A1%E0%B8%B1%E0%B8%95%E0%B8%B4)
???
I'm sorry, I don't understand.
gooogle tranlator gives
QuotePlay safe and win real money right here
SPAM as "https://starvegas-auto.com/สมัครอัตโนมัติ"

In other words: https://youtu.be/k1z5PejkIyY?t=130
:biggrin:
Title: Re: Loops macros revisited
Post by: Biterider on September 08, 2022, 03:45:26 AM
Hi HSE
Nice addition :biggrin:
Maybe I'm not up to date, but does the Documentation.pdf file contain some information on how to use these macros?

Biterider

Title: Re: Loops macros revisited
Post by: HSE on September 08, 2022, 04:05:06 AM
Hi Biterider!

Quote from: Biterider on September 08, 2022, 03:45:26 AM
Nice addition :biggrin:

Just a couple of lines changed, but that take years (to lazzy :biggrin:)

Quote from: Biterider on September 08, 2022, 03:45:26 AM
does the Documentation.pdf file contain some information on how to use these macros?

There is a better presentation in documentation, but examples are almost the same.

For sure, there is no theoretical explanation of what is a loop  :biggrin:

Thanks, HSE.
Title: Re: Loops macros revisited
Post by: zedd151 on September 08, 2022, 04:32:23 AM
Quote from: Greenhorn on September 08, 2022, 03:33:46 AM
Quote from: TimoVJL on September 08, 2022, 01:41:52 AM
Quote from: swordfish on September 07, 2022, 11:10:34 PM
Quote from: kakakanga on September 07, 2022, 02:25:12 PM
Ludu sekure kaj gajnu realan monon ĝuste ĉi tie!  :thup:  (https://starvegas-auto.com/%E0%B8%AA%E0%B8%A1%E0%B8%B1%E0%B8%84%E0%B8%A3%E0%B8%AD%E0%B8%B1%E0%B8%95%E0%B9%82%E0%B8%99%E0%B8%A1%E0%B8%B1%E0%B8%95%E0%B8%B4)
???
I'm sorry, I don't understand.
gooogle tranlator gives
QuotePlay safe and win real money right here
SPAM as "https://starvegas-auto.com/ (https://starvegas-auto.com/)สมัครอัตโนมัติ"

In other words: https://youtu.be/k1z5PejkIyY?t=130 (https://youtu.be/k1z5PejkIyY?t=130)
:biggrin:


Looking at this users profile and previous posts. Hmmm. Clever bot.
I don't click on random YouTube links. Might be a rickroll.  :joking:
Sorry HSE didn't mean to hijack the thread, just responding.
Title: Re: Loops macros revisited
Post by: HSE on September 08, 2022, 05:19:51 AM
Hutch,

   can you eliminate bots talking between them?  :biggrin:
Title: Re: Loops macros revisited
Post by: Biterider on September 08, 2022, 05:20:59 AM
Quote from: HSE on September 08, 2022, 04:05:06 AM
For sure, there is no theoretical explanation of what is a loop  :biggrin:

:biggrin: