我刚刚开始用汇编编码。我已经下载了flat assembler并从互联网上复制了代码。然而,当我运行此代码时,它会显示如下内容:
section .text error: illegal instruction.
我的问题是:这段代码有什么问题?
section .text
global_start ;must be declared for linker (ld)
_start: ;tells linker entry point
mov edx,len ;message length
mov ecx,msg ;message to write
mov ebx,1 ;file descriptor (stdout)
mov eax,4 ;system call number (sys_write)
int 0x80 ;call kernel
mov eax,1 ;system call number (sys_exit)
int 0x80 ;call kernel
section .data
msg db 'Hello, world!', 0xa ;our dear string
len equ $ - msg ;length of our dear string
有人能弄清楚出了什么问题吗?
最佳答案
关于linux - FASM 在组装过程中给了我 'error: illegal instruction.',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34006442/