`
splayx
  • 浏览: 82625 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

x86汇编入门

阅读更多

 

section .data
msg:
db "hello, world", 10
len equ $-msg

section .text
global main
main:
mov edx, len
mov ecx, msg
mov ebx, 1
mov eax, 4
int 0x80

mov ebx, 0
mov eax, 1
int 0x80

 

nasm -f elf64 -l hello.lst -g -O0 hello.asm

gcc -g -O0 -o hello hello.o

 

gdb:

set language asm

set disassembly-flavor intel

define nd

nexti

disassemble

end

 

gdb hello

source gdb

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics