3 ms·
Excellent explanation in the article. Also note that in x86-64 mode, the low 8 bits of all registers can be accessed, namely: AL, BL, CL, DL, SIL, DIL, SPL, BPL
by nayuki 7y ago
Excellent explanation in the article. Also note that in x86-64 mode, the low 8 bits of all registers can be accessed, namely: AL, BL, CL, DL, SIL, DIL, SPL, BPL, R8B, R9B, R10B, R11B, R12B, R13B, R14B, R15B. Previously, there was no equivalent of SIL, DIL, SPL, and BPL. https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/x64-architecture https://docs.microsoft.com/en-us/windows-hardware/drivers/de...
- hinkley 7y agoAL, BL make sense. But now I need an explanation for why they switched from L to B for R8B... Also if you could explain A-R15 that’d be super. Apparently they have learned absolutely nothing.
- therealcamino 7y agoI had the same question about the suffix letters. My uninformed guess is: 8 bits == byte == B 16 bits == word == W 32 bits == doubleword == D
- jagrsw 7y agoI believe D for doubleword is mostly Microsoft C/C++ thing, though I'm sure it appears in other places too. When it comes to the assembler syntax 32bit word, my guess would be, that 32bit words (e.g AT&T x86 syntax, m68 assemblers) are mostly indicated as l (for long). movl (at&t's x86) or mov.l (m68k). Edit: Ah.. yeah, also intel x86 asm syntax uses it, so I guess that's where the idea of using D for 32bit values originates.
- pizlonator 7y agoFor some of the L ones it’s possible to access the H part. So it’s not just a byte (B) it’s the low (L) byte and there is a high (H, just the second byte of the word) you can also get to. For the high 8 registers it isn’t like that. There is no way to get to the “high” byte.