AT&T Assembly on Linux
je
if equal then jmp
jg
if the second gt the first, then jmp
jge
if the second ge the first, then jmp
jl
if the second lt the first, then jmp
jle
if the second le the first, then jmp
AT&T 64-bit assembly
how to call library like printf?
The code shows the AT&T assembly on 64-bit Linux.
We use syscall instead of int 0x80.
We save parameters in registers before calling printf, instead of pushing the parameters on the stack.
This is the key:
How to debug assembly program on Linux ?
using gdb
as xx.s -gstabs -o xx.o -gstabs is necessary,otherwise
commands:
run, next, info registers, break num(line number), quit
how to exit program rightly:
movq 1,%rax
int $0x80
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步