NO

Author Topic: FOR macro  (Read 590 times)

Offline Vortex

  • Member
  • *
  • Posts: 816
    • http://www.vortex.masmcode.com
FOR macro
« on: May 24, 2023, 08:17:44 PM »
Here is a simple FOR macro for Poasm to handle more effectively the loops :

Code: [Select]
ForCounter = 0

FOR_ MACRO var,init,_end

    mov     var,init

    ForCounter=ForCounter+1

@CatStr(<Cnd>,ForCounter)= _end

@CatStr(<ForLoop>,ForCounter) :

ENDM

NEXT MACRO var

    inc     var

    cmp     var,@CatStr(<Cnd>,ForCounter)

    jbe     @CatStr(<ForLoop>,ForCounter)

ENDM
Code it... That's all...