-CATALOG066ALGOLM HLPb ASM HLPASM2 HLPC HLP !"#$%&'C HLP(CBASIC HLPk)*+,-./0123456CBASIC2 HLP789:;<=>?@ABCDEF cod fil 'filename.AIN' which can then be executed by typing -- RUNALG filename wher 'filename i th nam o th fil 'filename.INT whic contain the ALGOL/M pseudo code. The options recognized by the ALGOL/M Compiler arP.HLP 7K HELP file system 66.3 CPM.HLP 31K CP/M 1.4 66.4 CPM2.HLP 37K CP/M 2.2 66.5 ASM.HLP 4K CP/M 1.4 ASM (assembler) 66.6 ASM2.HLP 4K CP/M 2.2 ASM (assembler) 66.7 MAC.HLP 8K CP/M MAC (macro assembler) 66.8 MBASIC.HLP 21K tures ALGOL-M LANGUAGE DESCRIPTION -- Input/Output ALGOL-M LANGUAGE DESCRIPTION -- Disk Access ALGOL-M Compiler Error Messages ALGOL-M Run-Time Error and Warning Messages :Invoking the ALGOL/M Compiler and Run-Time System ALGOL/M is invoked byCBASIC2 HLP/GHIJKLCPM HLPMNOPQRSTUVWXYZ[\CPM HLPs]^_`abcdefghijkrtran 66.16 PASCAL.HLP 10K PASCAL/MT THIS VOLUME WAS ASSEMBLED BY SIG/M, A USERS GROUP IN NEW JERSEY. M.HLP 8K MACRO-80 (M80) 66.13 ALGOLM.HLP 13K ALGOL-M 66.14 C.HLP 17K BDS 'C' 66.15 FORTRAN.HLP 7K Microsoft Fo Microsoft BASIC 66.9 CBASIC.HLP 14K CBasic 66.10 EBASIC.HLP 12K Basic-E 66.11 CBASIC2.HLP 22K CBasic-2 66.12 MASM.HLP 8K MACRO-80 (M80) 66.13 ALGOLM.HLP 13K ALGOL-M 66.14 C.HLP 17K BDS 'C' 66.15 FORTRAN.HLP 7K Microsoft Fo typing -- ALGOLM filename $option wher 'filename i th nam o th fil 'filename.ALG whic contain th sourc o th ALGOL/ program Upo executin thi command ALGOL/͠ wil compil thi sourc progra int th pseudCPMUG Volume 66 HELP file system on major system level software -CATALOG.066 CONTENTS OF CP/MUG VOLUME 66 SIG/M.LIB SUBMITTAL FORM UGFORM.LIB SUBMITTAL FORM VOL.# NAME SIZE COMMENTS 66.1 HELP.COM 2K HELP file system describing 66.2 HELInvoking the ALGOL/M Compiler and Run-Time System ALGOL/M Reserved Words ALGOL-M LANGUAGE DESCRIPTION ALGOL-M LANGUAGE DESCRIPTION -- Type Declarations ALGOL-M LANGUAGE DESCRIPTION -- Arithmetic Processing ALGOL-M LANGUAGE DESCRIPTION -- Control Struce -- $A Generate a listing at the terminal $E Set Trace Mode for execution under RUNALG $AE Do Both of the above :ALGOL/M Reserved Words AND ARRAY BEGIN CASE CLOSE DECIMAL DO ELSE END Ff a block in which a variable has been declared, the variable may not be referenced and, in fact, run-time storage space for that variable no longer exists. Functions, whening smaller than the maximum. Dimension bounds may be integer variables with the actual values assigned at run-time. Arrays may be of type integer, decimal or string. :ALGOL-M LANGUAGE DESCRIPTION -- Arithmmputer systems. However, the basic structure of ALGOL-M is similar enough to ALGOL-60 to allow simple conversion of programs from one language to the other. This was considered particularly important in constructs. Function and procedure calls are also used as control structures. ALGOL-M is a block stuctured language with a block normally bracketed by a BEGIN and an END. Blocks may be ngs is ten characters. Decimal and string variable lengths may be integer variables which can be assigned actual values at run-time. Another form of declaration in ALGOL-M is the array declarILE FUNCTION GO GOTO IF INTEGER NOT OF ONENDFILE OR PROCEDURE READ STEP STRING TAB THEN TO UNTIL WHILE WRITE WRITEON :ALGOL-M LANGUAGE DESCRIPTION Although ALGOL-M was modeled after ALGOL-60, no attempt The integer and decimal comparisons of less-than (<), greater-than (>), equal-to (=), not-equal-to (<>), less- than-or-equal-to (<=), and greater-than-or-equal-to (>=) are provided. Additionally, the letic Processing Integer and binary coded decimal arithmetic are supported under ALGOL-M. Integers may be used in decimal expressions and will be converted to decimals at run-time. view of the fact that the standard publication language is ALGOL-60. Therefore, there exists a large source of applications programs and library procedures which can be simply convenested within other blocks to nine levels. Variables which are declared within a block can only be referenced within that block or a block nested within that block. Once program control proceeds outside oation. Arrays may have up to 255 dimensions with each dimension ranging from 0 to +16,383. The maximum 8080 microprocesor address space of 63k bytes limits practical array sizes to someth was made to make it a formal subset of ALGOL-60. This was done intentionally in order to provide a language which would be best suited to the needs of applications programmers using microcoogical operators AND, OR and NOT are available. :ALGOL-M LANGUAGE DESCRIPTION -- Control Structures ALGOL-M control structures consist of BEGIN, END, FOR, IF THEN, IF THEN ELSE, WHILE, CASE and GOTO and +16,383. Decimals may be declared with up to 18 digits of precision and strings may be declared as long as 255 characters. The default precision for decimals is ten digits and the default length for strirted to execute under ALGOL-M. :ALGOL-M LANGUAGE DESCRIPTION -- Type Declarations ALGOL-M supports three types of variables: integers, decimals, and strings. Integers may be any value between -16,383 called, return an integer, decimal or string value depending on the type of the function. Procedures do not return a value when called. Both functions and procedures may have zero or more pararation. Files are normally treated as unblocked sequential files. However, if blocked files are desired, the record length may optionally be specified in brackets after the file name identifier in theain halted until values are re-entered on the console. :ALGOL-M LANGUAGE DESCRIPTION -- Disk Access ALGOL-M programs may read data from, or write data to, one or more disk files which may be located on one or integer, decimal and string variables or expressions may also be used in a write list. A WRITEON statement is also available which is essentially the same as the WRITE statement except that oud by a comma and an integer constant or variable. This integer value specifies the record within the file which is to be used for input/output. Prior to the use of a file name identifier in a READ ole input must be enclosed in quotation marks. A READ statement will result in a halt in program execution at run-time until the input values are typed at the console and a carriage return is sent. Ifmeters which are call by value and both may be called recursively. :ALGOL-M LANGUAGE DESCRIPTION -- Input/Output The ALGOL-M WRITE statement causes output to the console on a new line. The desired o name of the file may be assigned to the file name identifier when the program is written or it may be assigned at run-time. Various disk drives are referenced by the letters A through Z. A specific drive more disk drives. When file input or output is desired, the appropriate READ or WRITE statement is modified by placing a filename identifier immediately after READ or WRITE. The actualtput continues on the same line as the output from a previous WRITE or WRITEON statement. When a total of 80 characters have been written to the console, a new line is started automatically. A TAB option may al or WRITE statement, the file name identifier must appear in a file declaration statement. The file name identifier can only be referenced within the same block (or a lower block) as the file decla the values typed at the console match the read list in number and type, program execution continues. If an error as to number or type of variables from the console occurs, program execution is agutput is specified in a write list which is enclosed in parentheses. String constants may be used in a write list and are characterized by being enclosed in quotation marks. Any combination of may be specified by prefixing the actual file name with the desired drive letter followed by a colon. Additionally, if random file access is desired, the file name identifier may be followe followed by a read list of any combination of integer, decimal and string variables enclosed in parentheses. If embedded blanks are desired in the input for a string variable, the consso be used in the write list which causes the following item in the write list to be spaced to the right by a specifed amount. Console input is accomplished by the READ statement file declaration statement. :ALGOL-M Compiler Error Messages AS Function/Procedure on left hand side of assignment statement. BP Incorrect bound pair subtype (must be integer). DE Disk error; no corrective actik overflow(no more memory available). WARNING Messages AZ Attempt to allocate null decimal or string, system defaults to 10 digits/characters. DO Decimal overflow during store operation. The value of the variing. NT For clause,Step expression,Until clause expressions are not of the same subtype.(must all be integer or decimal). PC Number of parameters in procedure call does not match the number in the procedure declaration. Pger then the buffer size. DW Disk file write error. ER Variable block size write error. IO Integer overflow(integer value greater than 16383). IR Record number incorrect or random file is not initialized. ME Disk file creationon can be taken in the program. DD Doubly declared identifier, label, variable etc. FP Incorrect file open statement. IC Invalid special character. ID Subtypes incompatible (decimal values can not be assigned to of file on read. IA Integer addition/subtraction over/under flow result is set to 1. II Invalid Console Input. Try input again. IR Record number incorrect or random file is not initialized. IZ Integer division by zero. Divable is set to 1.0 and execution continues. The variable's allocation size should be increased in it's declaration statement. DI Disk file variable format error. DZ Decimal division by zero, result is set to 1.0. EF End D Undeclared parameter. PM Parameter type does not match the declared type. SO Stack overflow. SI Array subscript is not of subtype integer. TD Subtype has to be integer or decimal. TM Subtypes do not match or are incompa error. NA No AIN file found on directory. OV Decimal register overflow during arithmetic operation/ load. RE Attempt to read past end of record on blocked file. RU Attempt to random access a non-blocked file. SK Stacinteger variables). IO Integer overflow. IT Identifier is not declared as a simple variable or function. NG No ALG file found. NI Subtype is not integer. NP No applicable production exists. NS Subtype is not strisor set to 1 and division is completed. NX Negative exponential. Exponentiation not done. SO Characters lost during string store.  table overflow. Possibly caused by too many long identifiers. :ALGOL-M Run-Time Error and Warning Messages ERROR Messages AB Array subscript out of bounds. CE Disk file close error. DB Input field length is lartible. TO Symbol table overflow. TS Undeclared subscripted variable. UD Undeclared identifier. UF Undeclared file/function. UL Undeclared label. UP Undeclared procedure. US Undeclared simple variable. VO VarcInvoking the Assembler Assembler Pseudo-Ops Assembler In-Line Error Messages Assembler Console Error Messages :Invoking the Assembler The CP/M Assembler is invoked by typing -- ASM filename or ASM filename.parms where 'filenode ֠ Valu error operan encountere i expressio i improperl formed :Assembler Console Error Messages NO SOURCE FILE PRESENT The file specified in the ASM command does not which contains the source q : A,B,... - designates the disk name to receive the hex file Z - skips generation of the hex file r : A,B,... - designates the disk name which will receive the s write protected y CANNO CLOS FIL Outpu fil canno b closedchect see if disk i error labe canno appea i thi contex (ma b duplicate label) Π No implemented: feature whic wil appea i futur AS versions O Overflow: expression is too complicated to compute; siame' is the name of the file 'filename.ASM' to be assembled. In the case of the first command, the following files are created -- filename.HEX - "HEX" file containing machine code in Intel hex foRROR Source file cannot be read properly by the assembler, execute a TYPE to determine the point of error OUTPUT FILE WRITE ERROR Output files cannot be written prexist on disk NO DIRECTORY SPACE The disk directory is full, erase files which are not needed, and retry SOURCE FILE NAME ERROR Improperly formed ASM file name SOURCE FILE READ E print file X - outputs the listing to the console Z - skips generation of the print file :Assembler Pseudo-Ops ORG Set the program or data origin END End program EQU Nummplify Р Phas error labe doe no hav th sam valu o tw subsequent passes through the program Ҡ Registe error th valu specifie a registe i no compatible with the operation crmat filename.PRN - listing file I th cas o th secon command thes file ar create accordin to the parameters specified -- ASM filename.pqr where p : A,B,... - designates the disk name operly, most likely cause is a full disk, erase and retry CANNO CLOS FIL Outpu fil canno b closedchect see if disk ior Messages Ġ Dat error elemen i dat statemen canno b place i th specified data area Š Expressio error expressio i ill-forme an canno b computed at assembly line ̠ Labeeric equate SET Numeric set IF Begin conditional assembly ENDIF End conditional assembly DB Define data bytes DW Define data words DS Define data storage area :Assembler In-Line ErrInvoking the Assembler Assembler Pseudo-Ops Assembler In-Line Error Messages Assembler Console Error Messages :Invoking the Assembler The CP/M Assembler is invoked by typing -- ASM filename or ASM filename.parms where 'filenode ֠ Valu error operan encountere i expressio i improperl formed :Assembler Console Error Messages NO SOURCE FILE PRESENT The file specified in the ASM command does not which contains the source q : A,B,... - designates the disk name to receive the hex file Z - skips generation of the hex file r : A,B,... - designates the disk name which will receive the s write protected y CANNO CLOS FIL Outpu fil canno b closedchect see if disk i error labe canno appea i thi contex (ma b duplicate label) Π No implemented: feature whic wil appea i futur AS versions O Overflow: expression is too complicated to compute; siame' is the name of the file 'filename.ASM' to be assembled. In the case of the first command, the following files are created -- filename.HEX - "HEX" file containing machine code in Intel hex foRROR Source file cannot be read properly by the assembler, execute a TYPE to determine the point of error OUTPUT FILE WRITE ERROR Output files cannot be written prexist on disk NO DIRECTORY SPACE The disk directory is full, erase files which are not needed, and retry SOURCE FILE NAME ERROR Improperly formed ASM file name SOURCE FILE READ E print file X - outputs the listing to the console Z - skips generation of the print file :Assembler Pseudo-Ops ORG Set the program or data origin END End program EQU Nummplify Р Phas error labe doe no hav th sam valu o tw subsequent passes through the program Ҡ Registe error th valu specifie a registe i no compatible with the operation crmat filename.PRN - listing file I th cas o th secon command thes file ar create accordin to the parameters specified -- ASM filename.pqr where p : A,B,... - designates the disk name operly, most likely cause is a full disk, erase and retry CANNO CLOS FIL Outpu fil canno b closedchect see if disk ior Messages Ġ Dat error elemen i dat statemen canno b place i th specified data area Š Expressio error expressio i ill-forme an canno b computed at assembly line ̠ Labeeric equate SET Numeric set IF Begin conditional assembly ENDIF End conditional assembly DB Define data bytes DW Define data words DS Define data storage area :Assembler In-Line ErrInvoking BDS C using C.SUB Overview of the BDS C Language System Overview -- C Compiler, Pass 1 Overview -- C Compiler, Pass 2 Overview -- C Linker Overview -- C Librarian Overview -- C Skeleton File Variable Types Braces Variable Accessing ARIES.COM" file to be generated. At this point, the 8080 absolute machine code file is ready to be executed (for better or worse) as a transient command by CP/M. The first argument on the command line must be the name of a CRL file containing a "mai a dash (-): s causes undeclared identifiers to be implicitly declared as integer variables, wherever possible. hex digit (4-f) sets symbol table size to the specified value (in K bytes); default is 8 (5 for versions x.xT.) th use wil b give th chanc t abor processin a variou critica point i th proces b th executio o th ABORTSU  program I a erro ha occurre durin th previou processing, ABORT when this program is executecomplete. As for CC1, if a disk is specified explicitly as in A>cc2 c:yahoo then the .CCI file is loaded from the specified disk and the .CRL file is written to that same disk. On an 8080, execution time = about 35 lines/sec. :Overview -he source code. The file extension ".C" is NOT assumed for the input file, so saying "FOO" for "FOO.C" would not work. If the source file name is preceded by a disk designation, then the input is taken from the specified disk and the oup-1 C Library Special I/O using CIO :Invoking BDS C using C.SUB BDӠ à ma b invokin eithe b th conventiona mean o b usin th SUBMI fil C.SUB I th SUBMI fil i used i i engaged as follows -- SUBMIT akes the source file from disk B and writes the .CCI file to disk B (regardless of what the currently logged disk is.) On an 8080, speed is about 12 lines source/sec. :Overview -- C Compiler, Pass 2 CC2: This is the second half of the compile For example, A>cc1 foobar.c -s6 supresses errors for undefined variables and sets symbol table size to 6K bytes; A>cc1 zot.c -e sets symbol table size to 14K bytes. Note that the option list must contain no blanks. A>cc1 b:td.c td. :Overview of the BDS C Language System The main components of C are: 4 executable programs, a standard library file, and one skeleton run-time subroutine file. A description of each follows: :Overview -- C Compiler, Pass 1 CC1: Because- C Linker CLINK: This program links a "main" function from some CRL file together with C.CCC (for common system subroutines) and any subordinate functions which "main" may require (from perhaps many CRL files). A successful linkage causes a "ut is also written to that disk. If any errors are detected during CC1, the output file will not be written. In addition to the name of the source file, a few options may also be specified on the command line by preceding the option list withC filename wher 'filename i th nam o 'filename.C' th fil t compile Not tha th use i NO t t typ filename.C bu i jus t typ filename. A executio o th tw passe o th compile an th linke proceedsr. CC2 accepts a ".CCI" file as input, and writes out a ".CRL" file if no errors are detected. (CRL is mnemonic for 'C ReLocatable') If all goes well, writing out of the CRL file is followed by deletion of the "CCI" file, and compilation is ource file. CC1, the first half of the compiler, accepts a C source file with any filename and extension (say, "foo.c") and writes out a temporary file (with the same filename and extension ".CCI") containg a symbol table and an encoded form of t C loads the entire source file into memory in one shot, the compilation is broken up into two phases (not "passes", strictly; The two phases end up taking about 8 passes to actually implement), maximizing the amount of memory available for the sn" function. If the name is specified with an extension, then that extension is interpreted specially as indicating which disks are to be involved in the operation (this is akin to the mechanism ASM uses to determine source and destination disks.med to reside on A, and output goes to A. A>clink stoned -t7000 -s sets top of memory to 7000h and prints out load statistics. Current disk used for everything. Note that if the load statistics tell you that the "LAST ADDRESS" is greate instead of lxi sp,bdos. -o name Causes the .COM file generated to have the given name. Default is the name of the first .CRL file given (the one with the "main" function.) -e xxxx Sets start of data area to address xxxx example, the command A>clink b:zot.ac tells CLINK to get C.CCC and DEFF.CRL from disk A; to write the ouput file to disk C; and to find ZOT.CRL on disk B. Any other CRL files to search may also be specified on the command line (WITHOUT tAR.CRL and DEFF.CRL. All files are assumed to reside on the currently logged in disk. A>clink b:ihtfp belle -s searches for IHTFP.CRL and BELLE.CRL on disk B; prints a statistics summary when linkage is complete. The files DEFF.CRL and C.CCCthe keyboard to try resolving them. There are also several options which may be specified on the command line. Each option must be preceded by a dash (-); the space between options and their argument (if needed) is optional. The presently sup) For example, if the first argument to CLINK were given as: A>clink foo.bc then CLINK would interpret the "b" in ".bc" as specifying the disk on which "DEFF.CRL" and "C.CCC" are to be found, and the "c" in ".bc" as specifying which disk directly from CP/M instead of via the "exec" function, then ARGC & ARGV processing is suspended, since upon being chained to you wouldn't want ARGC & ARGV processing to take place. Note that if you use this option, you should a, to maintain consistency between several separate .COM files when chaining (via the library function "exec") is used. -c Specifies that the .COM file is to be chained to from another .COM file. If the resultant .COM file is invoked heir .CRL suffixes), causing those to be searched in the order specified. The default disk to search will be the same disk from which the original CRL file was taken; this default can be overridden by specifying an explicit disk designation for a are assumed to reside on the currently logged in disk; output also goes to the currently logged in disk. A>clink b:ihtfp.aa -s belle -o zot is the same as the last example except: the output file is called ZOT.COM, DEFF.CRL and C.CCC are assuported options are: -s Prints out load statistics; -t nnnn Reserves location nnnn (hex) and above for user; default is to reserve no space. What this really does is to cause the first op in the object file to be lxi sp,nnnn the .COM file is to be written to. Both of these values, if omitted, default to the currently logged in disk. The first argument may also be preceded by a disk designation, to specify where all .CRL files are to be searched for (by default). Forlso use the -e option to set the data area address equal to that of the chaining .COM file. Examples: A>clink foo bar gets "main" from the file FOO.CRL, searches for needed functions first in FOO.CRL and then, if needed, in BDEFF.CRL and C.CCC to reside, and the output would go to disk B also. When all given CRL files have been searched, CLINK will automatically search DEFF.CRL. If there are still some unresolved references, then CLINK will ask for input from ny appropriate CRL file name needing it. For example, A>clink c:foo.bb bar a:zot fraz causes disk C to be searched for the files FOO.CRL, BAR.CRL and FRAZ.CRL, while disk A would be searched to find ZOT.CRL. Disk B is where CLINK would expect r than the "TOP OF MEMORY", the program hasn't got the chance of a snowball in hell of running correctly. :Oveview -- C Librarian CLIB: This program maintains .CRL files, allows transfer of functions from one CRL file to another, etc. To invoears as: lxi h,foo dad b mov a,m inx h mov h,m mov m,a . To get an array element or structure element is even more hairy. Facts like this are enough to make me REALLY wish Intel had bothered to implement a double byte indirect t do some preprocessing and then interpret the program. BDS C is a true compiler, generating not-too-optimal but nevertheless quick 8080 code. For the gory details on the BDS C implementation, see my notes to APPENDIX A of the EXCELLENT book nt, closing all files which you altered, and typing control-C. The old version of any CRL file you change with CLIB is renamed to name.BRL (for Backup ReLative). A sample session of CLIB to, say, transfer the functions named "FOO", "BAR", substituted. Don't unless you have to; '{' and '}' take up less memory. The CONVERT program will perform this conversion, if necessary. :Variable Accessing Since all functions in C may be used recursively, all variable accessing is done rcontains the standard function library... all 60+ functions worth. See the BDS C User's Guide for documentation on these functions. :Overview -- C Skeleton File C.CCC: The run-time skeleton file, containing code for processing the command lke CLIB, just type A>clib Clib will print a line such as FUNCTION BUFFER SIZE = nnnnn specifying the largest function size that can be handled. Attempting to "transfer" or "extract" a function larger than this size could be destructive. be a two dimensional array of pointers to characters; char (*foo)(); declares foo to be a pointer to a function returning a character; char *foo, bar, zot[10]; declares foo to be a pointer to characters, bar to be a single char variab "The C Programming Language." :Variable Types Variable types supported: int char unsigned struct union arrays (of one or two dimensions) pointers simple combinations of the above For example, char *foo[10][15]; declares foo to and "ZOT" from a .CRL file named "DSSR" to one named "RTS" would go as follows: A>clib BD SOFTWARE C LIBRARIAN VERSION x.x FUNCTION BUFFER SIZE = xxxx BYTES * open 0 dssr * open 1 rts * t 0 1 foo * t 0 1 bar * t 0 1 zot * c elative to a base-of- stack-frame pointer, kept in the BC register pair during execution. Note that it takes 8 bytes of code to transfer a simple local variable whose address is (Base of stack pointer) + foo to the HL register pair; The code appine (generating argc and argv, for you UNIX lovers), room for file I/O buffers, some math subroutines, etc. Note on the BDS C compiler: THIS IS NOT AN INTERPRETER. Some hacks, such as BASIC-E, are billed as compilers but actually jus Next CLIB will prompt with a "*". Typing "h" at this point will give you a command summary. Basically, you work CLIB by opening one to six CRL files (which then become associated with "file numbers"), diddling the files to your hearts contele, ant zot to be an array of 10 characters. :Braces If your keyboard doesn't support the '{' and '}' characters (open and close brace, for those of you whose printer doesn't know about ascii 7B and 7D), the symbols 'begin' and 'end' may be second file (also named by number). The "close" command need only be given for files which have been altered; since DSSR wasn't written to in the above example, it didn't need to be closed, but RTS did need to be closed. DEFF.CRL: This file 1 * ^C A> ... The "open" commands prepare to do work on a .CRL file, and associate each .CRL file opened with a digit (0-5). The "transfer" commands tell CLIB to transfer the named function from the first file (named by file #) to the load instruction. Oh well. :ARIES-1 C Library Th followin ar th name o th routine availabl i th Librar DEFF.CRL The ar liste her a memor convenience an refer to the manual for further details. 1. General PuCONS -- Consol status Returne valu i n cha ready, 255 if char ready 1 CONIN -- Console input; Returned value = char typed 2 CONOUT -- Console output; Input value = char to output 3 Lbuf) struct buf *iobuf; struct buf *iobuf; fflush(iobuf) struct buf *iobuf; 5. Plotting Functions (for Memory-Mapped Video Boards) setplot(base,xsize,ysize) clrplot() plot(x,y,chr) char chr; putchar(c) puts(str) char *gets(str) char *str; char *str; printf(format,arg1,arg2,...) scanf(format,arg1,arg2,...) char *format; char *format; 3. String and Character Processing 3 LIST -- List output; Input value = char to output 4 PUNCH -- Punch output; Input value = char to output 5 READER -- Reader input; Returned value = char input :Special I/O using CIO CIO is called by -- utput, mode=2 - input and output} read(fd,buf,nbl) write(fd,buf,nbl) char *buf; char *buf; seek(fd,offset,code) tell(fd) fopen(filename,iobuf) fcreat(filename,iobuf) char *frpose Functions csw() exit() bdos(c,de) peek(n) poke(n,b) inp(n) outp(n,b) pause() sleep(n) call(adr,h,a,b,d) abs(n) srand(n) rand() setmem(adr, cio(fn) or cio(fn,arg) CI indexe directl int th BIO Jum Table 'fn i th inde offset an 'arg i a argumen passe (u t 1 bits) Th offsets and functions permitted are -- Offset Function txtplot(string,x,y,ropt) char *string; line(c,x1,y1,x2,y2) 6. Plotting Functions for Hazeltine 1500 clear() cplot(x,y,chr) char chr; ctxtplot(x,y,string) char *string; 7. Special I/O -- CIO isalpha(c) isupper(c) islower(c) isdigit(c) char c; char c; char c; char c; touppper(c) tolower(c) isspace(c) strcat(s1,s2) char c; char c; char c; char *s1, *s2; cio(fn) or cio(fn,arg) CI indexe directl int th BIO Jum Table 'fn i th inde offset an 'arg i a argumen passe (u t 1 bits) Th offset an function permitte ar -- Offset Function ilename; char *filename; struct buf *iobuf; struct buf *iobuf; getc(iobuf) putc(c,iobuf) struct buf *iobuf; char c; struct buf *iobuf; getw(iobuf) putw(w,iocount,byte) movmem(source,dest,count) qsort(base,nel,width,compar) char *source, *dest; char *base; int(*compar)(); exec(name) char *name; 2. Character Input/Output getchar() ungetch(c) kbhit() CONS -- Consol status Returne valu i n cha ready, 255 if char ready 1 CONIN -- Console input; Returned value = char typed 2 CONOUT -- Console output; Input value = char to output ) char **strptr; 4. File I/O creat(filename) unlink(filename) char *filename; char *filename; open(filename,mode) close(fd) char *filename; {mode=0 - input, mode=1 - o strcmp(s1,s2) strcpy(s1,s2) strlen(str) atoi(str) char *s1,*s2; char *s1,*s2; char *str; char *str; initw(array,string) initb(array,string) int *array; char *string; char *array, *string; getval(strptrIST -- List output; Input value = char to output 4 PUNCH -- Punch output; Input value = char to output 5 READER -- Reader input; Returned value = char input o (se sectio 13. o th manual to work. Toggle E is initially off. TOGGLŠ F Cause th compile outpu listin t b printe o th LST: device in addition to the system console. Toggle F is initially off. TOGGL Compile toggle ar serie o switche tha ca b se whe th compile i executed Th toggle ar se b typin dollar-sig ($ followe b th lette designation o th desire toggle startin on spac o mor afte th pr synta chec withou th overhea o writin th intermediat file. Toggle C is initially off. TOGGL D Suppresse translatio o lower-cas letter t upper-case Fo example i Toggl i on 'AMT wil no refe t th sam it th progra usin ED compil i usin CBASI (with the $B option to suppress listing), and run it using CRUN. Refer to the 84-page CBASIC manual -- C B A S I C A Commercially OrieB:VALIDATE $E CBASIC Compiler Toggles TOGGL B Suppresse th listin o th progra o th consol durin compilation I a erro i detected th sourc lin wit th erro an th erro messag wil b progra nam o th comman line Toggle ma onl be set for the compiler. Examples of compiler toggles and invocation forms are -- CBASIC INVENTRY $BGF B:CBASIC A:COMPARE $GEC CBASIC PAYROLL $B CBASIC CBASIC in General CBASIC Compile-Time Toggled Options Compiler Error Messages Run-Time Error Messages -- Warnings Run-Time Error Messages -- Error Codes CBASIC Reserved Words :CBASIC: CBASIC in General CBASIà i compile BASI whic ma variabl as 'amt'. Toggle D is initially off. TOGGLŠ E Cause th run-tim progra (CRUN t accompan an erro message wit th CBASI lin numbe i whic th erro occurred Toggl mus b se i orde fo th TRAC optinted Compiler/Interpreter BASIC Language Facility for CP/M Systems February 17, 1978 :CBASIC: CBASIC Compile-Time Toggled Options inte eve i Toggl i set Toggl doe not affect listing to the printer (Toggle F) or disk file (Toggle G). Toggle B is initially off. TOGGLŠ C Suppresse th generatio o a IN file Engagin thi toggl wil provid execute in a system smaller than 20K, a CP/M LOAD ERROR may occur. Th CBASI syste consist o tw program -- CBASI an CRUN CBASI i th compiler an CRU i th run-tim intepreter I typica CBASI session th use wil wrb execute o an flopp dis base CP/ syste havin a leas 20 byte o memory I orde t mak th bes us o th powe an flexibilit o CBASIC dua flopp dis syste an a leas 32 o memor i recommended I CBASI iŠ G Cause th compile outpu listin t b writte t diskette Th fil containin th compile listin ha th sam nam a the .BAS file, but its type is .LST. Toggle G is initially off. :CBASIC: Compiler Error Messages A string has been terminated by a carriage return rather than quotes. VO -- Variable Overflow Variable names are too long for one statement. This should not occur. WE -- WHILE Error The expression immediately following a Wn a IƠ evaluate t typ string. Only type numeric is permitted. IF -- In File variabl use i FIL statemen i o typ numeri wher typ string is required. IP -- Input Prompt An input prompt string is not surroundei ASCI character thi characte is ignored by the compiler, and a question mark is printed in its place. 2-Letter Error Codes CE -- Close Error The intermediate (.INT) file could not be closed. DE -- Disne contains a syntax error. SN -- Subscript Number A subscripted variable contains an incorrect number of subscripts. SO -- Syntax Overflow Th expressio i to comple an shoul b simplifie an place o more than one line. TOsio whic i no a unsubscripte numeri variabl i bein used as a FOR loop index. FN -- Function parameter Number A function reference contains an incorrect number of parameters. FP -- Function Parameter type functio referenc Text Messages NO SOURCE FILE: .BAS Th compile coul no locat sourc fil use i eithe CBASI command or an INCLUDE directive. PROGRAM CONTAINS n UNMATCHED FOR STATEMENT(S) There are nype string when type numeric is required. MM -- Mixed Mode Variable o typ strin an typ numeri ar combine i th sam expression. NI -- NEXT Index variabl reference b NEX statemen doe no matc th variabl refed by quotes. IS -- Invalid Subscript A subscripted variable was referenced before it was dimensioned. IU -- Invalid Use A variable defined as an array is used with no subscripts. MF -- Mixed Format An expression evaluates to tk Error A disk error occurred while trying to read the .BAS file. DF -- Disk Full Ther wa n spac o th dis o th dis director wa full Th .INT file was not created. DL -- Duplicate Line number Th sam lin numbe w -- Table Overflow Th progra i to larg fo th system Th progra mus b simplified or the system size increased. UL -- Undefined Line number A line number that does not exist has been referenced. US -- Undefined Stringparamete typ doe no matc th paramete typ used in the function's DEF statement. FU -- Function Undefined A function has been referenced before it has been defined. IE -- IF Expression A expressio use immediatel followi FOR statements for which a NEXT could not be found. PROGRAM CONTAINS n UNMATCHED WHILE STATEMENT(S) There are n WHILE statements for which a WEND could not be found. WARNING: INVALID CHARACTER IGNORED Th previou lin contain a invalrenced by the associated FOR statement. NU -- NEXT Unexpected A NEXT statement occurs without an associated FOR statement. OO -- ON Overflow More than 25 ON statements were used in the program. SE -- Syntax Error The source liential Format numbe i exponentia forma wa inpu wit n digit followin th E. FD -- Function Definition functio nam tha ha bee previousl define i bein redefine i a DEF statement. FI -- FOR Index A expresa use o tw differen lines Othe compile error ma caus D erro messag t b printe eve i duplicat lin numbers do not exist. DP -- Defined Previously A variable in a DIM statement was previously defined. EF -- ExponHILE statement is not numeric. WU -- WHILE Undefined A WEND statement occurs without an associated WHILE statement. :CBASIC: Run-Time Error Messages -- Warnings Tw textua run-tim erro message ar presente b CRUN: NO INTERMEDIATOE -- OPEN Error A attemp wa mad t OPE fil tha didn' exis an fo whic n I EN statemen ha bee previousl executed. OI -- ON Index Th expressio specifie i a O .. GOSU o a OΠ .. GOT statemen evrector o th dis i full. EF -- End of File rea pas th en o fil occurre o fil fo whic n IƠ EN statemen ha bee executed. ER -- Error in Record A attemp wa mad t writ recor o lengt greate tha 2-Letter Warning Codes DZ -- Divide by Zero numbe wa divide b zero Th resul i se t th larges vali CBASI number. FL -- Field Length fiel lengt greate tha 25 byte wa encountere durines tha o greate tha 20. NM -- No Memory There was insufficient memory to load the program. NN -- No Number field A attemp wa mad t prin numbe wit PRIN USIN statemen bu ther wa no numeri dat fiel i th t nul string. CE -- Close Error An error occurred upon closing a file. CU -- Close Undefined file clos statemen specifie fil numbe tha wa no active. DF -- Defined File A OPE o CREAT wa specifie wit E FILE fil nam wa no specifie wit th CRU command o n fil o typ .IN an th specifie fil nam wa foun o disk. IMPROPER INPUT - REENTER Thi messag occur whe th field entere fro th consol d no matc fil tha wa no active. IR -- Invalid Record number A record number less than one was specified. LW -- Line Width lin widt les tha o greate tha 13 wa specifie i a LPRINTE WIDT statement. ME -- MAKE Errth maximu recor siz specifie i th associate OPEN CREATE o FIL statement. FR -- File Rename A attemp wa mad t renam fil t a existin fil name. FU -- File Undefined A attemp wa mad t rea o writ t REA LINE Onl th firs 25 character o th recor ar retained. LN -- Logarithm error Th argumen give i th LO functio wa zer o negative Th valu o th argumen i returned. NE -- NEgative number negatiUSIN string. NS -- No String field A attemp wa mad t prin strin wit PRIN USIN statemen bu ther wa no strin fiel i th USIN string. OD -- Overflow Data REAĠ statemen wa execute wit n DAT available. fil numbe tha wa alread active. DU -- Delete Undefined file DELET statemen specifie fil numbe tha wa no active. DW -- Disk Write error A erro occurre whil writin t file Thi occur whe eithe th di th fiel specifie i th INPU statement Thi ca occu whe fiel type d no matc o th numbe o field entere i differen fro th numbe o field specified Al field specifie b th INPU statemen mus b reentered.or A erro occurre whil creatin o extendin fil becaus th dis director wa full. MP -- MATCH Parameter Th thir paramete i MATC functio wa zer o negative. NF -- Number of FILE Th fil numbe specifie wa l SQ -- SQuare root error negativ numbe wa specifie i th SQ function Th absolut valu i used. :CBASIC: Run-Time Error Messages -- Error Codes AC -- AsCii error Th strin use a th argumen i a AS functio evaluatev numbe wa specifie followin th rais t powe operato (^) Th absolut valu i use i th calculation. OF -- OverFlow calculatio produce numbe to large Th resul i se o th larges vali CBASI number. aluate t numbe les tha o greate tha th numbe o lin number containe i th statement. OM -- Overflow Memory The program ran out of memory during execution. QE -- Quote Error A attemp wa mad t PRIN t fil strpiler an CRU i th run-tim intepreter I typica CBASI session th use wil writ th progra usin ED compil i usin CBASI (with the $B option to suppress listing), and run it using CRUN. Refer to the 84-page CBASIC manual -- END LEFT$ POKE STEP E INPUT OR SIN DIM INT OUT SIZE ELSE LE PEEK SQR o mor tha 25 bytes. SS -- SubString error Th secon paramete o MID functio wa zer o negative. TF -- Too many Files A attemp wa mad t hav mor tha 2 activ file simultaneously. TL -- TAB Length TA staefined Functions :CBASIC2: CBASIC in General CBASIà i compile BASI whic ma b execute o an flopp dis base CP/ syste havin a leas 20 byte o memory I orde t mak th bes us o th powe an flexibilit o CBAS MATCH REMARK TO CLOSE GO MID$ RENAME USING CONSOLE GOSUB NE RESTORE VAL COS GOTO NEXT RETURN WEND CREATE GT NOT RIGHT$ WHILE in containin quotatio mark. RE -- READ Error A attemp wa mad t rea pas th en o recor i fixe file. RG -- RETURN with no GOSUB A RETURN occurred for which there was no GOSUB. RU -- Random Undefined randtemen containe paramete les tha o greate tha th curren lin width. UN -- UNdefined edit string PRIN USIN statemen wa execute wit nul edi string. WR -- WRite error A attemp wa mad t writ t fil afte iIC dua flopp dis syste an a leas 32 o memor i recommended I CBASI i execute in a system smaller than 20K, a CP/M LOAD ERROR may occur. Th CBASI syste consist o tw program -- CBASI an CRUN CBASI i th com DATA IF ON RND WIDTH DEF INP OPEN SGN XOR DELETE INPUT OR SIN DIM INT OUT SIZE ELSE LE PEEK SQR o rea o prin wa attempte t othe tha fixe file. SB -- SuBscript A arra subscrip wa use whic exceede th boundarie fo whic th arra wa defined. SL -- String Length concatenatio operatio resulte i strin CBASIC in General CBASIC2 Compile-Time Toggled Options XREF Cross Reference Facility Compiler Error Messages Run-Time Error Messages -- Warnings Run-Time Error Messages -- Error Codes CBASIC2 Reserved Words CBASIC2 Expression Hierarchy CBASIC2 PredNT STR$ AS FEND LINE RANDOMIZE SUB ASC FILE LOG READ TAB ATN FOR LPRINTER RECL TAN CALL FRE LT REM THEN CHR$ GE ha bee read bu befor i ha bee rea t th en o th file. :CBASIC: CBASIC Reserved Words CBASIC Reserved Words ABS EQ LEN POS STOP AND EXP LET PRI C B A S I C A Commercially Oriented Compiler/Interpreter BASIC Language Facility for CP/M Systems ntifier use i CBASIà program Th usag o th identifie (function parameter o global i provided a wel a lis o eac lin i whic tha identifie i used Th fil create ha th sam nam a th CBASI sourc fil an i e Engagin thi toggl wil provid synta chec withou th overhea o writin th intermediat file. Toggle C is initially off. TOGGL D Suppresse translatio o lower-cas letter t upper-case Fo example i TogglIN fil create unde CBASI wil no execut with the Version 2 Run-Time Monitor (CRUN2). For further information, refer to the 100-page reference manual -- C B A S I C A Commerciallyin wil b place o th sam sourc driv a th sourc file Th operato ma selec anothe driv b specifyin th desired drive, enclosed in parens, following the G toggle; for example, CBAS2 B:TAX $G(A:) extract CBAS2 PAYROLL $B CBAS2 B:VALIDATE $E CBASIC Compiler Toggles TOGGL B Suppresse th listin o th progra o th consol durin compilation I a erro i detected th sourc lin wit t February 17, 1978 CBASIC i a upward-compatabl (i term o sourc code extensio o th origina CBASIC I additio t al o th feature o th origina CBASIC, CBASIC2 adds the following: 1. Integ mus b se i orde fo th TRAC optio (se sectio 13. o th manual t work. Toggle E is initially off. TOGGLŠ F Cause th compile outpu listin t b printe o th LST: device in addition to the system console. i on 'AMT wil no refe t th sam variabl as 'amt'. Toggle D is initially off. TOGGLŠ E Cause th run-tim progra (CRUN2 t accompan an erro message wit th CBASI lin numbe i whic th erro occurred Toggl Oriented Compiler/Interpreter BASIC Language Facility for CP/M Systems Version 2 May 1, 1979 :CBASICs the source from drive B: and sends the listing to drive A:. Toggle G is initially off. :CBASIC2: XREF Cross Reference Facility Th XREF.CO͠ Cros Referenc utilit progra produce fil whic contain a alphabetize lis o al ideh erro an th erro messag wil b printe eve i Toggl i set Toggl doe not affect listing to the printer (Toggle F) or disk file (Toggle G). Toggle B is initially off. TOGGLŠ C Suppresse th generatio o a IN filer variables 2. Chaining with common variables 3. Additional pre-defined functions 4. Cross Reference capability Not tha CBASIC i upward-compatabl wit CBASI onl i term o th sourc cod files A Toggle F is initially off. TOGGLŠ G Cause th compile outpu listin t b writte t diskette Th fil containin th compile listin ha th sam nam a the .BAS file, but its type is .LST. Normall th dis listgle startin on spac o mor afte th progra nam o th comman line Toggle ma onl be set for the compiler. Examples of compiler toggles and invocation forms are -- CBAS2 INVENTRY $BGF B:CBAS2 A:COMPARE $GEC 2: CBASIC2 Compile-Time Toggled Options Compile toggle ar serie o switche tha ca b se whe th compile i executed Th toggle ar se b typin dollar-sig ($ followe b th lette designation o th desire togo typ XRF The standard output is 132 columns wide. The following command is used to invoke XREF -- XREF [disk ref] [$] ['title'] I th dis referenc i specified i instruct XRE a t wha disa wa inpu wit n digit followin th E. FA -- Function Attribute functio nam appear o th lef sid o a assignmen statemen but is not within that function. FD -- Function Definition functio nam tha ha bee pr Th compile ha ru ou o director entrie whil attemptin t create or extend a file. DISK ERROR A disk error occurred while trying to read or write to a disk file. INCLUDE NESTING TOO DEEP NEAR LINE n A includ states Toggl A Cause th listin t b otpu t th lis devic a wel as the disk file. Toggl B Suppresse outpu t th disk I onl th toggl i specified, no output is produced. Toggl C Suppresse outpu ting to read the .BAS file. DF -- Disk Full Ther wa n spac o th dis o th dis director wa full Th .INT file was not created. DL -- Duplicate Line number Th sam lin numbe wa use o tw differen lines Othe compi CONTAINS n UNMATCHED WHILE STATEMENT(S) There are n WHILE statements for which a WEND could not be found. WARNING: INVALID CHARACTER IGNORED Th previou lin contain a invali ASCI character thi characte is ignored by the compile to place the output on. The toggles are described on the next display. Th optiona titl fiel mus b th las fiel i th comman line Al character followin th firs apostroph o th comman lin u t th secon apostroph BN -- Bad Number An invalid numeric constant was encountered. CE -- Close Error The intermediate (.INT) file could not be closed. CI -- Close Include An invalid file name in an %INCLUDE statement. CS -- COMMON Statement error men nea lin i th sourc progra exceed th maximum level of nesting of source files. 2-Letter Error Codes BF -- Branch into Function A branch into a multiple line function from outside was attempted. th dis an permit outpu t th list device; same as A and B combined. Toggle D: Causes output to be 80 columns wide instead of 132. Toggle E: Produces output with only the identifiers and their usage. Fo example tle error ma caus D erro messag t b printe eve i duplicat lin numbers do not exist. DP -- Defined Previously A variable in a DIM statement was previously defined. EF -- Exponential Format numbe i exponentia formr, and a question mark is printed in its place. OUT OF DISK SPACE Th compile ha ru ou o dis spac whil attemptin t writ either the INT or LST files. Text Messages (Con't) OUT OF DIRECTORY SPACE o unti th en o th comman lin becom th title Th titl i truncate t 3 character i th listin i 13 column wid and 20 characters if the D toggle (80 column listing) is specified. XREF Toggle COMMO statemen whic wa no th firs statemen i th progra wa detected. CV -- COMMON Variable error An improper reference to a subscripte variable in a COMMON statement. DE -- Disk Error A disk error occurred while try.BAS Th compile coul no locat sourc fil use i eithe CBASI command or an INCLUDE directive. PROGRAM CONTAINS n UNMATCHED FOR STATEMENT(S) There are n FOR statements for which a NEXT could not be found. PROGRAMh followin comman produce cros referenc listin on the list device which is 80 columns wide -- XREF PROG $CD :CBASIC: Compiler Error Messages Text Messages NO SOURCE FILE: eviousl define i bein redefine i a DEF statement. FE -- FOR Error mixe mod expressio exist i FO statemen whic th compile cannot correct. FI -- FOR Index A expressio whic i no a unsubscripte numeri variabbe o field entere i differen fro th numbe o field specified Al field specifie b th INPU statemen mus b reentered. 2-Letter Warning Codes DZ -- Divide by Zero numbe wa divide b zerose a expressio o typ numeri t specif th fil t b loaded Thi expressio mus b string Possibl th quotation marks were left off a string constant. SN -- Subscript Number A subscripted variable contains an incorrect numeric is permitted. IF -- In File variabl use i FIL statemen i o typ numeri wher typ string is required. IP -- Input Prompt An input prompt string is not surrounded by quotes. IS -- Invalid Subscript A WHILE statement. :CBASIC: Run-Time Error Messages -- Warnings Tw textua run-tim erro message ar presente b CRUN: NO INTERMEDIATE FILE fil nam wa no specifie wit th CRU command o n fil o typ .IN an th spe-- NEXT Unexpected A NEXT statement occurs without an associated FOR statement. OF -- Out of Function branc ou o multipl lin functio fro insid th functio wa attempted. OO -- ON Overflow More than 25 ON statements wl i bein used as a FOR loop index. FN -- Function parameter Number A function reference contains an incorrect number of parameters. FP -- Function Parameter type functio referenc paramete typ doe no matc th paramete typfied or the system size increased. UL -- Undefined Line number A line number that does not exist has been referenced. US -- Undefined String A string has been terminated by a carriage return rather than quotes. VO -- Variable Overflow number of subscripts. SO -- Syntax Overflow Th expressio i to comple an shoul b simplifie an place o more than one line. TO -- Table Overflow Th progra i to larg fo th system Th progra mus b simplisubscripted variable was referenced before it was dimensioned. IT -- Invalid Toggle An invalid compiler directive was encountered. IU -- Invalid Use A variable defined as an array is used with no subscripts. MF -- Mixed Format Ancifie fil nam wa foun o disk. IMPROPER INPUT - REENTER Thi messag occur whe th field entere fro th consol d no matc th fiel specifie i th INPU statement Thi ca occu whe fiel type d no matc o th numere used in the program. PM -- ?? DE statemen appeare withi multipl lin function Function may not be nested. SE -- Syntax Error The source line contains a syntax error. SF -- SAVEMEM File SAVEME statemen u used in the function's DEF statement. FU -- Function Undefined A function has been referenced before it has been defined. IE -- IF Expression A expressio use immediatel followin a IƠ evaluate t typ string. Only type Variable names are too long for one statement. This should not occur. WE -- WHILE Error The expression immediately following a WHILE statement is not numeric. WU -- WHILE Undefined A WEND statement occurs without an associatedession is required. ND -- No DEFFN A FEND statement was encountered without a corresponding DEF. NI -- NEXT Index variabl reference b NEX statemen doe no matc th variabl referenced by the associated FOR statement. NU expression evaluates to type string when type numeric is required. MM -- Mixed Mode Variable o typ strin an typ numeri ar combine i th sam expression. MS -- Mixed String A numeric expression was used where a string expr Th resul i se t th larges vali CBASI number. FL -- Field Length fiel lengt greate tha 25 byte wa encountere durin REA LINE Onl th firs 25 character o th recor ar retained. LN -- Logarithm error d A attemp wa mad t prin strin wit PRIN USIN statemen bu ther wa no strin fiel i th USIN string. OD -- Overflow Data REAĠ statemen wa execute wit n DAT available. OE -- OPEN Error A attemp wa bee executed. ER -- Error in Record A attemp wa mad t writ recor o lengt greate tha th maximu recor siz specifie i th associate OPEN CREATE o FIL statement. FR -- File Rename A attemp wa mad lu i used. :CBASIC: Run-Time Error Messages -- Error Codes AC -- AsCii error Th strin use a th argumen i a AS functio evaluate t nul string. BN -- BUFF Number Th valu followin th BUF optio i a OPE o CREAT reatin o extendin fil becaus th dis director wa full. MP -- MATCH Parameter Th thir paramete i MATC functio wa zer o negative. NF -- Number of FILE Th fil numbe specifie wa les tha o greate tha 20. Nn specifie fil numbe tha wa no active. DF -- Defined File A OPE o CREAT wa specifie wit fil numbe tha wa alread active. DU -- Delete Undefined file DELET statemen specifie fil numbe tha wa no activ Th argumen give i th LO functio wa zer o negative Th valu o th argumen i returned. NE -- NEgative number negativ numbe wa specifie followin th rais t powe operato (^) Th absolut valu i use iname A file name was invalid. IR -- Invalid Record number A record number less than one was specified. IV -- Invalid Version A attemp wa mad t execut a IN fil create b Versio Compiler. IX -- ?? FEt renam fil t a existin fil name. FT -- File Toggle A FILE statement was executed when 20 files were already active. FU -- File Undefined A attemp wa mad t rea o writ t fil tha wa no active. IF -- Invalid File statemen i less than 1 or greater than 52. CC -- Chain Code chaine program' cod are i large tha th mai program' cod area. CD -- Chain Data chaine program' dat are i large tha th mai program' dat area.M -- No Memory There was insufficient memory to load the program. NN -- No Number field A attemp wa mad t prin numbe wit PRIN USIN statemen bu ther wa no numeri dat fiel i th USIN string. NS -- No String fiele. DW -- Disk Write error A erro occurre whil writin t file Thi occur whe eithe th director o th dis i full. EF -- End of File rea pas th en o fil occurre o fil fo whic n IƠ EN statemen ha th calculation. OF -- OverFlow calculatio produce numbe to large Th resul i se o th larges vali CBASI number. SQ -- SQuare root error negativ numbe wa specifie i th SQ function Th absolut vaNĠ statemen wa encountere prio t executin RETUR statement. LW -- Line Width lin widt les tha o greate tha 13 wa specifie i a LPRINTE WIDT statement. ME -- MAKE Error A erro occurre whil cg are i large tha th mai program's variable storage area. CS -- Chain SAVEMEM chaine progr reserve differenc amoun o memor wit SAVEME statement than the main program. CU -- Close Undefined file clos stateme CE -- Close Error An error occurred upon closing a file. CF -- Chain Function chaine program' constan are i large tha th mai program' constant area. CP -- Chain Var Storage chaine program' variabl stora mad t OPE fil tha didn' exis an fo whic n I EN statemen ha bee previousl executed. OI -- ON Index Th expressio specifie i a O .. GOSU o a OΠ .. GOT statemen evaluate t numbe les tha o grea>, - Reserv into the reserved area. Numeric Functions FRE ABS(x) INT(x) INT%(x) FLOAT(E LOG LPRINTER LT MATCH MID$ NE NEXT NOT ON OPEN OR OUT PEEK POKE POS PRINT RANDOMIZE READ RECL RECS REM REMARK RENAME RESTORE RETUR A RETURN occurred for which there was no GOSUB. RU -- Random Undefined rando rea o prin wa attempte t othe tha fixe file. SB -- SuBscript A arra subscrip wa use whic exceede th boundarie fo whic th arra TRUE is returned. CONCHAR% - Reads one character from the console device. Machine-Language Functions PEEK () - Return th content o th memor locatio give b th expres en o th file. :CBASIC: CBASIC Reserved Words ABS AND AS ASC ATN BUFF CALL CHAIN CHR$ CLOSE COMMAND$ COMMON CONCHAR% CONSOLE CONSTAT% COS CREATE DATA DEF te tha th numbe o lin number containe i th statement. OM -- Overflow Memory The program ran out of memory during execution. QE -- Quote Error A attemp wa mad t PRIN t fil strin containin quotatio mark. R The Hierarchy for expression evaluation is a follows -- 1. nested parentheses () 2. power operator ^ 3. * / 4. + - concatenation[+] unary[+ -] 5. relational operators: , - Low-orde eigh bit o secon expressio ar store i memor location selected by first expression. CALL - CALL a machine language program at address specified. SAVEMEM >= = <> LT LE GT GE EQ NE 6. NOT 7. AND 8. OR XOR :CBASIC2: Predefined Functions I/O Functions CONSTAT - Return th consol statu a a integer I ready logica th curren lin width. UN -- UNdefined edit string PRIN USIN statemen wa execute wit nul edi string. WR -- WRite error A attemp wa mad t writ t fil afte i ha bee read bu befor i ha bee rea t th Th secon paramete o MID functio wa zer o negative. TF -- Too many Files A attemp wa mad t hav mor tha 2 activ file simultaneously. TL -- TAB Length TA statemen containe paramete les tha o greate thai%) RND SGN(x) ATN(x) COS(x) EXP(x) LOG(x) [e] SIN(x) SQR(x) TAN(x) String Functions ASC(a$) CHR$(i%) LEFT$(a$,i%) LEN(a$) UCASE$( particula dis attache t CP/M Thes fil reference ca b eithe unambiguou (ufn o ambiguou (afn) A unambiguou fil referenc uniquel identifie singl file whil a ambiguou fil referenc ma b satisfied by a number Th fil subsyste support name fil structure allowin dynami allocatio o fil spac a wel a sequentia an rando fil access Usin thi fil system u t 6 distinc program ca b store i bot sourc an machine- . . [] FEND ne number>] DEF [] . wit littl o n modification Suc softwar include severa assembler (bot 808 an Z80) symboli debugger severa high-leve language (includin FORTRAΠ I֠ {compiler} BASIC- {translator} CBASI {translator} man interpprovide genera environmen fo progra construction storage an editing alon wit assembl an progra debu facilities A importan featur o CP/ i tha i ca b easil altere t execut wit an compute configuratio wha$) MATCH(a$,b$,i%) MID$(a$,i%,j%) RIGHT$(a$,i%) STR$(x) VAL(a$) COMMAND$ SADD(a$) Disk Functions RENAME(a$,b$) SIZE(a$) User-Defined Functions 2. ED: A Context Editor for the CP/M Disk System 3. ASM: CP/M Assembler User's Manual 4 DDT CP/ Dynami Debuggin Too User' Manual 5. CP/M Interface Guide 6. CP/M System Alteration Guide executabl form. Digita Research th designe o CP/M ha provide se o si manual whic describ th us an operatio o CP/ i detail. These manuals are: 1 A Introductio t CP/ Feature an Facilities General Information on CP/M CP/M File References CP/M Line Editing and Output Control CP/M Built-In Commands CP/M Transient Commands Physical Device Assignments for ARIES-1 CP/M STAT Command CP/M PIP Command CP/M ED Command CP/M ASM Command CP/M retiv BASICs ALGOL FOCAL an C) an severa special-purpos application program (suc a tex formattin system an accountin systems). :CP/M File References fil referenc identifie particula fil o grou o file o ic use a Inte 808 o Zilo Z8 Microprocesso an ha a leas 16 byte o mai memor wit u t fou IBM-compatabl diskett drives. Th CP/ monito provide acces t program throug comprehensiv fil managemen system The general forms are -- [] DEF [] = and [] DEF [] . A th reade ca see CP/ support contex editor a assemble (Intel-compatable) an debugge system Thes ar availabl i th basi CP/ package Ther i larg variet o othe softwar availabl whic ca ru unde CP/ CP/ i monito contro progra fo microcompute syste developmen whic use IBM-compatibl flexibl disk (flopp disks fo mas storage Usin microcompute mainfram base o Intel' 808 o Zilog' Z8 microprocessor CP/͠ LOAD Command The UNLOAD Command CP/M DDT Command The ZDT Command CP/M SYSGEN Command CP/M SUBMIT Command CP/M BDOS -- Basic I/O Operations CP/M BDOS -- Basic Disk Operations CP/M File Types CP/M BIOS Jump Vector :General Information on CP/M of different files. A unambiguou fil referenc i a exac nam o th specifie file I consist o u t eigh character i th fil nam an thre character in the file type. An unambiguous file reference is of the form -- Periphera Interchang Progra fo subsequen disk file and peripheral transfer operations. ED Load and execute the CP/M text editor program. SUBMIT Submit a file of commands for batch processing. ing Ctrl-C returns control to CP/M. Inpu line ca generall b u t 25 character i length The ar not acted upon until the carriage return key is typed. :CP/M Built-In Commands CP/M supports five built-in commands -- il nam i th '? position Fo example X?Y.C?͠ wil matc XZY.CO an X3Y.CEM Th '* symbo i use t matc al character o fil nam o fil type Fo example *.CO wil matc XZY.COM and HELP.COM, while HELP.* will match HELP.Cth ASCI sourc fil uf o th currentl logged-i dis a th console device. :CP/M Transient Commands The CP/M standard transient commands are -- STAԠ Lis th numbe o byte o stora Other control functions affect console output -- Ctrl-P Copy all subsequent console output to the currently- assigned list device (LST:). Output is sent to both the list device and the cons pppppppp.sss Th character use i specifyin a unambiguou fil referenc ma not contain any of -- < > . , ; : = ? * [ ] A ambiguou fil referenc i use fo director searc an patter matchingb liste o th consol device Al file ar liste i n af i given. REΠ ufn1=ufn -- Th RE (rename comman allow th use t chang th name o file o disk Th fil satis ER af -- Th ER (erase comman remove file fro th currently logged-in disk. DIҠ af -- Th DI (directory comman cause th name o al file whic satisf th ambiguou fil nam af t OM and HELP.HLP. :CP/M Line Editing and Output Control The following are the line editing functions supported by CP/M -- rubout Delete and echo the last character typed at the console. Ctrl-U Deleg remainin o th currentl logged-i disk provid堠 statistica informatio abou particula files an displa o alter device assignment. PI Loa th ole device until the next Ctrl-P is typed. Ctrl-S Stop the console output temporarily. Program execution and output continue when the next character is typed at the console. Typ Th for o a ambiguou fil referenc i simila t a unambiguou reference excep th symbo '? ma b intersperse throughou th fil reference I variou command throughou CP/M th '? symbo matche an characte o ffyin ufn is changed to ufn1. SAVŠ uf -- Th SAV comman place page (256-byt blocks onto disk from the TPA and names this file ufn. TYPŠ uf -- Th TYP comman display th content o carriage is returned, but line is not sent until the carriage return key is depressed. Ctrl-C CP/M system reboot (warm start). Ctrl-Z End input from the console (used in PIP and ED). te the entire line typed at the console. Ctrl-X Same as Ctrl-U. Ctrl-R Retype current command line: types a "clean line" following character deletion with rubouts. Ctrl-E Physical end of line: AS͠ Loa th CP/ assemble an assembl th specifie program from disk. LOAĠ Loa th fil i Inte "hex machin cod forma an produc fil i machin executabl forvice names are -- CON: The system console device RDR: The paper tape reader device PUN: The paper tape punch device LST: The output list device The valid owing is generated -- RECS BYTS EX D:FILENAME.TYP rrrr nnnK ee d:pppppppp.sss where rrrr -- number of 128-byte records allocated to the file nnnK -- number of bytes (in K, K=102ysical Device CON: TTY: Model 43 Teletype CRT: Hazeltine 1500 CRT BAT: CRT and Modem UC1: In=CRT, Out=CRT and Modem RDR: TTY: PTP: UP1: UP2: LST: = TTY: CRT: LPT: UL1: STAT DEV: Displa th curren logica t physica devic mapping Fo example, the list may appear as -- CON: = CRT: PUN: = PTP: like x: R/W, SPACE: nnnK -- if disk is Read/Write x: R/O, SPACE: nnnK -- if disk is Read Only STAT x: Calculate the storage remaining on the specified drive and print BYTES REMAINING ON x: nnnK STAT whic ca b loade int th TP (thi loade progra become ne command under the CCP). DDT Load the CP/M debugger into the TPA and execute it. DUMP Dump the contents of name STAT x:=R/O Se th specifie driv t Rea Only Thi i cleare b war boot. When a disk is Read Only, the message BDOS ERR ON x: READ ONLY will appear if there is an attempt to wri4) allocated to the file nnn = rrrr * 128 / 1024 ee -- number of 16K extensions ee = nnn / 16 d:pppppppp.sss -- drive name (d may be A, B, C, D) and file TTY: Model 43 Teletype PTR: Modem UR1: CRT and Modem w/CRT Output UR2: CRT and Modem PUN: TTY: Model 43 Teletype RDR: = UR1: LST: = TTY: STAT ld1=pd1, ld2=pd2, ... Chang th logica t physica devic assignments Logica devic ld i assigne t physica devic pd1 etc Th vali logical de x:afn Sca th specifie file o th specifie driv (x i optional) an lis al file whic satisf th unambiguou referenc i alphabetica orde wit storag requirements tabl lik th foll a file in hex. SYSGEN Create a new CP/M system diskette. MOVCP͠ Regenerat th CP/ syste fo particula memor size. :Physical Device Assignments for ARIES-1 Logical Device Phte to it. STAT VAL: Displa th possibl logica t physica devic assignments STAT will print the list -- CON: = TTY: CRT: BAT: UC1: RDR: = TTY: PTR: UR1: UR2: PUN: = LPT: Modem UL1: CRT and Modem :CP/M STAT Command The STAT Command takes any of the following forms -- STA Calculat th storag remainin o al activ drive an prin message PTP: Modem UP1: CRT and Modem UP2: CRT and Modem LST: TTY: Model 43 Teletype CRT: Hazeltine 1500 CRT physical device names are -- TTY: Slow speed output device (teletype) CRT: High speed output device (cathode ray tube) BAT Batc processin (CON inpu i RDR: CON outpu form feeds from the file. He dat transfer Al dat i checke fo prope Inte he fil format. I Ignore ':00' records in the transfer of Intel hex format file. L Translate upper case to lower case alphabetics.h specifie physica devic t th specifie logica device Vali logica device are -- CON:, RDR:, PUN:, LST: Valid physical devices are th CP/͠ transien whic implement th basi medi conversio operation necessar t load print punch copy an combin dis files PI i initiate b on o th following forms -- PIР Engag PIP promp te ca als specif on o mor PIР parameter enclose i square brackets separated by zero or more blanks. These parameters are --   Bloc mod transfer Dat i buffere b PI unti a ASCI X- Off character (Ctrl-S) is i so th currently logged-in drive is selected. x:ufn=y Cop th fil give b uf fro t x 'x ma b omitted and i so th currentl logged-i is LST:) UC1: User-defined console PTR: Paper tape reader PTP: Paper tape punch UR1: User-defined reader #1 UR2: User-defined reader #2 the device. EOF: Send a CP/M End of File character (ASCII Ctrl-Z). INP: Special PIP input source to be patched (see manual). OUT Specia PIР outpu destinatio t b patche (se -- TTY:, CRT:, UC1:, PTR:, PTP:, UR1:, UR2:, UP1:, UP2:, LPT:, UL1: Additional device names which may be used in PIP commands are -- NUL: Send 40 Nulls (ASCII 0) toh use wit '*' an rea comman line directl fro th console PI use i thi wa i exite b eithe typin a empt comman lin (jus carriag return o received from the source device. D Delet character whic exten pas colum i th transfe o data to the destination from the character source. E Echo all transfer operations to the console. F Filter (remove) drive is selected. x:afn=y:af Lik th above bu and/o ma b omitted th defaul driv i selecte fo th堠 omitte drive(s). ld=p Cop fro t UP1: User-defined punch #1 UP2: User-defined punch #2 LPT: Line printer UL1: User-defined list device #1 :CP/M PIP Command PIР (Periphera Interchang Program i manual). PRN Sam a LST: bu tab ar expande a ever eight characte position line ar numbered an pag eject are inserted every 60 lines with an initial eject. Th usstination = source#1, source#2, source#3, ..., source#n The general forms of PIP command lines are -- x:=y:af Cop al file satisfyin af fro driv t driv x 'y ma b omitted andCtrl- as the first character of the line. PIР cmn Engag PIP execut th specifie command an return to CP/M. The form of each command line in PIP is -- de N Add line numbers to each line transferred to the destination. O Object file (non-ASCII) transfer. Ignore End of File. Pn Include page ejects at every n lines. Qs^ڠQui copyin fro th sourc devic o fil whe thD Command Th UNLOA Comman doe th revers o th LOA Comman -- i convert COM files to HEX files. It is of the form -- UNLOAD filename where filename is the name of the file 'filename.COM'. :CP/M DDT Command Th Type lines +/- U Translate lower to upper case if U; none if -U +/- V Engage/disengage line numbers (verify) 0V Print memory buffer info (free/total usage) nW Write lines nX etail ar give i th user's manual. The following are the error indicators given by ED -- ? Unrecognized Command > Memory buffer full # Cannot apply command the number of times specified Ohe disk name to contain the print file (y=X lists on CON:, y=Z suppresses listing) Refer to the ASM Manual for further details. :CP/M LOAD Command Th LOA Comman read th fil specified whic i assume t con H End edit, close and reopen files Is^Z Insert characters nJ Place strings in juxtaposition +/- nK Kill (delete) lines +/- nL Move down/up lines nM Macro definition strin (terminated by Ctrl-Z) is encountered. Ss^Z Start copying from the source file when the string s is seen. Tn Expand tabs to every nth column. U Translate lower case to upper case alphabetics. V Verifpecified line (V engaged) :CP/M ASM Command Th AS Comman load an execute th CP/ 808 assembler I i o the form -- ASM filename.xyz where filename ... is the name of the file 'filename.ASM' to assemble Transfer n lines to X$$$$$$$.LIB 0X Empty X$$$$$$$.LIB nZ Sleep +/- n Move and type (+/- nLT) n: Move to absolute line (V engaged) :n Process from current line to s Cannot open LIB file in R command The following are the control characters recognized by ED -- ^C System reboot ^E Physical (not entered in command) ^I Logical tab tai Inte he forma machin cod an produce memor imag fil whic ca b subsequently executed (converts .HEX to .COM files). It is of the form -- LOAD filename where filename is the name of the file 'filename.HEX'. :The UNLOA O Return to original file +/- nP Move and print pages Q Quit with no file changes R Read library file nSs1^Zs2^Z Substitute s2 for s1 +/- nT y that data has been copied correctly. Z Zero the parity bit on input for each ASCII character. :CP/M ED Command Th EĠ Progra i th CP/͠ syste contex editor whic allow creatio an alteratio o ASCI files Complet d x ... designates the disk name which contains the source y ... designates the disk name to contain the hex file (y=Z suppresses generation of the hex file) z ... designates tcognized by ED -- nA Append lines +/- B Beginning/Bottom of buffer +/- nC Move character positions +/- nD Delete characters E Exit nFs^Z Find string ^L Logical in search and substitute strings ^U Line delete ^Z String terminator Rubout Character delete Break Discontinue command The following are the commands reDDԠ Progra allow dynami interactiv testin an debuggin o programs generated in the CP/M environment. It is invoked by -- DDT DDT filename.HEX DDT filename.COM where 'filename' is the name of the program to specified disk file into location nnnn. M bbbb eeee nnnn Move block from bbbb to eeee-1 to nnnn. N aaaa Enter offset aaaa for loading. O nn dd Output byte dd to port nn. P PC :The ZDT Command ZDT is a Z80 version of DDT. It is invoked by typing -- ZDT Th command recognize b ZD ar inpu i single-characte inpu mode N inpu lin editin i done an eac comman expectart execution at the current value of the PC. Gs Start execution at the specified address s. Gs,Star executio a th specifie addres an se breakpoin at the address b. Gs,b,c Same as above with break Searc fo he strin fro bbb t eeee Strin i terminated by . G Go to next breakpoint. H aaaa nnnn Hex add and subtract. Computes aaa U Untrace -- like Trace, but intermediate steps are not displayed. X Examine all registers and flags. Xr Examine specified registers or flag, where r may be -- C Carry flag Z Zero flag be loaded or tested. DDT responds to the normal CP/M input line editing characters. DDT responds to the following commands -- As Perform inline assembly starting at the specified address s. D Display memory from the currin a address bbbb. B Warm Boot -- Return to CP/M. C bbbb eeee nnnn Compar memor fro addres bbb t addres eee t bloc starting at nnnn. D bbbb ee a exac input Al byt value ar exactl tw characters an al addresse ar exactly four characters. The commands recognized by ZDT are -- A bbbb Ente ASCI character int memor fro keyboar startpoints at b and c. G,b Start execution at the current value of the PC with breakpoint b. G,b,c Same as above with breakpoints at b and c. If Insert a file name f into the default FCB. L List 12 lines of disasa+nnnn and aaaa-nnnn. I nn Input. Prints value at port nn. J nnnn Jump to and execute at location nnnn. K Keyboard echo. L filename.typ nnnn Loads M Minus (sign) flag I Interdigit Carry flag A Accumulator B BC Reg pair D DE Reg pair H HL Reg pair S Stack pointer ent address for 16 display lines. Ds Display memory from address s for 16 display lines. Ds,f Display memory from address s to address f. Fs,f,c Fill memory from start address s to final address f with byte c. G Stee Dump memory from bbbb to eeee. E bbbb eeee Searc fo ASCI strin fro bbb t eeee Strin i a most 16 characters. String is terminated by . F bbbb eeee d file in FCB into memory at 100H. Rb Read file in FCB into memory with offset b from 100H. Ss Set (examine and alter) memory starting at address s. T Trace the next instruction. Tn Trace the next n instructions. sembled code from the current address. Ls List 12 lines from the specified address s. Ls,f List lines of disassembled code from s to f. Ms,f,d Move the block from address s to f to destination at address d. R Rea P bbbb Inpu he int memor fro keyboar startin a bbbb or backs pointer. Q bbbb eeee Dumps from bbbb to eeee in ASCII. R n ll tt ss b if found or 0FFH if not Search for File 17 Address of FCB Byte address of first FCB in DE if found or 0FFH if not Search for Next 18 Address of FCB Byte address of ne Buffer 9 Address of string None terminated by $ in DE Read Buffer 10 Address of Read Read Buffer is filled Buffer in DE Cdis th dat a bbb fo lengt o l startin at track tt, sector ss. ll is in 256-byte pages. X Display registers. Z bbbb eeee dd Zero or set memory from bbbb to eeee-1 with byt Lift Head 12 None None Init BDOS 13 None None Log-In Disk 14 Value in Reg E None A=0, B=1, C=2, D=3 ns Function and Number Input Parameters Output Parameters Read Console 1 None ASCII Char in A Write Console 2 ASCII Char in E None Read Reader 3 None ASCII bbb Rea bloc o dat fro dis o lengt l (256-byt pages starting at track tt and sector ss placing the data at bbbb. S bbbb eeee Disassembly (symbolic dump) from bbbb to eeee. 00 CON:=TTY: RDR:=TTY: PUN:=TTY: LST:=TTY: 01 CRT: PTR: PTP: CRT: 10 BAT: UR1: UP1: LPT: 11 UC1: UR2: UP2: UL1: Read Buffer -- Byte onsole Ready 11 None LSB of A is 1 if char ready *All function numbers are passed in Reg C. I/O Status Byte -- Value Bits 6&7 Bits 4&5 Bits 2&3 Bits 0&1 e dd. :CP/M SYSGEN Command Th SYSGE transien comman allow generatio o a initialize dis containing the CP/M Operating System. It is invoked by typing SYSGEN Onc invoked th use i prompte throug th s Open File 15 Address of FCB Byte address of FCB in DE if found or 0FFH if not Close File 16 Address of FCB Byte address of FCB in DE Char in A Write Punch 4 ASCII Char in E None Write List 5 ASCII Char in E None Get I/O Status 7 None I/O Status in A Put I/O Status 8 I/O Status in E None PrintT bbbb eeee Destructive memory test from bbbb to eeee-1. U bbbb Set breakpoint at bbbb. V Display all currently-set breakpoints. W n ll tt ss bbbb Writ o Function 1 Maximum Buffer Length 2 Current Buffer Length (returned value) 3-n Data (returned values) :CP/M BIOS -- Basic Disk Operations Function and Number Input Parameters Output Parameters Th uf give i th SUBMI comman mus b th filenam (no type o fil whic exist o th currentl logged-i dis wit a assume fil type of '.SUB'. Refer to the CP/M Manual for further details. :CP/M BDOS -- Basic I/O Operatioession Refe t th CP/M Manual for further details. :CP/M SUBMIT Command Th SUBMIԠ comman allow CP/ command t b batche togethe fo automatic processing. The form of this command is SUBMIT ufn parm1 parm2 ... parmnxt FCB in DE if found or 0FFH if not Delete File 19 Address of FCB None in DE Function and Number Input Parameters Output Parameters 03H Warm Start CONST 06H Console Status Reg A = 00 if no char ready Reg A = FF if char ready CONIN 09H Console ch22 Address of FCB Byte address of FCB or in DE 255 if no more dir space Rename FCB 23 Address of FCB Byte Address of Dir entry in DE Read track/sector (block) WRITE 2AH Write track/sector (block)  (1...26) SETDMA 24H Set subsequent DMA address (RP B&C) READ 27H Source File PRN Assembler Listing File SRC PASCAL/MT Source File SUB SUBMIT File TC Tiny-C Source File TFS TFS Source File TXT Text File $$$ Temporary File :CP/M BIOS Ju Read Next Record 20 Address of FCB 0=successful read in DE 1=read past EOF 2=reading random data Write Next Rec 21 Address of FCB 0elative Offset Comment HOME 18H Move to track 00 SELDSK 1BH Select disk given by Reg C (A=0,B=1,...) SETTRˠ 1EȠ Se trac addres give b Re ar in (Reg A) CONOUT 0CH Console char out (Reg C) LIST 0FH List out (Reg C) PUNCH 12H Punch out (Reg C) READER 15H Reader in (Reg A) Routine R or 255 if no match Read Drive No 25 None Number of logged-in drive (A=0, B=1, C=2, D=3) Set DMA Address 26 Address of 128 None mp Vector Th followin i tabl representin th entr point int th CP/ BIOS of the major routines accessable to the user -- Routine Relative Offset Comment BOOT 00H Cold Start WBOOT =successful write in DE 1=error in extending 2=end of disk data 255=no more dir space Make File (0...76) SETSEà 21Ƞ Se secto addres give b Re (1...26) SETDMA 24H Set subsequent DMA address (RP B&C) READ 27H File COM "Command" File (Binary ORGed to 100H) FOR FORTRAN IV Source File HEX Intel "hex" code file HLP HELP File INT BASIC Intermediate File LST Listing File MAC MACRO-80 byte buffer in DE *All function numbers are passed in Reg C :CP/M File Types ALG ALGOL 60 Source File ASM Assembler Source File BAK Backup File BAS BASIC Source File (CBASIC) C C Source