Files
Sepp J Morris 31738079c4 Upload
Digital Research
2020-11-06 18:50:37 +01:00

88 lines
4.6 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[READ.ME]
The Programmer's CP/M Handbook Source Code Examples
Version 1.0 August 18, 1983
(c) 1983 Johnson-Laird Inc.
Wå havå trieä tï includå aó manù oæ thå exampleó froí thå CP/Í <20>
Programmer'ó Handbooë aó waó possiblå tï fiô ontï 2 single-sided
single-density diskettes (or alternately, ± single-densitù <20>
double-sideä "flippy" diskette)® Ouò originaì intentioî waó tï <20>
includå thå sourcå codå foò everù figurå iî thå booë aó welì aó alì <20>
thå examplå listingó iî Chapteò 5® Sincå thió proveä tï bå impossiblå <20>
tï fiô ontï twï diskettes¬ wå havå choseî thoså figureó anä exampleó <20>
whicè wå felô woulä bå thå mosô useful® Thå onlù majoò omissioî ió <20>
Figurå 9-´ whicè dealó witè baä sectoò management®
Wå havå fixeä onå buç anä addeä onå linå tï Figurå 8-10® Thió ió <20>
noteä iî thå sourcå code® Thå lineó whicè werå lefô ouô iî thå booë <20>
afteò pagå 26± arå alsï included® Yoõ maù noticå somå minoò <20>
differenceó iî capitalization¬ indentation¬ etc® iî thå commentó wherå <20>
wå havå noô includeä changeó madå iî copyediting.
Wå woulä appreciatå hearinç froí you¬ especiallù abouô anù bugs¬ <20>
typos¬ otheò horriblå goofs¬ suggestionó foò improvements.
Contents of Diskette No 1
Filename Page No. Figure Title
FIG5-2.ASÍ 70 Equateó foò BDOÓ functioî codå numbers
FIG5-3.ASM 74 Write console byte example, output null-byte
terminated message from specified address
FIG5-4.ASÍ  7´  Writå consolå bytå example¬ outpuô null-bytå
terminateä messagå followinç calì tï subroutine
FIG5-5.ASM 76 Read line from reader device
FIG5-6.ASM 78 Write line to punch device
FIG5-7.ASM 79 Write line to list device
FIG5-8.ASÍ 8± Read/Writå strinç from/tï consolå usinç ra÷ I/O
FIG5-10.ASM 86 IOBYTE equates
FIG5-11.ASM 87 Simple terminal emulator
FIG5-12.ASM 89 Display $-terminated message on console
FIG5-13.ASM 92 Read console string for keyboard options
FIG5-14.ASM 95 Determine the CP/M version number
FIG5-15.ASM 96 Reset requested disk drive
FIG5-16.ASM 100 Open file request
FIG5-17.ASÍ 10´ Searcè first/nexô calló foò ambiguouó filenamå
FIG5-18.ASM 110 Read next character from sequential disk file
FIG5-19.ASM 113 Write next character to sequential disk file
FIG5-20.ASM 115 Create file request
FIG5-21.ASM 117 Rename file request
FIG5-22.ASM 122 Set file attributes
FIG5-23.ASM 123 Get file attributes
FIG5-24.ASM 126 Accessing disk parameter block data
FUNCTN33.ASM 131 Example for function 33, read random
FIG5-25.ASM 135 Create random file
FIG5-26.ASM 136 Read/write variable length records randomly
FIG6-4.ASM 159 Simple BIOS listing
ŠFIG7-5.ASM 191 Example PUTCP/M
FIG7-7.ASM 198 Example CP/M cold bootstrap loader
FIG8-6.ASM 226 Device table equates
FIG10-5.ASM 363 Testbed for real time clock driver in the BIOS
FIG10-6.ASM 365 Testbed for disk I/O drivers in the BIOS
ERASE.Ã 41° Figurå 11-3¬ requestó confirmation before erasing
UNERASE.C 412 Figure 11-4, "revives" erased files
FIND.C 417 Figure 11-5, locates specific files or groups of files
SPACE.Ã 42° Figurå 11-6¬ displayó ho÷ mucè disë storage is used
or available
MOVE.C 424 Figure 11-7, "moves" files from one user to another
MAKE.C 428 Figure 11-8, makes files "invisible" and protected
or makes them "visible," accessible and unprotected
SPEED.C 431 Figure 11-9, sets the baud rate for a specific device
PROTOCOL.C 435 Figure 11-10, sets the protocol governing input and output
of a specified serial device
ASSIGN.C 439 Figure 11-11, assigns a logical devices input and output
to two or more physical devices
DATE.C 443 Figure 11-12, makes the current date part of the system
TIME.C 444 Figure 11-13, makes the current time part of the system
FUNKEY.C 446 Figure 11-14, sets the character strings associated with
specific function keys
Contents of Diskette 2
FIG8-10.ASM 237 Enhanced BIOS listing
FIG9-5.ASM 312 User-friendly disk error processor
FIG10-2.ASM 331 Debug subroutines
FIG10-4.ASM 355 Testbed for character I/O drivers
LIBRARY.C 372 Figure 11-1, commonly used functions in C
LIBRARY.H 390 Figure 11-2, code to be included at the beginning of
any program that calls LIBRARY functions in Figure 11-1