Está en la página 1de 1

.

model small
.stack 64
.data
msj db “introduzca un valor (seguido de un enter): $"
aprobado db "aprobado$"
reprobado db "reprobado$"
.code
mov ax,@data ;inicio
mov ds,ax
;muestro el mensaje 1
mov ah,09; servicio de impresion de cadenas
mov dx,offset mensaje1
int 21h
;leo los datos por teclado
;caracter 1
mov ah,01 ;servicio del teclado
int 21h
mov var1,ax

jge continue
jmp mayor
;inicia funciones
;declaracion de funciones etiqueta_nombre:
;operaciones
mov ax,var1
cmp al,037h
jge mayor
jmp menor
mayor:
mov ah,70
mov dx,offset aprobado
int 21h
jmp salir
menor:
mov ah,70
mov dx,offset reprobado
int 21h
jmp salir
salir:
mov ax,400ch
int 21h
end

También podría gustarte