; CS2011, A Term 1999
; Prof. Sergio A. Alvarez

title Example of Console I/O

.model small
.stack

.data
inrecord db 255, ?, 255 dup(?)
newline  db 0Ah,0Dh,'$'

.code
.startup
   mov ah,0Ah
   mov dx,offset inrecord
   int 21h

   mov ah,09h
   mov dx,offset newline
   int 21h

   mov di,word ptr inrecord[1]
   and di,00FFh
   mov inrecord[di+2],'$'
   mov ah,09h
   mov dx,offset inrecord+2
   int 21h
.exit
end

