User`s guide
; file not there, give error message and return
0112 11f301 lxi d,opnmsg
0115 cd9c0l call err
0118 c35101 jmp finis ;to return
openok: ;open operation ok, set buffer index to end
0lib 3e80 mvi a,80h
0lid 321302 sta ibp ;set buffer pointer to 80h
; hl contains next address to print
0120 210000 lxi h,0 ;start with 0000
gloop:
0123 e5 push h ;save line position
0124 cda20l call gnb
0127 el pop h ;recall line position
0128 da5l0l jc finis ;carry set by gnb if end file
012b 47 mov b,a
; print hex values
; check for line fold
012c 7d mov a,l
012d e80f ani 0fh ;check low 4 bits
012f c24401 jnz nonum
; print line number
0132 cd7201 call crlf
; check for break key
0135 cd590l call break
; accum lsb = 1 if character ready
0138 0f rrc ;into carry
0139 da5l0l jc finis ;do not print any more
013c 7c mov a,h
013d cdBf0l call phex
0140 7d mov a,l
0141 cd8f0l call phex
nonum:
0144 23 inx h ;to next line number
0145 3e20 mvi a,' '
0147 cd650l call pchar
014a 78 mov a,b
014b cd8f0l call phex
014e c32301 jmp gloop
4-6
4.2 A Sample File Dump Utility CP/M 3 Programmer's Guide