问题
I have the following code:
%include "io.inc"
section .data
msg db 'Hello World...$'
section .text
global CMAIN
CMAIN:
;write your code here
mov ah,09
mov dx,OFFSET msg
int 21h
xor eax, eax
xor dx,dx
ret
and it gets the next error:
[19:28:32] Warning! Errors have occurred in the build: C:/Users/user/AppData/Local/Temp/SASM/program.asm:12: error: comma, colon, decorator or end of line expected after operand gcc.exe: error: C:/Users/user/AppData/Local/Temp/SASM/program.o: No such file or directory
What is the problem? i'm using sasm ide.
回答1:
This is TASM/MASM syntax:
mov dx,OFFSET msg
When using NASM you'd simply write:
mov dx,msg
来源:https://stackoverflow.com/questions/26593331/nasm-dos-interrupt-output-string