下面红色部分从mem取值,32bit下是错的,而改用64bit编译就没问题
section .bss
Buff resb 1
mov eax ,Buff
mov al, byte [Buff]
这是以默认ELF32 编译的 nasm -f elf -g -F stabs write_uppercase1.asm
0x00000000004000cc <_start+28>: mov eax,0x60010c
0x00000000004000d1 <_start+33>: mov al,ds:0xb72613c0060010c
0x00000000004000da <_start+42>: cmp al,0x7a
nasm -f elf64 -g -F stabs write_uppercase1.asm
0x00000000004000cc <Read+27>: mov eax,0x60010c
0x00000000004000d1 <Read+32>: mov al,BYTE PTR ds:0x60010c
0x00000000004000d8 <Read+39>: cmp al,0x61
posted on 2014-08-22 10:01
pizzx 阅读(387)
评论(0) 编辑 收藏 引用