.nf 1 Introduction to CP/M-8000 . . . . . . . . . . . . . . . . . 1 1.1 CP/M-8000 System Architecture . . . . . . . . . . . . 1 1.2 Transient Programs . . . . . . . . . . . . . . . . . . 2 1.3 File System Access . . . . . . . . . . . . . . . . . 2 1.4 Programming Tools and Commands . . . . . . . . . . . 2 1.5 CP/M-8000 File Specification . . . . . . . . . . . . . 5 1.6 Wildcards . . . . . . . . . . . . . . . . . . . . . . 6 1.7 CP/M-8000 Terminology . . . . . . . . . . . . . . . . . 7 2 The CCP and Transient Programs . . . . . . . . . . . . . . 9 2.1 CCP Built-In and Transient Commands . . . . . . . . . 9 2.2 Loading A Program In Memory . . . . . . . . . . . . . . 10 2.2.1 Base Page Initialization By The CCP . . . . . 10 2.2.2 Loading Multiple Programs . . . . . . . . . . 10 2.2.3 Base Page Initialization By A Transient Progra 11 2.3 Exiting Transient Programs . . . . . . . . . . . . . . 11 2.4 Transient Program Execution Model . . . . . . . . . . 12 3 Command File Format . . . . . . . . . . . . . . . . . . . 15 3.1 The Header and Program Segments . . . . . . . . . . . 15 3.2 The Symbol Table . . . . . . . . . . . . . . . . . . 17 3.2.1 Printing The Symbol Table . . . . . . . . . . 19 3.3 Relocation Information . . . . . . . . . . . . . . . 19 3.3.1 The Format of A Relocation Word . . . . . . . 20 4 Basic Disk Operating System Functions . . . . . . . . . . 23 4.1 BDOS Functions and Parameters . . . . . . . . . . . . 24 4.1.1 Invoking BDOS Functions . . . . . . . . . . . . 24 4.1.2 Organization Of BDOS Functions . . . . . . . . 25 4.2 File Access Functions . . . . . . . . . . . . . . . . 25 4.2.1 A File Control Block (FCB) . . . . . . . . . . 26 4.2.2 File Processing Errors . . . . . . . . . . . . 28 4.2.3 Open File Function . . . . . . . . . . . . . . 31 4.2.4 Close File Function . . . . . . . . . . . . . . 32 4.2.5 Search For First Function . . . . . . . . . . 33 4.2.6 Search For Next Function . . . . . . . . . . . 34 4.2.7 Delete File Function . . . . . . . . . . . . . 35 4.2.8 Read Sequential Function . . . . . . . . . . . 36 4.2.9 Write Sequential Function . . . . . . . . . . 37 4.2.10 Make File Function . . . . . . . . . . . . . 39 4.2.11 Rename File Function . . . . . . . . . . . . 40 4.2.12 Set Direct Memory Access (DMA) Address . . . 41 4.2.13 Set File Attributes Function . . . . . . . . 42 4.2.14 Read Random Function . . . . . . . . . . . . 44 4.2.15 Write Random Function . . . . . . . . . . . . 46 4.2.16 Compute File Size Function . . . . . . . . . . 48 4.2.17 Set Random Record Function . . . . . . . . . 49 4.2.18 Write Random With Zero Fill Function . . . . 51 4.3 Drive Functions . . . . . . . . . . . . . . . . . . . 52 4.3.1 Reset Disk System Function . . . . . . . . . . 53 4.3.2 Select Disk Function . . . . . . . . . . . . . 54 4.3.3 Return Login Vector Function . . . . . . . . . 55 4.3.4 Return Current Disk Function . . . . . . . . . 56 4.3.5 Write Protect Disk Function . . . . . . . . . 57 4.3.6 Get Read-Only Vector Function . . . . . . . . 58 4.3.7 Get Disk Parameters Function . . . . . . . . . 59 4.3.8 Reset Drive Function . . . . . . . . . . . . . 61 4.3.9 Get Disk Free Space Function . . . . . . . . . 62 4.3 Character I/O Functions . . . . . . . . . . . . . . . 62 4.4.1 Console I/O Functions . . . . . . . . . . . . 64 Console Input Function . . . . . . . . . . . . 64 Console Output Function . . . . . . . . . . . 65 Direct Console I/O Function . . . . . . . . . 66 Print String Function . . . . . . . . . . . . 68 Read Console Buffer Function . . . . . . . . . 69 Get Console Status Function . . . . . . . . . 71 4.4.2 Additional Serial I/O Functions . . . . . . . . 72 Auxiliary Input Function . . . . . . . . . . . 72 Auxiliary Output Function . . . . . . . . . . 73 List Output Function . . . . . . . . . . . . . 74 4.4.3 I/O Byte Functions . . . . . . . . . . . . . . 74 Get I/O Byte Function . . . . . . . . . . . . 76 Set I/O Byte Function . . . . . . . . . . . . 77 4.5 System/Program Control Functions . . . . . . . . . . 77 4.5.1 System Reset Function . . . . . . . . . . . . 78 4.5.2 Return Version Number Function . . . . . . . . 79 4.5.3 Set/Get User Code . . . . . . . . . . . . . . 81 4.5.4 Chain To Program Function . . . . . . . . . . 82 4.5.5 Flush Buffers Function . . . . . . . . . . . . 83 4.5.6 Direct BIOS Call Function . . . . . . . . . . 84 4.5.7 Program Load Function . . . . . . . . . . . . 85 4.6 Exception Functions . . . . . . . . . . . . . . . . . 87 4.6.1 Set Exception Vector Function . . . . . . . . 88 4.6.2 Set Supervisor State . . . . . . . . . . . . . 91 4.6.3 Get/Set TPA Limits . . . . . . . . . . . . . . 92 5 AS68 Assembler . . . . . . . . . . . . . . . . . . . . . . 97 5.1 Assembler Operation . . . . . . . . . . . . . . . . . 97 5.2 Initializing AS68 . . . . . . . . . . . . . . . . . . 97 5.3 Invoking the Assembler (AS68) . . . . . . . . . . . . 97 5.4 Assembly Language Directives . . . . . . . . . . . . 100 5.5 Sample Commands Invoking AS68 . . . . . . . . . . . . 106 5.6 Assembly Language Differences . . . . . . . . . . . . 106 5.7 Assembly Language Extensions . . . . . . . . . . . . 108 5.8 Error Messages . . . . . . . . . . . . . . . . . . . 109 6.0 L068 Linker . . . . . . . . . . . . . . . . . . . . . . 111 6.1 Linker Operation . . . . . . . . . . . . . . . . . . 111 6.2 Invoking the Linker (L068) . . . . . . . . . . . . . 111 6.3 Sample Commands Invoking L068 . . . . . . . . . . . . 114 6.4 L068 Error Messages . . . . . . . . . . . . . . . . . 114 7.1 Archive Utility . . . . . . . . . . . . . . . . . . . 115 7.1.1 AR68 Syntax . . . . . . . . . . . . . . . . . 115 7.1.2 AR68 Operation . . . . . . . . . . . . . . . . 117 7.1.3 AR68 Commands and Options . . . . . . . . . . 117 7.1.4 Errors . . . . . . . . . . . . . . . . . . . . 122 7.2 DUMP Utility . . . . . . . . . . . . . . . . . . . . . 122 7.2.1 Invoking DUMP . . . . . . . . . . . . . . . . 122 7.2.2 DUMP Output . . . . . . . . . . . . . . . . . 123 7.2.3 DUMP Examples . . . . . . . . . . . . . . . . 124 7.3 Relocation Utility . . . . . . . . . . . . . . . . . 124 7.3.1 Invoking RELOC . . . . . . . . . . . . . . . . 124 7.3.2 RELOC Examples . . . . . . . . . . . . . . . . 125 7.4 SIZE68 Utility . . . . . . . . . . . . . . . . . . . 126 7.4.1 Invoking SIZE68 . . . . . . . . . . . . . . . 126 7.4.2 SIZE68 Output . . . . . . . . . . . . . . . . 126 7.4.3 SIZE68 Examples . . . . . . . . . . . . . . . 127 7.5 SENDC68 Utility . . . . . . . . . . . . . . . . . . . 128 7.5.1 Invoking SENDC68 . . . . . . . . . . . . . . . 128 7.5.2 SENDC68 Example . . . . . . . . . . . . . . . 129 8 DDT-8000 . . . . . . . . . . . . . . . . . . . . . . . . . 131 8.1 DDT-8000 Operation . . . . . . . . . . . . . . . . . . 131 8.1.1 Invoking DDT-8000 . . . . . . . . . . . . . . . 131 8.1.2 DDT-8000 Command Conventions . . . . . . . . . 131 8.1.3 Specifying Address . . . . . . . . . . . . . . 132 8.1.4 Terminating DDT-8000 . . . . . . . . . . . . . 132 8.1.5 DDT-8000 Operation with Interrupts . . . . . . 132 8.2 DDT-8000 Commands . . . . . . . . . . . . . . . . . . 133 8.2.1 The D (Display) Command . . . . . . . . . . . 133 8.2.2 The E (Load for Execution) Command . . . . . . 134 8.2.3 The F (Fill) Command . . . . . . . . . . . . . 134 8.2.4 The G (Go) Command . . . . . . . . . . . . . . 135 8.2.5 The H (Hexadecimal Math) Command . . . . . . . 135 8.2.6 The I (Input Command Tail) Command . . . . . . 135 8.2.7 The L (List) Command . . . . . . . . . . . . . 136 8.2.8 The M (Move) Command . . . . . . . . . . . . . 136 8.2.9 The R (Read) Command . . . . . . . . . . . . . 137 8.2.10 The S (Set) Command . . . . . . . . . . . . . 137 8.2.11 The T (Trace) Command . . . . . . . . . . . . 138 8.2.12 The U (Untrace) Command . . . . . . . . . . . 138 8.2.13 The V (Value) Command . . . . . . . . . . . . 139 8.2.14 The W (Write) Command . . . . . . . . . . . . 139 8.2.15 The X (Examine CPU State) Command . . . . . . 139 8.3 Assembly Language Syntax for A and L Commands . . . . 141 E.1 AR68 Error Messages . . . . . . . . . . . . . . . . . 157 E.1.1 Fatal Diagnostic Error Messages . . . . . . . 157 E.1.2 AR68 Internal Logic Error Messages . . . . . . 160 E.2 AS68 Error Messages . . . . . . . . . . . . . . . . . 161 E.2.1 AS68 Diagnostic Error Messages . . . . . . . . 161 E.2.2 User-recoverable Fatal Error Messages . . . . 167 E.2.3 AS68 Internal Logic Error Messages . . . . . . 171 E.3 BDOS Error Messages . . . . . . . . . . . . . . . . . 171 E.4 BIOS Error Messages . . . . . . . . . . . . . . . . . 175 E.5 CCP Error Messages . . . . . . . . . . . . . . . . . 176 E.5.1 Diagnostic Error Messages . . . . . . . . . . 176 E.5.2 CCP Internal Logic Error Messages . . . . . . 179 E.6 DDT-8000 Error Messages . . . . . . . . . . . . . . . 180 E.6.1 Diagnostic Error Messages . . . . . . . . . . 180 E.6.2 DDT-8000 Internal Logic Error Messages . . . . 186 E.7 DUMP Error Messages . . . . . . . . . . . . . . . . . 187 E.8 LO68 Error Messages . . . . . . . . . . . . . . . . . 187 E.8.1 Fatal Diagnostic Error Messages . . . . . . . 187 E.8.2 LO68 Internal Logic Error Messages . . . . . . 191 E.9 NM68 Error Messages . . . . . . . . . . . . . . . . . 191 E.10 RELOC Error Messages . . . . . . . . . . . . . . . . 192 E.11 SENDC68 Error Messages . . . . . . . . . . . . . . . 195 E.11.1 Diagnostic Error Messages . . . . . . . . . . 196 E.11.2 SENDC68 Internal Logic Error Messages . . . . 197 E.12 SIZE68 Error Messages . . . . . . . . . . . . . . . . 197 F New Functions and Implementation Changes . . . . . . . . . 199 F.1 BDOS Function and Data Structure Changes . . . . . . 199 F.2 BDOS Functions Not Supported By CP/M-8000 . . . . . . 200