System information

0178 0E14 read: mvi c,readf
017A C30500 jmp bdos
;
017D 0E15 write: mvi c,writef
017F C30500 jmp bdos
;
0182 0E16 make: mvi c,makef
0184 C30500 jmp bdos
;
; console messages
0187 6E6F20736Fnofile: db 'no source file$'
0196 6E6F206469nodir: db 'no directory space$'
01A9 6F7574206Fspace: db 'out of dat space$'
01BA 7772697465wrprot:db 'write protected?$'
01CB 636F707920normal:db 'copy complete$'
;
; data areas
01D9 dfcb: ds 32 ; destination fcb
01F9 = dfcbcr: equ dfcb+32 ; current record
;
01F9 ds 32 ; 16 level stack
stack:
0219 end
Note that there are several simplifications in this particular program. First, there are no checks
for invalid filenames that could contain ambiguous references. This situation could be detected
by scanning the 32-byte default area starting at location 005CH for ASCII question marks. A
check should also be made to ensure that the filenames have been included (check locations
005DH and 006DH for nonblank ASCII characters). Finally, a check should be made to ensure
that the source and destination filenames are different. An improvement in speed could be
obtained by buffering more data on each read operation. One could, for example, determine the
size of memory by fetching FBASE from location 0006H and using the entire remaining portion
of memory for a data buffer. In this case, the programmer simply resets the DMA address to the
next successive 128-byte area before each read. Upon writing to the destination file, the DMA
address is reset to the beginning of the buffer and incremented by 128 bytes to the end as each
record is transferred to the destination file.
5.3 A Sample Copy Program CP/M Operating System Manual
5-39