每当我尝试运行 hello.exe 时,都会等待一秒钟然后结束而不写入任何内容。
源代码:
global start
section .text
start:
mov rax,1
mov rdi,1
mov rsi,msg
mov rdx,13
syscall
mov rax,60
xor rdi,rdi
syscall
section .data
msg:db "Hello World!",10
编译命令:
../../../bin/NASM/nasm.exe -f win64 hello.asm
../../../bin/Golink/Golink.exe /console hello.obj
源代码适用于 Linux 机器,但您使用的是 Windows (
win64
)。