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?

AT&T Assembly on Linux

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.

AT&T Assembly on Linux

This is the key:

AT&T Assembly on Linux

 

How to debug assembly program on Linux ?

        using gdb

as xx.s -gstabs -o xx.o      -gstabs is necessary,otherwise

AT&T Assembly on Linux

AT&T Assembly on Linux

commands:

   run, next, info registers, break num(line number), quit

 

how to exit program rightly:

   movq 1,%rax

   int $0x80

相关文章:

  • 2022-02-16
  • 2022-12-23
  • 2022-12-23
  • 2021-07-25
  • 2021-07-16
  • 2022-01-13
  • 2021-11-10
猜你喜欢
  • 2022-12-23
  • 2021-11-22
  • 2022-12-23
  • 2021-09-24
  • 2022-02-06
  • 2021-07-13
  • 2021-09-21
相关资源
相似解决方案