Files
Sepp J Morris 31738079c4 Upload
Digital Research
2020-11-06 18:50:37 +01:00

78 lines
2.0 KiB
Plaintext
Raw Permalink 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.

;*****************************************************
;*
;* Character I/O Interface
;*
;*****************************************************
CSEG
org 0
jmp init
jmp entry
sysdat dw 0 ;SYSDAT segment
supervisor equ (offset $)
rw 2
db 'COPYRIGHT (C) 1981,'
db ' DIGITAL RESEARCH '
serial db '654321'
;====
init:
;====
mov sysdat,ds
mov bx,offset supmod ! mov si,supervisor
mov ax,[bx]
mov cs:[si],ax
mov ax,2[bx]
mov cs:2[si],ax
retf
;*****************************************************
;*
;* CIO function table
;*
;*****************************************************
functab dw conin_entry ; 0 - Console Input
dw conout_entry ; 1 - Console Output
dw rconin_entry ; 2 - raw console input
dw rconout_entry ; 3 - raw console output
dw listout_entry ; 4 - list output
dw dirio_entry ; 5 - direct console I/O
dw conwrite_entry ; 6 - print string
dw conread_entry ; 7 - read buffer
dw constat_entry ; 8 - console status
dw conattach_entry ; 9 - attach console
dw condetach_entry ; 10- detach console
dw setdefcon_entry ; 11- set default console
dw conassign_entry ; 12- assign console
dw getdefcon_entry ; 13- get default console
dw conprint_entry ; 14- print string (internal)
dw lstattach_entry ; 15- attach list
dw lstdetach_entry ; 16- detach list
dw setdeflst_entry ; 17- set default list
dw clstattch_entry ; 18- cond list attach
dw cconattch_entry ; 19- cond list detach
dw getdeflst_entry ; 20- get default list
dw mimic_entry ; 21- mimic device
dw unmimic_entry ; 22- unmimic device
;===== =================
entry: ; CIO entry point
;===== =================
mov ch,0 ! shl cx,1 ! mov si,cx
call cs:functab[si] ! retf
;===== ===============
mpmif: ; MPM interface
;===== ===============
callf cs:dword ptr .supervisor ! ret
;====== ================
xiosif: ; XIOS interface
;====== ================
callf dword ptr .xiosmod ! ret