Вы находитесь на странице: 1из 2

data segment

d1 db ?
d2 db ?
msg db 13,10, "division de dos numeros"
num1 db 13,10, "numero 1 = $"
num2 db 13,10, "numero 2 = $"
res db 13,10, " el resultado es -----> $"
ends
stack segment
dw 128 dup(0)
ends
code segment
start:
mov ax,@data
mov ds,ax
mov dx,offset msg
mov ah,09h
int 21h

;mensaje como titulo

;ingresar numeros
mov
mov
int
mov
int
mov
sub

dx,offset num1
ah,09h
21h
ah,01h
21h
d1,al
d1,30h

mov
mov
int
mov
int
mov
sub

dx,offset num2
ah,09h
21h
ah,01h
21h
d2,al
d2,30h

;calculo de la multiplicacion
mov
mov
div
aam
mov

ax,0h
al,d1
d2
; ajuste ascii *
bx,ax

;mostrar el resultado de la operacion


mov dx,offset res
mov ah,09h
int 21h
mov dl,bh
add dl,30h

;mostrar decenas

mov ah,02h
int 21h
mov
add
mov
int

dl,bl
dl,30h
ah,02h
21h

mov ax, 4c00h


int 21h
ends
end start

;mostrar unidades

Вам также может понравиться