en:docs:dos:api:int21:06

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
en:docs:dos:api:int21:06 [2020/12/07 05:51] – created prokusheven:docs:dos:api:int21:06 [2024/04/27 06:54] (current) prokushev
Line 9: Line 9:
 ===== Brief ===== ===== Brief =====
  
-DIRECT CONSOLE OUTPUT+DIRECT CONSOLE OUTPUT/INPUT
  
 ===== Family API ===== ===== Family API =====
Line 18: Line 18:
  
   AH = 06h   AH = 06h
-  DL = character (except FFh)+  DL = output character (except FFh) 
 +  DL = FFh - input character 
 +  
  
 ===== Return ===== ===== Return =====
 +
 +On output:
  
   AL = character output (despite official docs which state nothing is returned) (at least DOS 2.1-7.0)   AL = character output (despite official docs which state nothing is returned) (at least DOS 2.1-7.0)
 +
 +On input:
 +
 +  ZF set if no character available
 +            AL = 00h
 +
 +  ZF clear if character available
 +            AL = character read
  
 ===== Notes ===== ===== Notes =====
Line 29: Line 41:
  
  writes to standard output, which is always the screen under DOS 1.x, but may be redirected under DOS 2+  writes to standard output, which is always the screen under DOS 1.x, but may be redirected under DOS 2+
 +
 + if the returned character is 00h, the user pressed a key with an extended keycode, which will be returned by the next call of this function
 +
 + this function reads from standard input, which is always the keyboard under DOS 1.x, but may be redirected under DOS 2+
 +
 + although the return of AL=00h when no characters are available is not documented, some programs rely on this behavior
  
 ===== See also ===== ===== See also =====
  
-AH=02h,AH=09h+AH=[[en:docs:dos:api:int21:02|02h]],AH=[[en:docs:dos:api:int21:09|09h]],AH=[[en:docs:dos:api:int21:0b|0BH]]
  
 ===== Note ===== ===== Note =====