Files
Digital-Research-Source-Code/CPM OPERATING SYSTEMS/CPM 86/CONCURRENT/CCPM-86 3.1 SOURCE/D5/CONOUT.A86
Sepp J Morris 31738079c4 Upload
Digital Research
2020-11-06 18:50:37 +01:00

97 lines
2.3 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

title ' Console Output Entry Module'
;*******************************************
; *
; CONOUT MODULE *
; Last changed : 2/11/84 *
; *
;*******************************************
include chrcomm.equ
include serdata.equ
include vscreen.equ
eject
dseg
extrn ocdesctbl:word
extrn vccb_tbl:word ; in vs_screen.a86
extrn oq0desc:byte
extrn stoppoll:word ; in headentr.a86
cseg
public io_conout
public pmsg
public conout1
extrn serial_out:near ; in serout.a86
extrn supif:near ; in headentr.a86
extrn vs_conout:near ; in vs_screen.a86
;====
pmsg:
;====
; print message on current console until 0ffh
; input: BX = address of message
push stoppoll
mov stoppoll,0ffffh
mov dl, 0 ; signon to console 0
ploop:
mov cl,[bx] ; get next char
cmp cl,0ffh
je pmsg_ret ; return if 0ffh
; CL = character
push dx ;save device number
push bx ;save string ptr
call io_conout ;display it
pop bx ;regain <BX>
pop dx ;console
inc bx ;bump to next char
jmps ploop ;loop till done
pmsg_ret:
pop stoppoll
ret ; end of message
;=========
io_conout: ; Function 2: Console Output
;=========
;
; input: CL = character
; DL = virtual console number
;
; output: None
;
xor dh,dh
jmp vs_conout ; for virtual screen buffering
; omit this jump to disable buffering
conout1:
push dx ; save the Virtual con
mov bx, dx
shl bx, 1
mov bx, vccb_tbl[bx] ; bx -> VCCB
mov bl, vccb_pcon[bx] ; get the Physical console #
xor bh, bh
shl bx, 1
mov bx, ocdesctbl[bx] ; bx -> Xmit Q control structure
pop dx ; get the Vcon back
cmp dl, CUR_VCON[bx]
je co1 ; if background and dynamic,
ret ; bit bucket the char
co1:
cmp cl, ESC ; Check for an escape character.
jne co2 ; Worst case (VT-52) is 4 char's.
mov OESC_CNT[bx], 4 ; init escape count
co2:
call serial_out
ret
end