Values ​​of hexadecimal registers? x86

MOV DL,AL

"MOV DL" = B2

But what is the hex byte value for AL? Where are they listed?

I just realized that this should be another opcode! Can someone point me in the right direction?

+3
source share
3 answers

In Intel Architecture Software Developer's Guide, Volume 2: Instruction Set Reference Guide , Table 3-1. Register encodings Associated with the nomenclature + rb, + rw and + rd, p. 3-3:

AL = 0 AX = 0 EAX = 0
CL = 1 CX = 1 ECX = 1
DL = 2 DX = 2 EDX = 2
BL = 3 BX = 3 EBX = 3
AH = 4 SP = 4 ESP = 4
CH = 5 BP = 5 EBP = 5
DH = 6 SI = 6 ESI = 6
BH = 7 DI = 7 EDI = 7

To answer your question ("aha great. I find it difficult to find a list of instructions for moving registers to registers. Can you shed some light?"):

: ( 8- regs)

8a c0        mov     al, al
8a c1        mov     al, cl
8a c2        mov     al, dl
8a c3        mov     al, bl
8a c8        mov     cl, al
8a c9        mov     cl, cl
8a ca        mov     cl, dl
8a cb        mov     cl, bl
8a d0        mov     dl, al
8a d1        mov     dl, cl
8a d2        mov     dl, dl
8a d3        mov     dl, bl
8a d8        mov     bl, al
8a d9        mov     bl, cl
8a da        mov     bl, dl
8a db        mov     bl, bl

:

Intel MOV . 3-402. , MOV, :

88 /r MOV r/m8,r8 Move r8 to r/m8
89 /r MOV r/m16,r16 Move r16 to r/m16
89 /r MOV r/m32,r32 Move r32 to r/m32
8A /r MOV r8,r/m8 Move r/m8 to r8
8B /r MOV r16,r/m16 Move r/m16 to r16
8B /r MOV r32,r/m32 Move r/m32 to r32

, 8A. , r8 8- , r/m8 8- , . , MOV 16- 32- (r16, r32). 3-2 3-5 , MOV.

, , , . 2.1 " ", 2-1. x86 6 : , , ModR/M, SIB, . (8A) ModR/M.

ModR/M 2.4 2-5 - 2-6. , ModR/M , . , AL DL, D0 ModR/M, 8A D0.

+15

" Intel® 64 IA-32 2: , A-M "

+2

You will find all opcodes in some good x86 tables at http://www.sandpile.org

+1
source

Source: https://habr.com/ru/post/1767329/


All Articles