3 ms·
Those would be the lower 8 bits, no?
by anamexis 1y ago
Those would be the lower 8 bits, no?
- pm2222 1y agoax=ah:al eax=?:ax rax=?:eax
- grg0 1y agoIt's neither. al is the lower 8 bits of ax (ah the higher 8 bits). ax is the lower 16 bits of eax. eax the lower 32 bits of rax. Here's the AMD manual: https://docs.amd.com/v/u/en-US/40332-PUB_4.08 https://docs.amd.com/v/u/en-US/40332-PUB_4.08
- wunused 1y agoIn a 64 bit register, e.g., RAX, AL refers to the lowest 8 bits [0-7] and AH refers to the next 8 bits [8-15]. Together, AX refers to bits [0-15]. EAX refers to [0-31]. It's counterintuitive (or at least, inconsistent) that we have a name for bits [8-15] but not for [16-31] or [32-63]. My fuzzy understanding is that this came about from legacy decisions. This page has a helpful visualization at the top: https://www.cs.uaf.edu/2017/fall/cs301/lecture/09_11_registers.html https://www.cs.uaf.edu/2017/fall/cs301/lecture/09_11_registe...
- deleted 1y ago[deleted]