t8219.asm
EUROASM DUMP=ON, DUMPALL=YES, DUMPWIDTH=32, \
LIST=ON, LISTVAR=YES, LISTMACRO=YES
t8219 PROGRAM FORMAT=COFF, WIDTH=32, LISTMAP=OFF, LISTGLOBALS=OFF
;;
Cube %MACRO Number ; Define macro which calculates the 3rd power of unsigned integer Number.
%IF "%Number" !== "EAX"
MOV EAX,%Number ; Skip this step when Number already is in EAX.
%ENDIF
MOV ECX,EAX ; Copy the input value N to register ECX.
MUL ECX ; Let EDX:EAX = Number*Number
JC $+4 ; CF=OF=1 when EDX is nonzero (32bit overflow). Skip the 2nd MUL.
MUL ECX ; Let EDX:EAX = Number*Number*Number
%ENDMACRO Cube; Returns EDX:EAX=Number3, ECX=Number, CF=OF=1 on overflow.
;;
Cube 5 ; Use the macro to compute 53.
ENDPROGRAM t8219
t8219.asm.lst
t8219.out
I0180 Assembling source file "t8219.asm".
I0270 Assembling source "t8219".
I0310 Assembling source pass 1.
I0330 Assembling source pass 2 - final.
I0470 Assembling program "t8219". "t8219.asm"{3}
I0510 Assembling program pass 1. "t8219.asm"{3}
I0530 Assembling program pass 2 - final. "t8219.asm"{3}
I0660 32bit FLAT COFF file "t8219.obj" created, size=150. "t8219.asm"{16}
I0650 Program "t8219" assembled in 2 passes with errorlevel 0. "t8219.asm"{16}
I0750 Source "t8219" (16 lines) assembled in 2 passes with errorlevel 0.
I0860 Listing file "t8219.asm.lst" created, size=2331.
I0990 EuroAssembler terminated with errorlevel 0.