User`s guide

; open the file for input
01c1 af xra a ;zero to accum
01c2 327c00 sta fcbcr ;clear current rec0rd
0lc5 115c00 lxi d,fcb
01c8 0e0f mvi c,openf
0lca cd0500 call bdos
; 255 in accum if open error
0lcd c9ret
diskr: ;read disk file record
0lce e5d5c5 Push h! Push d! Push b
0ldI 115c00 lxi d,fcb
01d4 0e14 mvi c,readf
01d6 cd0500 call bdos
01d9 c1d1e1 Pop b! Pop d! Pop h
0ldc c9 ret
; fixed message area
0ldd 46494c0 signon: db 'file dumP version 2.0$'
01f3 0d0a4e0 opnmsg: db cr,lf ,'no input file Present on disk$'
; variable area
0213 ibp: ds 2 ;input buffer Pointer
0215 oldsp: ds 2 ;entry sP value from ccP
; stack area
0217 ds 64 ;reserve 32 level stack
stktop:
0257 end
4-9
4.2 A Sample File Dump Utility CP/M 3 Programmer's Guide