;Write a program that will use INT 21h, Function 06 to get a character, ; and echo it back to screen. If character = CONTROL_C, exit. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; .model small .586 .stack 100h ;Set maximum stack size to 256 bytes .data msg db "Starting Program!", 0ah, 0dh, "$" .code START: mov ax, @data ;ax <-- data segment start address mov ds, ax ;ds <-- initialize data segment register mov dx, offset msg mov ah, 09h int 21h ; print message to screen LP1: mov ah, 06h mov dl, 0FFh int 21h ; check if character available je LP1 ; keep looping until character is ready cmp al, 03 ; '03' is ASCII value for a control-C je EXIT mov ah, 02 mov dl,al int 21h ; echo character to screen jmp LP1 ; go back to top EXIT: mov ax, 4c00h ;ax <-- 4c DOS 21h program halt function int 21h ;DOS service interrupt END START