Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
Article Q58213, Program 1
◄Contents► ◄Index► ◄Back►
─────────────────────────────────────────────────────────────────────────────
◄Knowledge Base Contents► ◄Knowledge Base Index►
How to Empty (Flush) File And Keyboard Buffers in Basic - Q58213
Code Example 1
--------------
The following program uses MS-DOS Interrupt 21h (33 decimal) with
function 0Ch (12 decimal), which flushes the input (type-ahead)
keyboard buffer. To run this program inside the Visual Basic
version 1.0 for MS-DOS (VBDOS.EXE) environment, you must load the
Quick library VBDOS.QLB with the /L option.
' Use the following include file for Visual Basic 1.0 for MS-DOS:
REM $INCLUDE: 'VBDOS.BI'
DIM inregs AS regtype
DIM outregs AS regtype
inregs.ax = &HC00 ' 0Ch goes in AH, high byte of AX register.
' 00 goes in AL, the low byte of AX register.
CALL INTERRUPT(&H21, inregs, outregs)
END