;;read in then print out a message
;dos function ah=1 will wait for then read a char into al
;this program uses dos function printstring (can you find it?)
;array addressing... can you find it?

.MODEL SMALL
   .ST ACK 100
   .DATA
    mess db 0ah,0dh
    Message db 20 dup('$')

   .CODE
   start:
   mov  ax,@data
   mov  ds,ax                       ;set DS to point to the data segment
   mov  ah,1           &nbs p;            ;DOS get char function
   xor bx,bx

  top: int 21h
   Mov message[bx],al
   cmp al,0dh
    Je alldone
   Inc bx
   Jmp top
alldone:
    mov ah,9
 mov dx, offset mess
 int 21h
   mov  ax,04c00h             & nbsp;        ;DOS terminate program function
   int  21h                         ;terminate the program
   END     start

;below a run of the program with an error, followed by a run with the message: this is it