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 0ah (10) buffered input</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Function 0Ah (10)        Buffered Input

    Reads a string of characters from the standard input device until the
    Enter key is pressed.  Echos the characters and checks for Ctrl-Break
    and Ctrl-C.

       On entry:      AH         0Ah
                      DS:DX      Pointer to an input buffer; offset 0 (first
                                 byte) of buffer specifies maximum buffer
                                 length.

       Returns:       See notes

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

    This function reads characters from the standard input device, until a
    carriage return is encountered. The characters, including the carriage
    return, are stored beginning at offset 2 (third byte) of a buffer
    specified in DS:DX.

       Setup:         Store maximum capacity of buffer (255 or less) at
                      the first byte at DS:DX; include the terminating
                      carriage return in the count.

       On Return:     At offset 1 (second byte) of DS:DX, DOS returns the
                      number of characters that were actually received,
                      not including the final carriage return.

       Notes:         If DOS encounters a Ctrl-Break or Ctrl-C, it
                      executes an INT 23h.

                      The DOS editing commands are active during input
                      with this function.

                      If the buffer becomes filled to within one byte of
                      capacity, DOS rejects all further characters up to,
                      but not including, the terminating carriage return.

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

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