06.Assemblage manuel

Download Report

Transcript 06.Assemblage manuel

Système d’exploitation :
Assembleur
Semaine 06
Assemblage manuel
Assemblage manuel : MOV
modes mémoire
R/M
mod = 00
000
[bx+si]
mod = 01
mode registre
mod = 10
mod = 11
w=0
w=1
+ dépl. 8 bits + dépl. 16 bits
al
ax
001
[bx+di] + dépl. 8 bits + dépl. 16 bits
cl
cx
010
[bp+si] + dépl. 8 bits + dépl. 16 bits
dl
dx
011
[bp+di] + dépl. 8 bits + dépl. 16 bits
bl
bx
100
[si]
+ dépl. 8 bits + dépl. 16 bits
ah
sp
101
[di]
+ dépl. 8 bits + dépl. 16 bits
ch
bp
dépl. 16 [bp] + dépl. 8 [bp] + dépl. 16
bits
bits
bits
dh
si
bh
di
110
111
[bx]
+ dépl. 8 bits + dépl. 16 bits
Sreg
00
01
10
11
es
cs
ss
ds
MOV
MOV
MOV
1000 10dw md,reg,r/m dépl.(0->2)
(d=1)
reg, reg
mov bp, sp
mov dl, ah
(d=0)
mem, reg
mov zone[si], dl
mov truc[bx], cx
(d=1)
reg, mem
mov dh, zone[bx]
mov cx, truc
1010 00dw dépl.(2)
(d=1)
mov zone, al
mov truc, ax
(d=0)
mov al, zone
mov ax, truc
MOV
mem, accum
MOV
accum, mem
MOV
1100 011w md,000,r/m dépl.(0->2) data(1 ou 2)
mem, immed
mov byte ptr[si], 6
mov word ptr[si], 6
1011 w,reg data(1 ou 2)
mov cx, 253
mov ah, 6
MOV
reg, immed
MOV
MOV
MOV
MOV
1000 11d0 md,Sreg,r/m dépl.(0->2)
(d=1)
sreg, reg(16)
mov ds, ax
(d=1)
sreg, mem(16)
mov es, [bx+si]
(d=0)
reg(16), sreg
mov dx, ds
(d=0)
mem(16), sreg
mov save[si], ss
MOV AX, BX
mov reg, reg
MOV AH, BL
mov reg,reg
MOV SI, 0ABCDh
mov reg,imméd
MOV CX,[BX+SI]
mov reg, mem
MOV SI,[BP+DI+2]
mov reg, mem

1000 10

==
1000
8

1000 10

==
1000
8

1011

==
1011
B

1000 10

==
1000
8

1000 10

==
1000
8
dw
11
1011
B
md
11
1100
C
reg
000
0011
3
reg
011
dw
10
1010
A
md
11
1110
E
reg
100
0011
3
reg
011
w
1
1110
E
reg
110
ABCDh
ABCD
data
ABCDh
dw
11
1011
B
md
00
0000
0
reg
001
1000
8
mem
000
dw
11
1011
B
md
01
0111
7
reg
110
0011
3
mem
011
02h
02h
depl
02h