News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Loops macros revisited

Started by HSE, December 21, 2021, 03:06:39 AM

Previous topic - Next topic

HSE

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
Equations in Assembly: SmplMath

zedd151

Quote from: kakakanga on September 07, 2022, 02:25:12 PM
Ludu sekure kaj gajnu realan monon ĝuste ĉi tie! :thup:
???
I'm sorry, I don't understand.

TimoVJL

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:
???
I'm sorry, I don't understand.
gooogle tranlator gives
QuotePlay safe and win real money right here
SPAM as "https://starvegas-auto.com/สมัครอัตโนมัติ"
May the source be with you

HSE

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
Equations in Assembly: SmplMath

Greenhorn

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:
???
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:
Kole Feut un Nordenwind gift en krusen Büdel un en lütten Pint.

Biterider

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


HSE

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.
Equations in Assembly: SmplMath

zedd151

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:
???
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:


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.

HSE

Hutch,

   can you eliminate bots talking between them?  :biggrin:
Equations in Assembly: SmplMath

Biterider

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: