1 title 'Character I/O Module for the Modular CP/M 3 BIOS'
7 public ?cinit,ioctl,?ci,?co,?cist,?cost
17 maclib modebaud.inc ; define mode bits and baud equates
21 ;--------------------------------------------------------------
29 db 'ASCI0 ' ; device 1
30 db mb$in$out+mb$serial+mb$soft$baud
33 db 'ASCI1 ' ; device 2
34 db mb$in$out+mb$serial+mb$soft$baud
37 db 0 ; table terminator
39 ;--------------------------------------------------------------
52 max$devices equ ($-xctbl)/2
58 ;--------------------------------------------------------------
68 ;--------------------------------------------------------------
69 ; Init character device
73 ?cinit: ; init devices
85 ;--------------------------------------------------------------
92 ?ci: ; character input
101 ;--------------------------------------------------------------
105 ; a: 0ffh if char available, else 0
108 ?cist: ; character input
113 _cist: ; character input status
117 ;--------------------------------------------------------------
125 ?co: ; character input
130 _co: ; character output
135 ;--------------------------------------------------------------
139 ; a: 0ffh if device ready for next output char, else 0
143 ?cost: ; character input
148 _cost: ; character output status
152 ;--------------------------------------------------------------
154 ; hl: function table index (offset)
156 ; c: output char or ioctl #
157 ; de: ioctl arg pointer
159 ; Calls funtion xctbl[offset] with
160 ; b,c,de unchanged and hl = ptr to drivers local data
164 push de ;save arg ptr 11
191 ;--------------------------------------------------------------
222 ;--------------------------------------------------------------