Exercice en masm illegal command !!
Fermé
informaticienne10
Messages postés
2
Date d'inscription
mardi 16 janvier 2018
Statut
Membre
Dernière intervention
16 janvier 2018
-
Modifié le 16 janv. 2018 à 15:23
informaticienne10 Messages postés 2 Date d'inscription mardi 16 janvier 2018 Statut Membre Dernière intervention 16 janvier 2018 - 16 janv. 2018 à 20:00
informaticienne10 Messages postés 2 Date d'inscription mardi 16 janvier 2018 Statut Membre Dernière intervention 16 janvier 2018 - 16 janv. 2018 à 20:00
1 réponse
yg_be
Messages postés
22624
Date d'inscription
lundi 9 juin 2008
Statut
Contributeur
Dernière intervention
28 mars 2024
1 461
16 janv. 2018 à 19:25
16 janv. 2018 à 19:25
bonsoir, comment pourrions-nous t'aider si tu ne partages pas ta solution?
Modifié le 16 janv. 2018 à 20:01
pile segment para stack 'pile'
db 256 dup (0)
pile ends
data segment
nombre dw ?
message db "entrez le premier nembre svp",'$'
message2 db "entrez un autre nbr sv",'$'
message3 db "le plus grand nombre est",'$'
data ends
code segment
phrase proc far
assume cs:code
assume ds:data
assume ss:pile
mov ax,data
mov ds,ax
mov dx,offset message
mov ah,9
int 21h
mov ah,8
int 21h
sub al,48
mov nombre,ax
mov cx,4
boucle:
mov dx,offset message2
mov ah,9
int 21h
mov ah,8
int 21h
CMP ax,nombre
JG save
save:
sub al,48
mov nombre,ax
loop boucle
mov dx,offset message3
mov ah,9
int 21h
mov dl,13
mov ah,2
int 21h
mov dx,nombre
add dx,48
mov ah,2
int 21h
mov ah,4ch
int 21h
phrase endp
code ends
end phrase