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 (将#修改为@)