| Index | Manual | Download | Source | Macros | Embedded word Case ins.
Sitemap | Links | Forum | Tests | Projects

# Test t7344: Formal variables in %FOR block

Source file t7344.asm

            EUROASM DUMP=ON, DUMPALL=YES, DUMPWIDTH=32, \
                    LIST=ON, LISTVAR=YES, LISTREPEAT=YES
      t7344 PROGRAM FORMAT=BIN, LISTMAP=OFF, LISTGLOBALS=OFF
      [BIN]
      Mem1  D DWORD
      Mem2  D WORD
      Mem3  D BYTE
      formalId %FOR 1..3
                 MOV [Mem%formalId],%formalId
               %ENDFOR formalId
            ENDPROGRAM t7344

Expected listing t7344.asm.lst
  `| | EUROASM DUMP=ON, DUMPALL=YES, DUMPWIDTH=32, \ | | LIST=ON, LISTVAR=YES, LISTREPEAT=YES | |t7344 PROGRAM FORMAT=BIN, LISTMAP=OFF, LISTGLOBALS=OFF |[BIN] |[BIN] |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 t7344`

Expected messages t7344.out
  `I0180 Assembling source file "t7344.asm". I0270 Assembling source "t7344". I0310 Assembling source pass 1. I0330 Assembling source pass 2 - final. I0470 Assembling program "t7344". "t7344.asm"{3} I0510 Assembling program pass 1. "t7344.asm"{3} I0510 Assembling program pass 2. "t7344.asm"{3} I0530 Assembling program pass 3 - final. "t7344.asm"{3} I0660 16bit TINY BIN file "t7344.bin" created, size=27. "t7344.asm"{11} I0650 Program "t7344" assembled in 3 passes with errorlevel 0. "t7344.asm"{11} I0750 Source "t7344" (11 lines) assembled in 2 passes with errorlevel 0. I0860 Listing file "t7344.asm.lst" created, size=1365. I0990 EuroAssembler terminated with errorlevel 0.`

▲Back to the top▲