编译内核显示小企鹅的办法
刚开始接触LINUX下的汇编,但是找不到好的在LINUX下NASM的汇编教程,就用了WINDOWS的书,写了段程序,运行时提示段错误,不知道怎么回事
哪位帮忙看看,我已经不知道去哪里提问了= =
代码:
1
2 segment .txet
3 global _start
4
5 _start:
6 enter 0,0
7 mov eax,2
8 add eax,eax
9 add eax,eax
10 ret
11 int 0x80
2 segment .txet
3 global _start
4
5 _start:
6 enter 0,0
7 mov eax,2
8 add eax,eax
9 add eax,eax
10 ret
11 int 0x80
代码:
nasm -f elf huibian1.asm
gcc huibian1.o -o huibian1
gcc huibian1.o -o huibian1
哪位帮忙看看,我已经不知道去哪里提问了= =
作者: gundamfj 发布时间: 2011-05-07