
Contents Chapter 1 Introduction 1 1.1 Hello There . 1 1.2 Quick Start . 1 1.3 Support . 3 1.4 No Royalties, Of course! . 4 1.5 Objectives and Limitations . 4 1.6 System Requirements . 5 1.7 Potential System Incompatibilities . 5 1.7.1 Systems with a Non-Standard User Number Range . 5 1.7.2 CDB and Your System’s Restart Vectors . 6 1.7.3 BDOS and BIOS Calls On Some CP/M “Look-Alike” Systems . 6 1.8 How to Use The Compiler . 7 1.8.1 The Commands and Primary Data Files . 7 1.8.2 Configuration . 7 1.8.2.1 Compiling CCONFIG.C . 8 1.8.2.2 CC and CLINK configuration . 8 1.8.2.3 CC2 Configuration . 11 1.8.2.4 Run-Time Package Options . 11 1.8.2.5 STDIO.H and HARDWARE.H Configuration . 12 1.8.3 A Sample Compilation . 13 1.8.4 CC — The Parser . 13 1.8.5 CC2 — The Code Generator . 17 1.8.6 CLINK — The C Linker . 18 1.8.7 CLIB — The C Librarian . 22 1.9 CP/M “Submit” Files . 26 1.10 Operational Caveats . 26 1.11 Last Words . 27 Chapter 2 The CRL Function Format and Other Low-Level Mechanisms 29 2.1 Introduction . 29 2.2 The CRL Format in Detail . 29 2.2.1 CRL Directories . 29 2.2.2 External Data Area Origin and Size Specifications . 30 2.2.3 Function Modules . 30 2.2.3.1 List of Needed Functions . 31 2.2.3.2 Length of Body . 31 2.2.3.3 Body . 31 2.2.3.4 Relocation Parameters . 32 2.3 Register Allocation and Function Calling Conventions . 32 i 2.3.1 The Stack . 32 2.3.1.1 The Stack Pointer . 32 2.3.1.2 How Much Space Does the Stack Take Up? . 32 2.3.2 External Data . 33 2.3.3 Function Entry and Exit Protocols . 33 2.4 Re-entrant Coding . 35 2.5 Helpful Run-Time Subroutines Available in C.CCC (See CCC.ASM) . 35 2.5.1 Local and External Fetch Routines . 35 2.5.2 Formal Parameter Fetches . 36 2.5.3 Arithmetic and Logical Subroutines . 36 2.5.4 System Source Files . 36 2.6 Debugging Object Command Files Under CP/M . 37 2.6.1 Loading Programs and Setting Breakpoints . 37 2.6.2 Tracing Execution and Dumping the Values of Variables . 39 2.6.3 A Sample SID Debugging Session . 39 Chapter 3 The BDS C Standard Library on CP/M: A Function Summary 43 3.1 General Purpose Functions . 43 3.2 Character Input/Output . 54 3.3 Character and String Processing . 59 3.4 File I/O . 63 3.4.1 Introduction to BDS C File I/O Functions . 63 3.4.2 Filenames . 63 3.4.2.1 The Disk Designator Prefix . 63 3.4.2.2 The User Area Prefix . 63 3.4.3 Error Handling . 64 3.4.3.1 The Errno/Errmsg Functions . 64 3.4.3.2 Random-Record Overflow . 64 3.4.4 The Raw File I/O Functions . 64 3.4.5 The Buffered File I/O Functions . 69 Chapter 4 Notes to APPENDIX A of “The C Programming Language” 75 4.1 Introduction . 75 4.2 Notes to Appendix A . 76 Chapter 5 The RED Screen Editor 89 5.1 How To Install RED . 89 5.1.1 Run the Configuration Program . 89 5.1.1.1 Setting Defaults . 90 5.1.1.2 Selecting Control Keys . 91 5.1.1.3 Describing Your Terminal . 91 5.1.2 Compile and link RED . 92 5.1.3 Test and use RED . 93 5.1.4 (Optional) Run STEST . 93 5.1.5 Additional Features for RED Under BDS C v1.6 . 93 5.2 Reference Manual . 94 Starting RED . 94 Using Function and Control Keys . 95 Changing Modes . 96 ii Inserting Characters With Insert and Overtype Modes . 96 Inserting New Lines . 97 Moving The Cursor . 97 Deleting Characters and Lines . 98 Undoing Mistakes . 98 Splitting and Joining Lines . 98 Inserting Control Characters . 99 Repeating the Previous Function . 99 Using Commands . 99 Creating, Saving and Loading Files . 100 Leaving RED . 101 Searching for Patterns . 101 Moving Blocks of Lines . 104 Setting Tab Stops . 105 Enabling and Disabling Line Wrapping . 105 Listing the Buffer . 105 Deleting Multiple lines . ..
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages219 Page
-
File Size-