EuroAssembler Index Manual Download Source Macros


Sitemap Links Forum Tests Projects

Test t2750: Pseudoinstruction %REPEAT %UNTIL


Tested procedures
PseudopcREPEAT   PseudopcENDREPEAT  
Source file t2750.asm
      EUROASM LIST=ON, DUMP=ON, DUMPWIDTH=16, LISTREPEAT=OFF
t2750 PROGRAM FORMAT=BIN,MODEL=TINY,WIDTH=16,LISTMAP=OFF,LISTGLOBALS=OFF,IMAGEBASE=0
[BIN] SEGMENT WIDTH=16,PURPOSE=CODE
%Var  %SETA 0x00          ; Initialization of control %variable.
      ; Classic %REPEAT/%ENDREPEAT loop.
      %REPEAT
        DB %Var
%Var    %SETA %Var + 0x11 ; Modification of control %variable.
      %ENDREPEAT %Var > 0x33
      ; Control %variable was abandoned at 0x44.
      %REPEAT
        DB %Var
%Var    %SETA %Var - 0x11 ; Modification of control %variable.
      %UNTIL %Var < 0x11  ; %UNTIL is an alias to %ENDREPEAT.
                          ; Control %variable was abandoned at 0x00.
      ENDPROGRAM t2750
Expected listing t2750.asm.lst
| | EUROASM LIST=ON, DUMP=ON, DUMPWIDTH=16, LISTREPEAT=OFF | |t2750 PROGRAM FORMAT=BIN,MODEL=TINY,WIDTH=16,LISTMAP=OFF,LISTGLOBALS=OFF,IMAGEBASE=0 |[BIN] |[BIN] SEGMENT WIDTH=16,PURPOSE=CODE |30 |%Var %SETA 0x00 ; Initialization of control %variable. |0000: | ; Classic %REPEAT/%ENDREPEAT loop. | | %REPEAT |0000:00 | DB %Var |3137 |%Var %SETA %Var + 0x11 ; Modification of control %variable. |TRUE | %ENDREPEAT %Var > 0x33 |0004: | ; Control %variable was abandoned at 0x44. | | %REPEAT |0004:44 | DB %Var |3531 |%Var %SETA %Var - 0x11 ; Modification of control %variable. |TRUE | %UNTIL %Var < 0x11 ; %UNTIL is an alias to %ENDREPEAT. |0008: | ; Control %variable was abandoned at 0x00. | | ENDPROGRAM t2750
Expected messages t2750.out
I0180 Assembling source file "t2750.asm". I0270 Assembling source "t2750". I0310 Assembling source pass 1. I0330 Assembling source pass 2 - final. I0470 Assembling program "t2750". "t2750.asm"{2} I0510 Assembling program pass 1. "t2750.asm"{2} I0530 Assembling program pass 2 - final. "t2750.asm"{2} I0660 16bit TINY BIN file "t2750.bin" created, size=8. "t2750.asm"{16} I0650 Program "t2750" assembled in 2 passes with errorlevel 0. "t2750.asm"{16} I0750 Source "t2750" (16 lines) assembled in 2 passes with errorlevel 0. I0860 Listing file "t2750.asm.lst" created, size=978. I0990 EuroAssembler terminated with errorlevel 0.
Expected output file t2750. bin
0000: 00 11 22 33 44 33 22 11                          °·"3D3"·

▲Back to the top▲