LOOP a keyword of ASM?

Everything else that doesn't fall into one of the other PB categories.
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

LOOP a keyword of ASM?

Post by va!n »

i am not sure but i think i have never heared before the Keyword LOOP for asm!? (only as label instead). When i try to write following line...

Code: Select all

LOOP = LOOP +1       ; LOOP will automatical highlighted
i get an ASM output error, because LOOP seems to be an ASM keyword? ^^
[/list]
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
Fred
Administrator
Administrator
Posts: 18352
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Sure, it's an x86 opcode ;)

Code: Select all

LOOP - Decrement CX and Loop if CX Not Zero
        Usage:  LOOP    label
        Modifies flags: None
        Decrements CX by 1 and transfers control to "label" if CX is not
        Zero.  The "label" operand must be within -128 or 127 bytes of the
        instruction following the loop instruction
                                 Clocks                 Size
        Operands         808x  286   386   486          Bytes

        label:  jump      18   8+m  11+m    6             2
                no jump    5    4     ?     2

        E2 cb LOOP rel8 Decrement count; jump short if count = 0
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

ahhhh, thanks fred :wink:
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
josku_x
Addict
Addict
Posts: 997
Joined: Sat Sep 24, 2005 2:08 pm

Post by josku_x »

I knew it before but could make never a working example of it. Fred or anyone: can you help me?
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Code: Select all

!xor ecx, ecx
!mov cx, 52
!lbl:
!pushad
  !mov edx, [esp+24]
  !mov [v_a], edx
  Debug a
!popad
!loop lbl
Post Reply