Programa con libreria emu8086 que pide un numero
include 'emu8086.inc'
ORG 100h
LEA SI, msg1 ; ask for the number
CALL print_string ;
CALL scan_num ; get number in CX.
MOV AX, CX ; copy the number to AX.
; print the following string:
CALL pthis
DB 13, 10, 'Tu escribiste : ', 0
CALL print_num ; print number in AX.
RET ; return to operating system.
; data
msg1 DB 'Ingresa un numero y presiona enter: ', 0
; macros to define procs
DEFINE_SCAN_NUM
DEFINE_PRINT_STRING
DEFINE_PRINT_NUM
DEFINE_PRINT_NUM_UNS ; required for print_num.
DEFINE_PTHIS
END ; directive to stop the compiler.
No hay comentarios:
Publicar un comentario