作者septemhill (冰淇淋乾杯)
看板ASM
標題[問題] x86 "aw" register name
時間Wed Apr 6 08:00:25 2011
請教關於x86 asm的一個問題,我昨天看到一段code
用了一個從來沒看過的register,也沒辦法編譯過,以下是code:
.data
value:
.long 2
.text .global _start
_start:
movl $54, %ebx
xchgl value, %ebx
xchgw %ax, value
xchgb %al, %bl
xchgw value(%eax),
%aw
# Linux sys_exit
mov $1, %eax
xorl %ebx, %ebx
int $0x80
我個人使用的是gcc-4.4的 compiler,OS是Linux的
不知道這個register是怎麼來的?因為我並沒有查到相關register的資料
若各位有相關方面的資料,不知道是否可以提供一下,謝謝
--
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 122.118.1.245
1F:→ dayyeah:Word (16-bit) register? 04/07 08:19
2F:推 Ross0916:it's a synonym for the high word of eax 04/12 14:30