home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / dos_ency / section5 / fxn06h.asm < prev    next >
Encoding:
Assembly Source File  |  1988-08-11  |  1.2 KB  |  23 lines

  1.         ;************************************************************;
  2.         ;                                                            ;
  3.         ;          Function 06H: Direct Console I/O                  ;
  4.         ;                                                            ;
  5.         ;          int con_io(c)                                     ;
  6.         ;              char c;                                       ;
  7.         ;                                                            ;
  8.         ;          Returns meaningless data if c is not 0FFH,        ;
  9.         ;          otherwise returns next character from             ;
  10.         ;          standard input.                                   ;
  11.         ;                                                            ;
  12.         ;************************************************************;
  13.  
  14. cProc   con_io,PUBLIC
  15. parmB   c
  16. cBegin
  17.         mov     dl,c            ; Get character into DL.
  18.         mov     ah,06h          ; Set function code.
  19.         int     21h             ; This function does NOT wait in
  20.                                 ; input case (c = 0FFH)!
  21.         mov     ah,0            ; Return the contents of AL.
  22. cEnd
  23.