home *** CD-ROM | disk | FTP | other *** search
- kbuf db 80 dup (0) ; buffer for keyboard input
- .
- .
- .
- mov dx,seg kbuf ; set DS:DX = address of
- mov ds,dx ; keyboard input buffer
- mov dx,offset kbuf
- mov cx,80 ; CX = maximum length of input
- mov bx,0 ; standard input handle = 0
- mov ah,3fh ; function 3FH = read file/device
- int 21h ; transfer to MS-DOS
- jc error ; jump if function failed
- ; otherwise AX = actual
- ; length of keyboard input,
- ; including carriage-return and
- ; linefeed, and the data is
- ; in the buffer 'kbuf'
-