Vous êtes sur la page 1sur 2

Corrigé du TD2

Exercice 1:

Instruction Contenu de la destination


mov [SI] ,AX DS :2000 B5C7h
mov BX, [DI] ; Soit le contenu DS :4044h 98D0h BX=98D0h
mov BX,DI BX=4044h

Exercice 2 : (ram.asm): tracer le programme ci-dessous


mov bx,4000h ; adresse
mov ax,2233h HEX DEC
mov [bx],ax 4000h 33 051
mov word [bx+2],4455h 4001h 22 034
mov byte [bx+4],66h 4002h 55 085
mov byte [bx+5],77h 4003h 44 068
4004h 66 102
4005h 77 119

Exercice 3: (pile.asm) : tracer le programme ci-dessous. La valeur initiale de SP est quelconque


mov ax,2233h
push ax
mov ax,4455h Si on prend à titre d’exemple
push ax SP=2000hL’organisation de la pile sera
mov ax,6677h comme montre la figure ci-contre
push ax
mov bp,sp Le contenu de AL= 44h
mov al,[bp+3]
Et BX= 5566h
mov bx,[bp+1]

Exercice 5: (logic.asm) Tracer en binaire le programme ci –dessous


MOV AX,125h
AND AL,AH
AL 0010 0101

AH 0000 0001

AL 0000 0001 Donc , AX= (0000 0001 0000 0001) b = ( 0101) h


Exercice 9 :
Tracer le programme ci-dessous en indiquant à chaque fois la valeur des indicateurs CF et OF
mov al,64h
mov bl,2 64 0110 0100
mul bl
mov al,64h 2 0000 0010
mov cl,3
C8 1100 1000 CF=0 ; OF=0
mul cl

64 0110 0100

3 0000 0010

2C 1100 1000 CF=1 ; OF=1

Vous aimerez peut-être aussi