Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
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.
WriteTTY
 Map                                       Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
;* WriteTTY - Displays ASCIIZ string at cursor position, in either text
;* or graphics mode.
;*
;* Shows:   BIOS Interrupt - 10h, Function 0Eh (Write Character in TTY Mode)
;*
;* Uses:    vconfig - Video configuration structure (initialized
;*          by calling the GetVidConfig procedure)
;*
;* Params:  Sptr - Pointer to ASCIIZ string
;*          icolor - Color index (for graphics mode only)
;*
;* Return:  None
 
WriteTTY PROC USES ds si,
        Sptr:PBYTE, icolor:WORD
 
        mov     bx, icolor              ; BL = color index
        mov     bh, vconfig.dpage       ; BH = current display page
        LoadPtr ds, si, Sptr
        mov     cx, -1                  ; Set loop counter to maximum
        mov     ah, 14                  ; Function 14
 
        .REPEAT
        lodsb                           ; Get character from string
        .BREAK .IF al == 0              ; Exit if NULL string terminator
        int     10h                     ; No?  Display, advance cursor
        .UNTILCXZ
 
        ret
 
WriteTTY ENDP
                                    -♦-