Programa Sumador Restador De Dos Numeros "37h y 0Fh" En Assembler

viernes, 4 de noviembre de 2011

Programa Sumador Restador De Dos Numeros "37h y 0Fh" En Assembler


Codigo En El Programa Emu8086
Programa Sumador Restador De Dos Numeros "37h y 0Fh" En Assembler


.model small
.data
uno db '    Presione un numero > 0 para sumar y 0 para restar estos valores 37h y 0Fh    $'
.code
inicio:
mov ax,@data
mov ds,ax
mov ah,09h
mov dx,offset uno
int 21h
mov ah,01h
int 21h
sub al,30h
jnz suma
jz resta
resta:
mov ax,37h
mov cx,0Fh
sub ax,cx
mov cx,10
div cx  
mov ch,al
mov cl,dl
add cx,3030h
mov dl,ch
mov ah,02h
int 21h
mov dl,cl
mov ah,02h
int 21h
jmp inicio
suma:
mov ax,37h
mov cx,0Fh
add ax,cx
mov cx,10
div cx  
mov ch,al
mov cl,dl
add cx,3030h
mov dl,ch
mov ah,02h
int 21h
mov dl,cl
mov ah,02h
int 21h
jmp inicio


Descargar

0 comments :

Publicar un comentario

Gracias por su comentario