Macro problem
Posted: Sun Dec 19, 2004 5:48 am
I have made a macro in NASM as follows:
%MACRO PRINT 1
MOV SI, %1
.start
MOV AH, 0x0E
LODSB
CMP AL, 0x00
JE .end
INT 0x10
JMP .start
.end
%ENDMACRO
Sometimes it workes when I call it but other times it has an error compiling, saying: .end already defined and .start already define or something around those lines. Anyone know how to fix this?
%MACRO PRINT 1
MOV SI, %1
.start
MOV AH, 0x0E
LODSB
CMP AL, 0x00
JE .end
INT 0x10
JMP .start
.end
%ENDMACRO
Sometimes it workes when I call it but other times it has an error compiling, saying: .end already defined and .start already define or something around those lines. Anyone know how to fix this?