Author Topic: Loops macros revisited  (Read 818 times)

HSE

  • Member
  • *****
  • Posts: 2197
  • AMD 7-32 / i3 10-64
Loops macros revisited
« 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:).

Code: [Select]
    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
« Last Edit: September 08, 2022, 02:52:25 AM by HSE »
Equations in Assembly: SmplMath

kakakanga

  • Regular Member
  • *
  • Posts: 5
    • https://www.gameinw.com/เกมมือถือ/brand/sg
Re: Loops macros revisited
« Reply #1 on: September 07, 2022, 02:25:12 PM »
Ludu sekure kaj gajnu realan monon ĝuste ĉi tie! :thup:
https://www.gameinw.com/เกมมือถือ/brand/bng

zedd151

  • Member
  • *****
  • Posts: 1305
  • Minding my own business ; -)
Re: Loops macros revisited
« Reply #2 on: September 07, 2022, 11:10:34 PM »
Ludu sekure kaj gajnu realan monon ĝuste ĉi tie! :thup:
???
I'm sorry, I don't understand.
... :tongue:

TimoVJL

  • Member
  • *****
  • Posts: 1125
Re: Loops macros revisited
« Reply #3 on: September 08, 2022, 01:41:52 AM »
Ludu sekure kaj gajnu realan monon ĝuste ĉi tie! :thup:
???
I'm sorry, I don't understand.
gooogle tranlator gives
Quote
Play safe and win real money right here
SPAM as "https://starvegas-auto.com/สมัครอัตโนมัติ"
May the source be with you

HSE

  • Member
  • *****
  • Posts: 2197
  • AMD 7-32 / i3 10-64
Re: Loops macros revisited
« Reply #4 on: September 08, 2022, 03:00:11 AM »
Hi all!

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:
Code: [Select]
jgDone macro FirstHalf, SecondHalf
jg &FirstHalf&&SecondHalf&
endm

by
Code: [Select]
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

  • Member
  • ***
  • Posts: 423
Re: Loops macros revisited
« Reply #5 on: September 08, 2022, 03:33:46 AM »
Ludu sekure kaj gajnu realan monon ĝuste ĉi tie! :thup:
???
I'm sorry, I don't understand.
gooogle tranlator gives
Quote
Play 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

  • Member
  • ****
  • Posts: 984
  • ObjAsm Developer
    • ObjAsm
Re: Loops macros revisited
« Reply #6 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


HSE

  • Member
  • *****
  • Posts: 2197
  • AMD 7-32 / i3 10-64
Re: Loops macros revisited
« Reply #7 on: September 08, 2022, 04:05:06 AM »
Hi Biterider!

Nice addition :biggrin:

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

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

  • Member
  • *****
  • Posts: 1305
  • Minding my own business ; -)
Re: Loops macros revisited
« Reply #8 on: September 08, 2022, 04:32:23 AM »
Ludu sekure kaj gajnu realan monon ĝuste ĉi tie! :thup:
???
I'm sorry, I don't understand.
gooogle tranlator gives
Quote
Play 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.
... :tongue:

HSE

  • Member
  • *****
  • Posts: 2197
  • AMD 7-32 / i3 10-64
Re: Loops macros revisited
« Reply #9 on: September 08, 2022, 05:19:51 AM »
Hutch,

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

Biterider

  • Member
  • ****
  • Posts: 984
  • ObjAsm Developer
    • ObjAsm
Re: Loops macros revisited
« Reply #10 on: September 08, 2022, 05:20:59 AM »
For sure, there is no theoretical explanation of what is a loop  :biggrin:

 :biggrin: