用nasm在linux下编写第一个64位汇编程序
用nasm在linux下编写第一个64位汇编程序
安装nasm汇编器命令
1 | sudo apt-get install nasm |
创建文件命令
1 | vim hello.asm |
代码内容
1 | section .data |
编译命令
1 | nasm -f elf64 -o hello.o hello.asm |
链接命令
1 | ld hello.o -o hello |
运行命令
1 | ./hello |
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
