EuroAssembler Index Manual Download Source Macros


Sitemap Links Forum Tests Projects

Test t8341: Formal variables in %FOR block


Source file t8341.asm
      EUROASM DUMP=ON, DUMPALL=YES, DUMPWIDTH=32, \
              LIST=ON, LISTVAR=YES, LISTREPEAT=YES
t8341 PROGRAM FORMAT=BIN, LISTMAP=OFF, LISTGLOBALS=OFF
Mem1  D DWORD
Mem2  D WORD
Mem3  D BYTE
formalId %FOR 1..3
           MOV [Mem%formalId],%formalId
         %ENDFOR formalId
      ENDPROGRAM t8341
Expected listing t8341.asm.lst
| | EUROASM DUMP=ON, DUMPALL=YES, DUMPWIDTH=32, \ | | LIST=ON, LISTVAR=YES, LISTREPEAT=YES | |t8341 PROGRAM FORMAT=BIN, LISTMAP=OFF, LISTGLOBALS=OFF |[BIN] ::::Section changed. |0000:00000000 |Mem1 D DWORD |0004:0000 |Mem2 D WORD |0006:00 |Mem3 D BYTE |31 |formalId %FOR 1..3 |0007:66C706[0000]01000000 | MOV [Mem%formalId],%formalId | !MOV [Mem1],1 | + %ENDFOR formalId |32 +formalId %FOR 1..3 |0010:C706[0400]0200 + MOV [Mem%formalId],%formalId | !MOV [Mem2],2 | + %ENDFOR formalId |33 +formalId %FOR 1..3 |0016:C606[0600]03 + MOV [Mem%formalId],%formalId | !MOV [Mem3],3 | + %ENDFOR formalId | +formalId %FOR 1..3 | + MOV [Mem%formalId],%formalId | | %ENDFOR formalId | | ENDPROGRAM t8341
Expected messages t8341.out
I0180 Assembling source file "t8341.asm". I0270 Assembling source "t8341". I0310 Assembling source pass 1. I0330 Assembling source pass 2 - final. I0470 Assembling program "t8341". "t8341.asm"{3} I0510 Assembling program pass 1. "t8341.asm"{3} I0510 Assembling program pass 2. "t8341.asm"{3} I0530 Assembling program pass 3 - final. "t8341.asm"{3} I0660 16bit TINY BIN file "t8341.bin" created, size=27. "t8341.asm"{10} I0650 Program "t8341" assembled in 3 passes with errorlevel 0. "t8341.asm"{10} I0750 Source "t8341" (10 lines) assembled in 2 passes with errorlevel 0. I0860 Listing file "t8341.asm.lst" created, size=1379. I0990 EuroAssembler terminated with errorlevel 0.

▲Back to the top▲