Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TASM 2.x / MASM 6.x Assembly Language - <b>function 0ch (12) clear input buffer, then invoke function</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Function 0Ch (12)        Clear Input Buffer, then Invoke Function

    Removes any characters in the typeahead buffer, then invokes the
    specified keyboard function.

       On entry:      AH         0Ch
                      AL         Function to be invoked (01h, 06h, 07h, 08h,
                                 or 0Ah).

       Returns:       AL         Input character (unless function invoked was
                                 0Ah).

  --------------------------------------------------------------------------

    This function clears the keyboard buffer, then invokes one of five DOS
    services (specified in AL): functions 01h, 06h, 07h, 08h, or 0Ah. The
    purpose is to ensure that your program receives new input before it
    performs the followup function.

       Notes:         Since Function 06h is supported, the followup
                      function need not be keyboard input; it may be
                      display output. See specified followup function for
                      details.

                      If you just want to clear the keyboard buffer, you
                      can use this function with AL = 6 and DL = 0FFh,
                      which will check to see if any characters are
                      waiting to be read without reading any.

See Also: 01h 06h 07h 08h 0Ah

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson