EuroAssembler Index Manual Download Source Macros


Sitemap Links Forum Tests Projects

Test t7345: Formal variables in %MACRO block


Source file t7345.asm
      EUROASM DUMP=ON, DUMPALL=YES, DUMPWIDTH=32, \
              LIST=ON, LISTVAR=YES, LISTMACRO=YES
t7345 PROGRAM FORMAT=BIN, LISTMAP=OFF, LISTGLOBALS=OFF
[BIN]
;; Definition of macro Fill.
Fill %MACRO Where, Stuff=0
       MOV %Where,%Stuff
     %ENDMACRO Fill
;; Invocations of macro Fill:
   Fill [Counter], Stuff=255 ; Will be assembled as MOV [Counter],255
   Fill BX                   ; Will be assembled as MOV BX,0
Counter D WORD
  ENDPROGRAM t7345
Expected listing t7345.asm.lst
| | EUROASM DUMP=ON, DUMPALL=YES, DUMPWIDTH=32, \ | | LIST=ON, LISTVAR=YES, LISTMACRO=YES | |t7345 PROGRAM FORMAT=BIN, LISTMAP=OFF, LISTGLOBALS=OFF |[BIN] |[BIN] | |;; Definition of macro Fill. | |Fill %MACRO Where, Stuff=0 | | MOV %Where,%Stuff | | %ENDMACRO Fill | |;; Invocations of macro Fill: |0000: | Fill [Counter], Stuff=255 ; Will be assembled as MOV [Counter],255 | +Fill %MACRO Where, Stuff=0 |0000:C706[0A00]FF00 + MOV %Where,%Stuff | !MOV [Counter],255 | + %ENDMACRO Fill |0006: | Fill BX ; Will be assembled as MOV BX,0 | +Fill %MACRO Where, Stuff=0 |0006:BB0000 + MOV %Where,%Stuff | !MOV BX,0 | + %ENDMACRO Fill |0009:90 ....AutoAlignment stuff. |000A:0000 |Counter D WORD | | ENDPROGRAM t7345
Expected messages t7345.out
I0180 Assembling source file "t7345.asm". I0270 Assembling source "t7345". I0310 Assembling source pass 1. I0330 Assembling source pass 2 - final. I0470 Assembling program "t7345". "t7345.asm"{3} I0510 Assembling program pass 1. "t7345.asm"{3} I0510 Assembling program pass 2. "t7345.asm"{3} I0510 Assembling program pass 3. "t7345.asm"{3} I0530 Assembling program pass 4 - final. "t7345.asm"{3} I0660 16bit TINY BIN file "t7345.bin" created, size=12. "t7345.asm"{13} I0650 Program "t7345" assembled in 4 passes with errorlevel 0. "t7345.asm"{13} I0750 Source "t7345" (13 lines) assembled in 2 passes with errorlevel 0. I0860 Listing file "t7345.asm.lst" created, size=1380. I0990 EuroAssembler terminated with errorlevel 0.

▲Back to the top▲