NASM DOS中断(输出字符串) [英] nasm dos interrupt (output string)
本文介绍了NASM DOS中断(输出字符串)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以下的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
和它得到了一个错误:
[19点28分32秒]警告!错误发生在编译:
C:/Users/user/AppData/Local/Temp/SASM/program.asm:12:错误:逗号,冒号,装饰或线预计年底操作后
gcc.exe:错误:C:/Users/user/AppData/Local/Temp/SASM/program.o:没有这样的文件或目录
[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
这是什么问题?我使用SASM IDE。
What is the problem? i'm using sasm ide.
推荐答案
这是TASM / MASM语法:
This is TASM/MASM syntax:
mov dx,OFFSET msg
在使用NASM你只要写:
When using NASM you'd simply write:
mov dx,msg
这篇关于NASM DOS中断(输出字符串)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文