如何解决PRINT_STRING msg
我使用的是 64 位 Windows 7,我从这里下载了 SASM 程序集 IDE:
https://dman95.github.io/SASM/english.html
包括几个 hello world 示例。 NASM 示例编译良好,但 NASM 64 位给出编译错误。
NASM 64 位代码是:
%include "io64.inc"
section .data
msg db 'Hello,world!',0
section .text
global CMAIN
CMAIN:
mov ebp,esp; for correct debugging
mov rbp,rsp
PRINT_STRING msg
NEWLINE
xor rax,rax
ret
编译错误是:
Build started...
Warning! Errors have occurred in the build:
C:\Temp\SASM\program.asm:11: error: impossible combination of address sizes
C:\Temp\SASM\program.asm:11: error: impossible combination of address sizes
C:\Temp\SASM\program.asm:11: error: impossible combination of address sizes
C:\Temp\SASM\program.asm:12: error: impossible combination of address sizes
C:\Temp\SASM\program.asm:12: error: impossible combination of address sizes
C:\Temp\SASM\program.asm:12: error: impossible combination of address sizes
gcc.exe: error: C:\Temp\SASM\program.o: No such file or directory
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。