System information
;
conout: ;console character output from register c
mov a, c ;get to accumulator
ds 10h ;space for output routine
ret
;
list: ;list character from register c
mov a, c ;character to register a
ret ;null subroutine
;
listst: ;return list status (0 if not ready, 1 if ready)
xra a ;0 is always ok to return
ret
;
punch: ;punch character from register C
mov a, c ;character to register a
ret ;null subroutine
;
;
reader: ;reader character into register a from reader device
mvi a, 1ah ;enter end of file for now (replace later)
ani 7fh ;remember to strip parity bit
ret
;
;
; i/o drivers for the disk follow
; for now, we will simply store the parameters away for use
; in the read and write subroutines
;
home: ;move to the track 00 position of current drive
; translate this call into a settrk call with Parameter 00
mvi c, 0 ;select track 0
call settrk
ret ;we will move to 00 on first read/write
;
seldsk: ;select disk given by register c
lxi h, 0000h ;error return code
mov a, c
sta diskno
cpi 4 ;must be between 0 and 3
rnc ;no carry if 4, 5,...
; disk number is in the proper range
ds 10 ;space for disk select
; compute proper disk Parameter header address
lda diskno
Appendix B : A Sekletal CBIOS CP/M Operating System Manual
B-5