User`s guide
phex: ;Print hex char in reg a
018f f5 push psw
0190 0f rrc
0191 0f rrc
0192 0f rrc
0193 0f rrc
0194 cd7d0l call pnib ;print nibble
0197 fi pop pSW
0198 cd7d0l call pnib
018b c9 ret
err: ;Print err0r message
; d,e addresses message ending With"$"
019c 0e09 mvi c,printf ;print buffer functi0n
019e cd0S00 call bdos
0lal c9 ret
gnb ;get next byte
01a2 3a1302 lda ibp
0la5 fe80 cPi 80h
01a7 c2b301 jnz g0
; read another buffer
0laa cdce0l call diskr
0lad b7 ora a ;zero value if read ok
0lae cab30l jz g0 ;for another byte
; end of data, return With carry Set for eof
0lbi 37 stc
01b2 c9 ret
g0: ;read the byte at buff+reg a
01b3 5f mov e,a ;ls byte of buffer index
01b4 1600 mvi d,0 ;double precision index to de
01b6 3c inr a ;index=index+l
01b7 321302 sta ibp ;back to memory
; Pointeris incremented
; save the current file address
0lba 218000 lxi h,buff
0lbd 19 dad d
; abs0lute character address is in hl
0lbe 7e mov a,m
; byte is in the accumulator
0lbf b7 ora a ;reset carry bit
0lc0 c9 ret
4-8
setup: ;set up file
4.2 A Sample File Dump Utility CP/M 3 Programmer's Guide