IMD 1.16: 8/06/2007 19:27:00     åååååååååååååååå    åååååååååååååååå    åååååååååååååååå    åååååååååååååååå   ASM2 HLPASM HLPCBASIC HLPk CBASIC2 HLP/ CPM HLPs !"#$%&'HELP HLP5()*+C HLP,-./01234CPM2 HLP€56789:;<=>?@ABCDCPM2 HLP#EFGEBASIC HLP[HIJKLMPASCAL HLPMNOPQRMAC HLP=STUVMASM HLP=WXYZMBASIC HLP&[\]^_`abcdeHELP COMfHELP ASM ghåååInvoking 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 'filename' 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 foåååårmat 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 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     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 Numeric 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 Errmplify Р 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 code Ö  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 operly, most likely cause is a full disk, erase and retry CANNOÔ CLOSÅ FILÅ Outpuô filå cannoô bå closed¬ checë tï see if disk is write protected  determine the point of error OUTPUT FILE WRITE ERROR Output files cannot be written prInvoking 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 'filename' 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 fo 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 Numeric 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 Error 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 Ì  Labeì  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; siexist 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 ERROR 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 prårmat 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 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 or 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 Ì  Labeì  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; si   mplify Р 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 code Ö  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 operly, most likely cause is a full disk, erase and retry CANNOÔ CLOSÅ FILÅ Outpuô filå cannoô bå closed¬ checë tï see if disk is write protected  determine the point of error OUTPUT FILE WRITE ERROR Output files cannot be written prCBASIC 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ù 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æ CBASIC¬  á duaì  floppù  disë systeí  anä aô leasô 32Ë oæ memorù ió recommended®  Iæ CBASIà ió nted Compiler/Interpreter BASIC Language Facility for CP/M Systems February 17, 1978 :CBASIC: CBASIC 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ä toggleó  startinç  onå spacå oò morå afteò thå 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Ô file®  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æ Togglå Ä ió on¬  'AMT§ wilì noô refeò tï thå samå exist 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 ERROR 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 prå 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ì 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 -- C B A S I C A Commercially Orieograí 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 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è thå erroò anä thå  erroò messagå wilì bå prvariablå 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Å optioî (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   Å  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 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 nk 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ò waó 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 -- Exponparameteò 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ù followinç 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 surrounderenced 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 line 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. TOHILE 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 INTERMEDIATE 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è  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î invaliä 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 -- Disential 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î  expressioî 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å d 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 type 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å refe -- 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 String 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 W 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. 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ä durin   ç á  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 Á  negativå  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. 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å 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ó beeî executed. ER -- Error in Record Aî  attempô  waó  madå tï writå á recorä oæ lengtè  greateò  thaî  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ó lesó 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å 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å á strinç 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ò iô 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 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î evaluateä 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è á thå 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ï á 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 ErrUSINÇ 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. OE -- 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ô  evoí 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ç 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 staNT STR$ AS FEND LINE RANDOMIZE SUB ASC FILE LOG READ TAB ATN FOR LPRINTER RECL TAN CALL FRE LT REM THEN CHR$ GE MATCH REMARK TO CLOSE GO MID$ RENAME USING CONSOLE GOSUB NE RESTORE VAL COS GOTO NEXT RETURN WEND CREATE GT NOT RIGHT$ WHILE     DATA IF ON RND WIDTH DEF INP OPEN SGN XOR DELETE INPUT OR SIN DIM INT OUT SIZE ELSE LE PEEK SQR END LEFT$ POKE STEP  RESTORE VAL COS GOTO NEXT RETURN WEND CREATE GT NOT RIGHT$ WHILE 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 Predefined 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 C B A S I C A Commercially Oriented Compiler/Interpreter BASIC Language Facility for CP/M Systems 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 Oriented Compiler/Interpreter BASIC Language Facility for CP/M Systems Version 2 May 1, 1979 :CBASIC2: 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ä toghå 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Ô file®  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æ TogglååIC¬  á 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å compiler¬  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 --er 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î INÔ 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 Commerciallygleó  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 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 Ä 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å Å 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.     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ë listinç 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:) extractoæ  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ô disë 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ï 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¬  thå 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: r, 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 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å  state Á  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 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ò waó useä oî twï differenô lines®  Otheò compis 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ì identifieró 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ó å 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 Toggles 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ô t.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. 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î invaliä ASCIÉ character»  thió characteò is ignored by the compilemenô 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. 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 leò 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ì formaô 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   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ã 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å parameteò typå doeó noô matcè thå parameteò  typsubscripted 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 An 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 exprere 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ô useó 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  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 associated 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®  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 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ä iå 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 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 ession 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 -- 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 wnumber 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å simplified 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 cifieä 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å numbeò 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ù zeroî 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å valuå 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Å    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. 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å storae. 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ó 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å NÄ  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å 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ó lesó thaî ± oò greateò thaî 20. N 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ò 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å á strinç containinç á quotatioî mark. R waó defined. SL -- String Length Á concatenatioî operatioî resulteä iî á strinç oæ morå thaî 25µ bytes. SO -- SAVEMEM Thå filå specifieä iî á SAVEMEÍ statemenô coulä noô bå locateä oî  thå referenced disk. 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 statemenô containeä á parameteò lesó thaî ± oò greateò thagå 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å statemenô 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ô activtï 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 name 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 -- ?? Á   FEM -- 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 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. OE -- OPEN Error Aî attempô waóB -- Random BUFF Randoí  accesó waó attempteä tï á filå activateä witè thå BUFÆ  optioî specifying more than 1 buffer. 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 Á 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ùî 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å 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     DELETE DIM ELSE END EQ EXP FEND FILE FOR FRE GE GO GOSUB GOTO GT IF INITIALIZE INP INPUT INT INT% LE LEFT$ LEN LET LINE 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 <= > >= = <> 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ì 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å expresi%) 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$(a$) 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 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 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 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®   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-N RIGHT$ RND SADD SGN SIN SIZE SQR STEP STOP STR$ SUB TAB TAN THEN TO UCASE$ USING VAL WEND WHILE WIDTH XOR :CBASIC2: Expression Hierarchy The Hierarchy for expression evaluation is a follows -- 1. nested parentheses () 2. power operator ^ 3. * / 4. + - concatenation[+] unary[+ -] 5. relational operators: <sion. POKE , - 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 , - Reservå  into the reserved area. Numeric Functions FRE ABS(x) INT(x) INT%(x) FLOAT( The general forms are -- [] DEF [] = and [] DEF [] . . . [] FEND  Disk Functions RENAME(a$,b$) SIZE(a$) User-Defined Functions  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/Í   provideó   á  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î whexecutablå 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 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     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/Í 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ù interp 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 -- 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î matchingOM 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 Delete 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: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. Typing 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 -- fyinç 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æ thå  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æ storaretivå 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î  á 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å  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æ á filå 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.C 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). 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 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ï bå 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å satisgå remaininç  oî  thå currentlù    logged-iî   disk¬    providå   statisticaì informatioî  abouô  particulaò files¬  anä  displaù  oò alter device assignment. PIÐ Loaä thå 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.     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å forí 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 TTY: Model 43 Teletype PTR: Modem UR1: CRT and Modem w/CRT Output UR2: CRT and Modem PUN: TTY: Model 43 Teletype PTP: Modem UP1: CRT and Modem UP2: CRT and Modem LST: TTY: Model 43 Teletype CRT: Hazeltine 1500 CRT  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å following 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=102te 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: = 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: 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ô is LST:) UC1: User-defined console PTR: Paper tape reader PTP: Paper tape punch UR1: User-defined reader #1 UR2: User-defined reader #2  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 Physical Device CON: TTY: Model 43 Teletype CRT: Hazeltine 1500 CRT BAT: CRT and Modem UC1: In=CRT, Out=CRT and Modem RDR:  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 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 STAT4) 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 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 wri 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 device 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  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ó 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ô t   hå 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ò á  Ctrl-à 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 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í thå specifieä physicaì devicå  tï  thå specifieä  logicaì device®  Valiä logicaì deviceó are -- CON:, RDR:, PUN:, LST: Valid physical devices are 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å  useò  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 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î thå  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 Verif 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 ^L Logical in search and substitute strings ^U Line delete ^Z String terminator Rubout Character delete Break Discontinue command The following are the commands restination = 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¬  and¬  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î  -- 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) to 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å  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) 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.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å detailó 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 Ocognized by ED -- nA Append lines +/- B Beginning/Bottom of buffer +/- nC Move character positions +/- nD Delete characters E Exit nFs^Z Find string 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     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 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  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 the 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ï conDDÔ  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 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 currpoints 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 disassembled 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 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 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ä expect 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 specified 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 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 UNLOAD 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å  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 Start 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 breakd 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. 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 ó 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ä startinç 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   ee 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 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 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 bbbb 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. 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å session® 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 ... parmnChar 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 Print Buffer 9 Address of string None terminated by $ in DE Read Buffer 10 Address of Read Read Buffer is filled Buffer in DE CFunction 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 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 a+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 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. T 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î disë î 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 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 Operations 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 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 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  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 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    xt 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 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 0 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 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 Sourcemp 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 03H Warm Start CONST 06H Console Status Reg A = 00 if no char ready Reg A = FF if char ready Š CONIN 09H Console ch (0...76) SETSEà 21È  Seô  sectoò  addresó giveî  bù  Reç  Ã (1...26) SETDMA 24H Set subsequent DMA address (RP B&C) READ 27H Read track/sector (block) WRITE 2AH Write track/sector (block) k given by Reg C (A=0,B=1,...) SETTRË  1EÈ  Seô  tracë  addresó  giveî  bù  Reç  Ã å=successful write in DE 1=error in extending 2=end of disk data 255=no more dir space Make File 22 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  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 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 Juar 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 Relative 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ç  Ã åå   Welcome to the HELP Command How to use the HELP Command How to write .HLP Files Help on CP/M in general :HELP: Welcome to the HELP Command Welcomå  tï thå HELÐ Command¡  Thå HELÐ Commanä ió designeä tï assisô you¬  thå  CP/Í  user¬  iî  thå uså oæ CP/Í iî generaì  anä  specifiã  CP/Í commandó  iî  particular®  Iô  ió  designeä  aó  aî  interactive¬  on-linå assistancå system. HELÐ pulló iî fileó nameä .HLÐ froí disë anä displayó  theså tï thå useò iî á pageä mode® Theså anä displaù iô tï hií  iî á pageä mode®  Wheî thå useò haó finisheä readinç  hió  selection¬ HELР theî returnó hií tï thå indeø menu®  Typinç á Control-à wilì returî thå useò tï CP/M. Non-indexeä  fileó  arå  thoså .HLÐ fileó whicè dï noô starô  witè  aî index®  Iî sucè cases¬  HELÐ wilì immediatelù displaù thå contentó oæ  thå filå tï thå useò and¬  wheî thå useò haó finisheä lookinç aô it¬  HELÐ wilì returî tï CP/M. HELÐ ió menu-driven¬ anä alì thå commandó availablå tï thå usk file named FILENAME.HLP (3) by typing 'HELP FILENAME.EXT', where FILENAME.EXT is the name of a file created in the format of a help file Iæ thå useò typeó jusô 'HELP'¬  hå wilì receivå thå HELP.HLÐ helð filå (no÷ beinç displayeä tï you)® Foò alì otheò formó oæ thå HELÐ command¬ thå useò wilì seå thå specifieä helð filå information® Generallù speaking¬ thå namå  oæ thå helð filå shoulä bå indicativå oæ itó  subject¬  likå  CPM.HLÐ shoulä contaiî heø iî  indexeä HLР fileó  anä maù alsï bå groupeä bù lineó beginninç witè Forí Feeä  (^L© characters® Groupinç ió aî effectivå waù tï logicallù organizå informatioî sï  thaô  meaninç wilì bå morå cleaò tï thå useò anä unitó  oæ  informatioî will not pass between screen displays. Non-Indexed .HLP Files Non-indexeä .HLÐ fileó arå simplå ASCIÉ fileó whicè starô witè á coloî (:© aó thå firsô characteò oæ thå filå anä consisô oæ ASCIÉ texô (witè eacè linå termineó aó thå firsô lineó oæ  thå filå  followeä bù informatioî sectionó whicè begiî witè á linå whoså  firsô characteò  ió  á  coloî  anä enä witè eitheò thå firsô  linå  oæ  thå  nexô informatioî sectioî oò thå enä oæ thå file. :HELP: General Information on CP/M 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° micropfileó arå oæ twï basiã typeó -- indexeä anä non-indexed. Indexeä fileó arå thoså .HLÐ fileó whicè starô witè aî index® Thió ió aî  examplå  oæ  aî indexeä file®  Wheî HELÐ loadó  aî  indexeä  file¬  iô displayó  thió indeø tï thå useò anä allowó hií tï selecô entrieó froí  it® Thå  useò maù selecô aó manù entrieó aó hå desireó iî anù ordeò hå  desireó bù  simplù typinç thå letteò oæ hió selection®  Oncå thå useò haó madå hió selection¬ helð wilì looë uð thå bodù oæ texô hå selecteä eò aô anù giveî timå arå displayeä tï him® HELÐ caî bå á verù usefuì tooì foò on-linå referencå tï thå user® It¬ iî conjunctioî witè thå manù HLÐ fileó no÷ available¬ haó alreadù proveî tï be of significant value. Richard Conn :HELP: How to use the HELP Command Thå HELÐ Commanä ió executeä iî onå oæ threå ways: (1) by just typing 'HELP' (2) by typing 'HELP FILENAME', where FILENAME is the name of a dislð informatioî oî CP/M. :HELP: How to write .HLP files Fileó  useä bù thå HELÐ prograí arå eitheò simplå CP/M-standarä  fileó oæ   ASCIÉ   texô  oò  ASCIÉ  fileó  generateä  bù  thå  Worä   Staò   texô editor/formatter® Theså files¬ aó mentioneä above¬ arå oæ twï basiã typesº indexeä  anä non-indexed¬  anä eacè typå ió relateä tï thå otheò anä ió  oæ thå samå basiã format® Grouping of Information Informatioî  displayeä tï thå useò ió groupeä bù thå indeinateä bù á carriagå return/linå feeä characteò combination)® Thå informatioî  iî  sucè  á helð filå consistó oæ alì texô afteò  thå  leadinç coloî  uð tï eitheò thå terminatinç end-of-filå marë (control-Z© oò  á  ne÷ linå whicè startó witè á colon. Indexed .HLP Files Indexeä  .HLР fileó arå simplå ASCIÉ fileó whicè dï noô starô witè  á coloî  (:©  aó thå firsô characteò oæ thå file®  Thió typå  oæ  .HLР filå consistó  oæ onå oò morå normaì ASCIÉ texô lrocessor¬   CP/Í   provideó   á  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î whicè 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å  man    agemenô  system®   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-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/Í F whicè  caî  ruî undeò CP/Í 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ù interpretivå BASICs¬ ALGOL¬ FOCAL¬ anä  C)¬  anä  severaì special-purposå applicationó programó (sucè aó  texô formattinç systemó anä accountinç systems). Refeò  tï thå indicateä manualó and/oò thå CP/Í helð filå foò  furtåInvoking 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-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 d. :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 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 seatureó anä Facilities 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 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åheò information. 80)¬  á  symboliã  debugger¬ Šseveraì  high-leveì  languageó (includinç FORTRAΠ IÖ  {compiler}¬  BASIC-Å {translator}¬  CBASIà {translator}¬ manù interpretivå BASICs¬ ALGOL¬ FOCAL¬ anä  C)¬  anä  severaì special-purposå applicationó programó (sucè aó  texô formattinç systemó anä accountinç systems). Refeò  tï thå indicateä manualó and/oò thå CP/Í helð filå foò  furtåC 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ò proceeds¬  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 executeource 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 the 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   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 with 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.) r. 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 complete. 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 -n" 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.) 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 diskheir .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 any 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 ported 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 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 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 takes 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- 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 ".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 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). For 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 tDEFF.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 the 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, 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 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    lso 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 BAR.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.CCCr 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 invoke 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.  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 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 ine (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 just 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 le, 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 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 r 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 assumed 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 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 content, 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",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 contains 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 l "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 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 variabelative 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 appears 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    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 Purpose 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, 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; 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(strptrilename; 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,iobuf) 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; ° 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 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 -- IST -- List output; Input value = char to output 4 PUNCH -- Punch output; Input value = char to output 5 READER -- Reader input; Returned value = char input ååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååcount,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() 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 ) 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 - output, 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 *f 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 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  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 ° 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 3 Lå    å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 LOAD Command The UNLOAD Command CP/M DDT Command The ZDT Command CP/M SYSGEN Command CP/M SUBMIT and XSUB Commands 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 uratioî whicè useó aî Inteì  808°  oò Ziloç Z8° Microprocessoò anä haó aô leasô 20Ë byteó oæ maiî memorù witè  uð tï eight IBM-compatablå diskettå drives. Thå  CP/Í monitoò provideó accesó tï programó througè á  comprehensivå filå  managemenô  system®   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ï  12¸  distincô programó caî bå storeä iî botè sourcå anation Guide 7. CP/M 2.0 User's Guide 8. CP/M 2.0 Interface Guide 9. CP/M 2.0 System Alteration Guide 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/Í witè littlå oò nï modification®  Sucè  softwarå includeó  severaì  assembleró (botè 808° anä  Z80)¬  á  symbol 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 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 -- pppppppp.sss åCP/M CP/Í   ió  á  monitoò  controì  prograí  foò  microcomputeò   softwarå developmenô  whicè  useó IBM-compatiblå flexiblå diskó (floppù  disks©  foò masó  storage®  Usinç á microcomputeò mainframå baseä oî Intel'ó  808°  oò Zilog'ó Z8° microprocessor¬ CP/Í provideó á 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ò configä machine-executablå form. Digitaì  Research¬  thå designeò oæ CP/M¬  haó provideä á seô oæ  ninå manualó whicè describå thå uså anä operatioî oæ CP/Í iî detail. These manuals are: 1® Aî Introductioî tï CP/Í Featureó anä Facilities 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 1.4 Interface Guide 6. CP/M 1.4 System Alteriã  debugger¬ severaì  high-leveì  languageó (includinç FORTRAΠ IÖ  {compiler}¬  BASIC-Å {translator}¬  CBASIà {translator}¬ manù interpretivå BASICs¬ ALGOL¬ FOCAL¬ anä  C)¬  anä  severaì special-purposå applicationó programó (sucè aó  texô formattinç systemó anä accountinç systems). Thió HELÐ Filå addresseó itselæ specificallù tï thå CP/Í 2.ø Operatinç Systems. :CP/M File References Á  filå referencå identifieó á particulaò filå oò grouð oæ fileó oî  á particulaò  disë  attacheä 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î matching®  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æ á filå namå iî thå '?§ positio   n®  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.COM 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-È   Deletå  thå  lasô  characteò  line is not sent until the carriage return key is depressed. Ctrl-M Terminates input (carriage return). Ctrl-J Terminates current input (line feed); CRT-oriented Ctrl-C CP/M system reboot (warm start). Ctrl-Z End input from the console (used in PIP and ED). Other control functions affect console output -- Ctrl-P Copy all subsequent console output to the currently- assigned list devic:CP/M Built-In Commands 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ï bå 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ó eá 0¬  whicè ió compatablå witè CP/Í 1.´ directories® Thå USEÒ commanä allowó thå useò tï movå tï anotheò  logicaì areá  withiî  thå samå directory»  areaó arå numbereä  0-15® Thå ERA¬  DIR¬  REN¬  SAVE¬  anä TYPÅ commandó applù tï  thå current User Area. :CP/M Transient Commands The CP/M standard transient commands are -- STAÔ  Lisô thå numbeò oæ byteó oæ storagå and data oî  thå currentansferó alì buffereä console input from CON: to the SUBMIT File. 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å forí whicè caî bå loadeä intï thå TPÁ (thió loadeä prograí becomeó á  ne÷ command under the CCP). Š DDT Lo typed»   Backspacå  onå character; CRT-oriented Ctrl-U Delete the entire line typed at the console. Ctrl-Ø Deletå thå entirå linå typeä aô thå console»  Backspacå tï thå beginninç oæ thå currenô line; CRT-oriented. Ctrl-R Retype current command line: types a "clean line" following character deletion with rubouts. Ctrl-E Physical end of line: carriage is returned, but e (LST:). Output is sent to both the list device and the console 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. Typing 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. oæ fileó oî disk® Thå filå satisfyinç 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æ thå  ASCIÉ sourcå  filå  ufî  oî thå currentlù logged-iî  disë  aô  thå console device. USEÒ î -- Upoî colä boot¬  thå useò ió automaticallù loggeä iî tï Useò Arlù    logged-iî   disk¬    providå   statisticaì informatioî  abouô  particulaò files¬  anä  displaù  oò alter device assignment. PIÐ Loaä thå 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. XSU Useä iî conjunctioî witè SUBMIT¬ trad the CP/M debugger into the TPA and execute it. DUMP Dump the contents of 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 Physical Device CON: TTY: Model 43 Teletype CRT: Hazeltine 1500 CRT BAT: CRT     and Modem UC1: In=CRT, Out=CRT and Modem RDR: TTY: Model 43 Teletype PTR: Modem UR1: CRT and Modem w/CRT Output UR2: CRT and Modem PUN: TTY: Model 43 Teletype PTP: Modem UP1: CRT and Modem UP2: CRT and Modem LST: TTY:aining on the specified drive and print BYTES REMAINING ON x: nnnK STAT x:afn [$S] 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å following is generated -- Size Recs Bytes Ext Acc sssss rrrr nnnk ee a/b d:pppppppp.sss where sssss 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 write to it. STAT VAL: Summarize the status commands. STAT VAL: will print the list -- Temp R/O Disk: d:=R/O Set Indicator: d:filename.typ $R/O $R/W $SYS $DIR Disk Status : DSK: d:DSK: User Status : USR: permanenô  filå  indicators®   R/O=Read/Only¬ R/W=Read/Write, SYS=System, DIR=Non-System 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 device names are -- CON: The system console device RDR: The paper tape reader device PUN: The paper tape punch device LST:  UR2: User-defined reader #2 UP1: User-defined punch #1 UP2: User-defined punch #2 LPT: Line printer UL1: User-defined list device #1 STAT d:DSK: Lisô  thå characteristicó oæ thå disë nameä "d:"»  iæ "d:¢ ió noô specified, list the characteristics of all active disks. A sample listing: d: Drive Characteristics 65536: 128 Byte Record Capacity 819 Model 43 Teletype CRT: Hazeltine 1500 CRT 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 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 rem-- number of virtual 128-byte records in file This field is display if the optional $S is given rrrr -- number of 128-byte records in each extent of the file nnnK -- number of bytes (in K, K=1024) allocated to the file ee -- number of 16K extensions a/b -- access mode of file; R/O or R/W d:pppppppp.sss -- drive name (d may be A, B, C, D) and file name STAT x:=R/O Seô  Iobyte Assign: CON: = TTY: CRT: BAT: UC1: RDR: = TTY: PTR: UR1: UR2: PUN: = 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: RDR: = UR1: LST: = TTY: STAT d:afn [$R/O or $R/W or $SYS or $DIR] Seô  thå  variouó   The output list device The valid 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ô is LST:) UC1: User-defined console PTR: Paper tape reader PTP: Paper tape punch UR1: User-defined reader #1 2: Kilobyte Drive Capacity 128: 32 Byte Directory Entries 0: Checked Directory Entries 1024: Records/ Extent 128: Records/ Block 58: Sectors/ Track 2: Reserved Tracks STAT USR: Lisô  thå  Useò  Numbeò thå useò ió currentlù  iî  anä  thå  Useò Numberó  whicè  havå  fileó  oî thå currentlù  addresseä  disk®  Á  samplå listing: Active User : 0 Active Files: 0 1 3 :CP/M P   IP Command PIР (Peripheraì  Interchangå  Program© ió 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ô thå useò witè '*'¬  anä  reaä commanä lineó directlù froí thå console® PIÐ useä iî  thió  waù ió exiteä bù eitheò typinç aî  emptù  drivå x®  'y§ maù bå omitted¬  and¬  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î drive is selected. x:afn=y:afî Likå thå above¬ buô ø and/oò ù maù bå omitted» thå defaulô   drivå  ió  selecteä  foò   thå   omitteä ands are -- NUL: Send 40 Nulls (ASCII 0) to 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å manual). PRNº  Samå aó LST:¬  buô tabó arå expandeä aô  everù  eightè characteò position¬ lineó arå numbered¬ anä pagå ejectó are inseransfer operations to the console. F Filter (remove) form feeds from the file. Gn Get File from User Number n (n in the range 0 - 15) È 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. N Add line numbers to each line transferred to the destination. O Object file (non-ASCII) transfer. Ignore End o 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å detailó 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 O Cannot open LIB file in R command  commanä linå (jusô á carriagå return© oò á  Ctrl-à 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 -- destination = 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ï  drive(s). ld=pä  Copù  froí thå specifieä physicaì devicå  tï  thå specifieä  logicaì device®  Valiä logicaì deviceó are -- CON:, RDR:, PUN:, LST: Valid physical devices are -- TTY:, CRT:, UC1:, PTR:, PTP:, UR1:, UR2:, UP1:, UP2:, LPT:, UL1: Additional device names which may be used in PIP commrted every 60 lines with an initial eject. Thå  useò  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 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 tf File. Pn Include page ejects at every n lines. Qs^Ú Quiô  copyinç froí thå sourcå devicå oò filå wheî thå  strinç  ó (terminated by Ctrl-Z) is encountered. R Read system files 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 Verify that data has been copied correctly. W Write over R/O files without console interrogation  The following are the control characters recognized by ED -- ^C System reboot ^E Physical (not entered in command) ^H Character delete (backspace) ^I Logical tab ^J New line (line feed) ^L Logical in search and substitute strings ^M New line (carriage return) ^U Line delete ^X Line delete and backspace ^Z     String terminator Rubout Character delete Break Discontinue command The following are the commands recognized by ED -- nA Append lines +/- B Beginning/Bottom of buffer +/- nC Move character positions +/- nD Delete characters E Exit nFs^Z Find string H End edit, close and reopen files Is^Z Insert characters nJ Place disengage line numbers (verify) 0V Print memory buffer info (free/total usage) nW Write lines nX 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 specified line (V engaged) :CP/M ASM Command Thå ASÍ Commanä loadó anä executeó thå CP/Í 808° assemble Refer to the ASM Manual for further details. :CP/M LOAD Command Thå LOAÄ Commanä readó thå filå specified¬ whicè ió assumeä tï contaiî 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 UNLOAD Command Thå UNLOAÄ Commanä doeó thå reverså oæ thå LOAÄ Commanä -- iô convertó COM files to HEX finds to the following commands -- As Perform inline assembly starting at the specified address s. D Display memory from the current 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 Start execution at the current value of the PC. Gs Start execution at the specified address s. Gs,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 Read 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. U Untrace -- like Trace, but intermediate steps are not displayed. X Examine all registers strings in juxtaposition +/- nK Kill (delete) lines +/- nL Move down/up lines nM Macro definition 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 Type lines +/- U Translate lower to upper case if U; none if -U +/- V Engage/r®  Iô ió oæ the form -- ASM filename.xyz where filename ... is the name of the file 'filename.ASM' to assemble 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 the disk name to contain the print file (y=X lists on CON:, y=Z suppresses listing) les. It is of the form -- UNLOAD filename where filename is the name of the file 'filename.COM'. :CP/M DDT Command Thå  DDÔ  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 be loaded or tested. DDT responds to the normal CP/M input line editing characters. DDT respoâ Starô executioî aô thå specifieä addresó ó anä seô á  breakpoinô at the address b. Gs,b,c Same as above with breakpoints 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 disassembled code from the current address. Ls List 12 lines from the specified address s. Ls,f List and flags. Xr Examine specified registers or flag, where r may be -- C Carry flag Z Zero flag 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 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ä expectó 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ä startinç aô address bbbb. B Warm Boot -- Return to CP/M. C bminated by . G Go to next breakpoint. H aaaa nnnn Hex add and subtract. Computes aaaa+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 specified disk file into location nnnn. M bbbb eeee nnnn Move block from bbbb to eetrack tt and sector ss placing the data at bbbb. S bbbb eeee Disassembly (symbolic dump) from bbbb to eeee. T 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î disë î thå datá aô bbbâ foò á lengtè oæ lì startinç at track tt, sector ss. ll is in 256-bytcommanä allowó CP/Í commandó tï bå batcheä  togetheò  foò automatic processing. The form of this command is SUBMIT ufn parm1 parm2 ... parmn 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. Thå  XSU  commanä extendó thå poweò oæ  thå  SUBMIÔ  facility®  Wheî specifieä  aó thå firsô linå oæ á SUBMIÔ File¬  iô selsic I/O Operations Function and Number Input Parameters Output Parameters System Reset 0 None None Read Console 1 None ASCII Char in A Write Console 2 ASCII Char in E None Read Reader 3 None ASCII Char in A Write Punch 4 ASCII Char in E None Write List 5 ASCII Char in E None Direct Con I/O 6 ASCII Char in E I/O Status inbbb eeee nnnn Comparå  memorù froí addresó bbbâ tï addresó eeeå  tï  blocë starting at nnnn. D bbbb eeee 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 Searcè  foò  heø  strinç  froí  bbbâ  tï  eeee®  Strinç  ió teree-1 to nnnn. N aaaa Enter offset aaaa for loading. O nn dd Output byte dd to port nn. 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 bbbb Reaä blocë oæ datá froí disë î oæ lengtè lì (256-bytå pages© starting at e pages. X Display registers. Z bbbb eeee dd Zero or set memory from bbbb to eeee-1 with byte 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å session® Refeò tï thå CP/M Manual for further details. :CP/M SUBMIT and XSUB Commands Thå  SUBMIÔ  f-relocateó  directlù belo÷ thå CCP®  Alì subsequenô SUBMIÔ commanä lineó arå processeä bù XSUB¬ sï  thaô  programó  whicè reaä buffereä consolå inpuô  (BDOÓ  Functioî  10© receivå inpuô directlù froí thå SUBMIÔ File®  Whilå XSU ió iî memory¬  iô printó  thå messagå "(xsuâ active)¢ oî eacè warí boot®  Aî examplå oæ  thå use of XSUB to display memory from 100H to 1FFH is -- XSUB DDT D100,1FF G0 :CP/M BDOS -- Ba A if E=0FFH Get I/O Status 7 None I/O Status in A Put I/O Status 8 I/O Status in E None Print Buffer 9 Address of string None terminated by $ in DE Š Read Buffer 10 Address of Read Read Buffer is filled Buffer in DE Console 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 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 Function 1 Maximum Buffer Length 2 Current Buffer Length (returned value) 3 C=2, D=3 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 if found or 0FFH if not Search for File 17 Address of FCB Byte address of FCB (0-3) in DE if found or 0FFH if not Search for Next  2=reading random data Write Next Rec 21 Address of FCB 0=successful write in DE 1=error in extending 2=end of disk data 255=no more dir space Make File 22 Address of FCB Byte address of FCB or in DE 255 if no more dir space Rename FCB arameters Geô Alloã Vecô 2· Nonå Allocatioî Vecô Addò  iî HL Write Prot Disk 28 None None Get R/O Vect 29 None HL=R/O Vect Val Set File Attrib 30 Ptr to FCB in DE Dir code in A Get Disk Parms 31 None HL=DPB Address Set/Get Usr Code 32 E=0FFH (get)/Code A=Current code (get)/no (set) f disk Function and Number Input Parameters Output Parameters Write Random 34 DE=FCB addr A=return code 1=reading unwritten data 2=(not used) 3=can't close curr ext 4=seek to unwritten ext 5=dir overflow -n Data (returned values) :CP/M BIOS -- Basic Disk Operations Function and Number Input Parameters Output Parameters Return Version # 12 None Version Info in HL H=0 CP/M, H=1 MP/M L=00 CP/M 1.x, 2x 2.x Init BDOS 13 None None Log-In Disk 14 Value in Reg E None A=0, B=1,18 Address of FCB Byte address of next FCB in DE if found or 0FFH if not Delete File 19 Address of FCB Byte address of FCB (0-3) in DE if found or 0FFH if not Function and Number Input Parameters Output Parameters Read Next Record 20 Address of FCB 0=successful read in DE 1=read past EOF 23 Address of FCB Byte Address of Dir entry in DE or 255 if no match Return Log Code 24 None Login vector in HL 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 byte buffer in DE Function and Number Input Parameters Output P value (set) Read Random 33 DE=FCB addr A=return code 1=reading unwritten data 2=(not used) 3=can't close curr ext 4=seek to unwritten ext 5=(not used) 6=seek past end o 6=seek past end of disk Compute File Siz 35 DE=FCB addr Random Rec Field set to file size Set Random Rec 36 DE=FCB addr Random Rec Field set *All function numbers are passed in Reg C :CP/M File Types AIN ALGOL 60 Intermediate ALG ALGOL 60 Source File ASM Assembler Source File BAK Backup File BAS BASIC Source File C C Source File    COB COBOL Source File COM "Command" File FOR FORTRAN IV Source File HEX Intel "hex" code file HLP HELP File INT BASIC Intermediate File LST Listing File MAC MACRO-80 Source File PAS PASCAL Source File PRN Assembler Listing File REL Relocatable Module SRC PASCAL/MT Source File SUB SUBMIT File SYM Symbol File TC Tiny-C Source File TFS TFS Source File TXT Text Fileady CONIN 09H Console char 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 Relative Offset Comment HOME 18H Move to track 00 SELDSK 1BH Select disk given by Reg C (A=0,B=1,...) SETTRË  1EÈ  Seô  tracë ready Reg A = FF if char ready SECTRAΠ 30È Translatå sectoò numbeò iî Reç à usinç tablå pointeä tï bù DE» physicaì sectoò number returned in Reg L sector (block) LISTST 2DH List Device Status Reg A = 00 if no charåInvoking BASIC-E BASIC-E Statements BASIC-E Functions Differences between BASIC-E and CBASIC BASIC-E Error Messages CBASIC: Compiler Error Messages CBASIC: Run-Time Error Messages -- Warnings CBASIC: Run-Time Error Messages -- Error Codes :Invoking BASIC-E BASIC-E is invoked by typing the following -- EBASIC filename $o wherå  'filename§ ió thå namå oæ thå sourcå filå 'filename.BAS§ tï  bå compiled and 'o' is one or more of the following options -- A Liste $$$ Temporary File :CP/M BIOS Jump 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 03H Warm Start CONST 06H Console Status Reg A = 00 if no char ready Reg A = FF if char r  addresó  giveî  bù  Reç  Ã (0...76) SETSEà 21È  Seô  sectoò  addresó giveî  bù  Reç  Ã (1...26) SETDMA 24H Set subsequent DMA address (RP B&C) READ 27H Read track/sector (block) WRITE 2AH Write track/sector (block) LISTST 2DH List Device Status Reg A = 00 if no charåå Productions (for compiler debugging); normally OFF B List only source statements with errors; normally OFF C Check syntax only; don't create .INT file; normally OFF D Convert lowercase to uppercase; normally ON E Generate line number code; normally OFF After compilation, the program may then be executed by -- ERUN filename where 'filename' is the name of the intermediate code file 'filename.INT'. :BASIC-E Statements Th   e following statements are valid in BASIC-E -- FOR NEXT FILE GOTO LET CLOSE GOSUB INPUT ON PRINT READ RESTORE RETURN OUT RANDOMIZE STOP DATA DEF DIM END IF REM ELSE THEN :BASIC-E Functions The following built-in functions are valid in BASIC-E -- ABS ASC ATN CHR$ COS COSH FRE INP INbset¢ oæ CBASIC¬  refeò tï thå CBASIà helð filå for information on the BASIC-E error messages. Most¬  buô  noô all¬  BASIC-Å erroò messageó arå covereä iî thió  helð file. :CBASIC: Compiler Error Messages 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 n FOR statements for which a NEXTred 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ò waó 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 -- Exponential Format Á numbeò iî å 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ù followinç 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 surrounded by quotes. IS -- Invalid Sutement. 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 line 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. TO -- Table Overflow Thå  prT LEFT$ LEN LOG MID$ POS RIGHT$ RND SGN SIN SINH STR$ SQR TAB TAN VAL EXP :Differences between BASIC-E and CBASIC Thå  followinç  featureó arå noô availablå iî BASIC-E¬  buô  theù  arå available in CBASIC -- 1. PEEK or POKE 2. PRINT USING Š 3. CALL to machine code programs 4. LPRINT :BASIC-E Error Messages Sincå  BASIC-Å ió á "su 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î invaliä 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 -- Disk Error A disk error occurexponentiaì 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î  expressioî 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å parameteò typå doeó noô matcè thbscript 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 type 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å referenced by the associated FOR staograí  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 String 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 WHILE 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 INTERMEDIATE 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è  thå  fielä specifieä iî thå INPô 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 Á  negativå  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. SQ -- SQuare root error  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å 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ó beeî executed. ER -- Error in Record Aî  attempô  waó  madå tï writå á recorä oæ lengtè  greateò  thaî  thå maximuí  recorä  sizå specå 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ó lesó 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å USINÇ string. NS -- No Stringoò 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å á strinç 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 Á randoí reaä oò prinô waó attempteä tUÔ 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. 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ä durinç á  REAÄ LINE® Onlù thå firsÁ  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î evaluateä 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è á filå numbeò thaô  waó  alreadù ifieä 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ï á 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 Error Aî  erroò occurreä whil 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. OE -- 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ô  evaluateä tï á numbeò lesó thaî ± ï 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ç 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 statemenô 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ò iô haä  beeî  read¬  buô beforå iô haä beeî reaä tï thå enä oæ thå file. ó madå tï havå morå thaî 2° activå fileó simultaneously. TL -- TAB Length Á  TA statemenô containeä á parameteò lesCompiler Operation Invoking Pascal Compilation Switches File Input/Output Special Functions and Procedures Pascal/MT Symbolic Debugger Pascal/MT Reserved Words Notes :Compiler Operation Thå Pascal/MÔ compileò existó iî twï versions¬  eacè consistinç oæ twï 808°  objecô  codå filesº FLTCOMP.COÍ (renameä PASCAL.COÍ oî ARIES-1©  anä P2/FLT.OVÌ  foò  thå  versioî  iî whicè REAÌ  numberó  arå  implementeä  aó floatinç  poinô  valueó internallù anä BCDCOMP.COÍ anä P2/BCD.OVÌ  foò  thå verò musô  havå  thå  extensioî '.SRC§  oò '.PAS§ indicatinç thaô iô ió á sourcå prograí file®  Therå musô bå  á carriagå return/linå feeä sequencå aô thå enä oæ eacè inpuô linå  anä aî inpuô linå maù noô bå longeò thaî 8° characters. :Invoking Pascal Thå  Pascal/MÔ  compileò ió invokeä oî ARIES-± bù usinç thå  followinç commanä -- PASCAL filename.DL wherå  'filename§  ió  thå namå oæ thå filå witè thå  extensioî  '.SRC§  oò '.PAS§ containinç thå Pascal/MÔ sourcå statementó  thå BCÄ versioî oæ thå  compiler¬  thå  commandó  arå similar except that 'PASCAL' is replaced by 'BCDCOMP'. :Compilation Switches Compile-timå  optionó maù bå specifieä tï thå compileò froí withiî thå sourcå file®  Sucè optionó takå thå forí oæ speciaì comments® Thå forí oæ theså commentó is (*$o info*) or {$o info} wherå  'o§  ió  thå  letteò oæ thå optioî anä  'info§  ió  informatioî particular to that option. These options are -- Š $I Include .SRC into source stream $L+ or $L- Turn listing on (default) or Turn listing off $P Insert form feed into .PRN file $D+ or $D- Turn debug code on (default) or Turn debug code off $C+ Use CALL instructions for real operations $Cn Use RST n for real operations (n=0 ... 7) $O $aaaa ORG program (run-time) at $aaaa (default 100H) $R $bbbb ORG RAM data at $bbbb $Z $cc00  list device (like, WRITE(PRINTER,'Hello')). The following extensions are implemented to handle files -- OPEN(fcbname,title,result{,extent_number}); (extent_number defaults to 0) CLOSE(fcbname,result); CREATE(fcbname,title,result); DELETE(fcbname); BLOCKREAD(fcbname,buffer,result{,relativeblock}); BLOCKWRITE(fcbname,buffer,result{,relativeblock}); where fcbname : a variable of type TEXT (array 0..32 of CHAR)     title : ARRAY [0..11] of CHAR with title[0]=disë   selecô  bytå  (0=loggeä  iî  disk¬ 1=A,...) title[1..8]=filename and title[9..11]=filetype result : integer to contain returned value buffer : ARRAY [0..127] of CHAR relativeblock : optional integer 0..255 :Special Functions and Procedures Pascal/MT supports the following special routines -- PROC MOVE(source,dest,length-in-bytes); num:constant; mask:constant; polarity:boolean); FUNC SIZEOF(variable or type name):integer; Please refer to pp 32-33 of "Pascal/MT 3.0 Guide" for further info. :Pascal/MT Symbolic Debugger Thå  debugginç  facilitieó availablå tï thå useò wheî  usinç  thå Šdebuggeò falì intï twï catagorieó -- prograí flo÷ controì anä variablå display. Iæ  thå useò wisheó tï seå thå commandó durinç thå  executioî  oæ the debugger, type a '?' followed by a return. Thå prograí flo÷G{,} G{,} Gï resumeó executioî wherå thå prograí lasô stopped®  Breakpoinô may be optionally set at a specific line or function/procedure. Debugger Command: T - Trace Syntax: T{} Execute one or more lines of the program. Debugger Command: E - Procedure/Function Display Toggle Syntax: {-}E Å  engageó displaù oæ thå nameó oæ procedures/functionó  entered» -Å disengageó it. Debugger Command: S -breakpoint is set for. Debugger Command: D - Variable Display Syntax: D D : D D ^ The D command is used as indicated. Debugger Commands: +,-,* - Variable Display Syntax: * -- display last value requested (using D or some other) +n -- display variable n bytes forward from last -n -- display variable n bytes backward from last :Pa BOOLEAN FALSE OF SETBIT WRITELN CASE FILE OPEN SHL CHAIN FOR OR SHR CHAR FUNCTION ORD SIM85 CHR GOTO OUTPUT SIZEOF CLOSE HI PACKED SQR CLRBIT IF PRED SQRT CONST INLINE PRINTER SUCC CREATE INPUT PROCEDURE  PROC EXIT; FUNC TSTBIT(16-bit-var,bit#):BOOLEAN; PROC SETBIT(VAR 16-bit-var,bit#); PROC CLRBIT(VAR 16-bit-var,bit#); FUNC SHR(16-bit-var,#bits):16-bit-result; {Shift Right} FUNC SHL(16-bit-var,#bits):16-bit-result; {Shift Left} FUNC LO(16-bit-var):16-bit-result; FUNC HI(16-bit-var):16-bit-result; FUNC SWAP(16-bit-var):16-bit-result; FUNC ADDR(variable reference):16-bit result; PROC WAIT(port commandó provideä iî thå symboliã debuggeò allo÷ thå useò tï debuç thå Pascal/MÔ prograí aô thå Pascaì sourcå statemenô level®  Includeä  arå go/continuå (witè optionaì breakpoint)¬  trace¬ set/clear/displaù  permanenô breakpoinô anä á modå whicè wilì  displaù thå namå oæ eacè procedure/functioî oî thå consolå aó thå procedurå oò function is entered. These commands are discussed briefly on the following displays -- Debugger Command: G - Go with optional breakpoint Syntax:  Set/Clear Slow Execution Mode Syntax: {-}S Ó  allowó  thå useò tï selecô Fast¬  Medium¬  oò  Slo÷  executioî speed; -S causes the program to run at full speed. Debugger Command: P - Set/Clear Permanent Breakpoint Syntax: -P (* Clears breakpoint *) P P P sets the permanent breakpoint; -P clears it. Debugger Command: B - Display Permanent Breakpoint Syntax: B Displays line the permanent scal/MT Reserved Words ABS DO LO READ TSTBIT ADDR DOWNTO MAXINT READLN TYPE AND ELSE MOD REAL UNTIL ARRAY ENABLE MOVE RECORD VAR BEGIN END NIL REPEAT WAIT BLOCKREAD EXIT NOT RIM85 WHILE BLOCKWRITE EXTERNAL ODD ROUND WRITE  SWAP DELETE INTEGER PROGRAM THEN DISABLE INTERRUPT RANDOMREAD TO DIV LABEL RANDOMWRITE TRUE :Notes 1. Hexadecimal values may be specified as $hhhh, like $1A = 1AH. 2®  Alì  standarä Pascaì typå definitionó excepô ARRAÙ arå  supported® Thå   standarä   forí   ARRAY...OÆ   ARRAY..®    musô   bå   specifieä   aó ARRAY[...,...,...], and a maximum of three dimensions may be used. 3. Type TEXT is ARRAY [0..35   ] OF CHAR. 4®  Interrupô Procedures¬  declareä aó "PROCEDURÅ INTERRUPT[iÝ proc;"¬ are supported, where i is the restart vector number (0..7). 5®  CP/Í  V²  randoí  filå  accesó  ió  supporteä  bù  RANDOMREAÄ  anä RANDOMWRITE. 6®  Machinå  code¬  constanô data¬  anä assemblù languagå codå maù  bå inserted using INLINE (see pp 37-39 of "Pascal/MT 3.0 User Guide"). 7. Chaining is supported by CHAIN, whose usage is "CHAIN(filename)". 8. Redirected I/O is supported (see pp 42-Introduction Executing MAC XMAC Assembly Control Parameters Assembler Pseudo-Ops Inline Error Messages Console Error Messages :Introduction MAà ió thå CP/Í Standarä Macrï Assembler» iô ió upward-compatablå witè ASM¬  thå CP/Í Standarä Assembler®  Thå facilitieó oæ MAà includå assemblù oæ   Inteì   808°  microcomputeò  mnemonics¬   alonç   witè   assembly-timå expressions¬  conditionaì assembly¬  pagå formattinç features¬  anä á macrï processoò  whicè  ió  compatablå witè thå standarä  rinô oò Listinç file)¬  anä  filename.SYÍ (a file containing a sorted list of the symbols used in the program). MACRÏ Librarù fileó maù bå referenceä bù thå program»  theså fileó arå named 'filename.LIB'. $parmó  representó thå optionaì assemblù controì parameteró whicè  arå discussed in the next section. MAà maù bå executeä bù employinç thå SUBMIÔ  filå  MAC.SUB®  MAC.SU assembleó  thå  specifieä MAà .ASÍ file¬  convertó iô intï á .COÍ filå  viá LOAD, and erases the .HEX fileopó anä controì parameters. Thå patcè filå XMAC.ASÍ containó thå patcheó useä tï converô MAà intï XMAC. Thå   librarù  fileó  MAC40.LI  anä  XMAC40.LI  contaiî  thå  macroó necessarù tï assemblå codå foò thå Inteì 404° microprocessor¬  foò example® MAC40.LI renameó thå 404° mnemonicó foò ADD¬  SUB¬  etc.¬  tï ADD4¬  SUB4¬ etc.¬  sï thaô iô wilì noô conflicô witè MAC®  XMAC40.LI doeó noô  renamå these, since XMAC does not recognize these in the first place. :Assembly Control Pation and destination of the .SYM file 1 - controls pass 1 listing Iî thå caså oæ thå A¬  H¬ L¬ P¬ anä Ó parameters¬ theù maù bå followeä bù thå drivå namå froí whicè tï obtaiî oò tï whicè tï senä data¬ wherå -- A,B,C,D -- designates that particular drive P -- designates the LST: device X -- designates the user console (CON:) Z -- designates a null file (no output) For example, $PB AA HB SX sendó  thå .PRÎ f43). vector number (0..7). 5®  CP/Í  V²  randoí  filå  accesó  ió  supporteä  bù  RANDOMREAÄ  anä RANDOMWRITE. 6®  Machinå  code¬  constanô data¬  anä assemblù languagå codå maù  bå inserted using INLINE (see pp 37-39 of "Pascal/MT 3.0 User Guide"). 7. Chaining is supported by CHAIN, whose usage is "CHAIN(filename)". 8. Redirected I/O is supported (see pp 42-Inteì  definitioî  (MAà implements the mid-1977 revision of Intel's definition). MAà requireó approximatelù 12Ë oæ machinå codå anä tablå space¬  alonç with an additional 2.5K of I/O buffer space. :Executing MAC MAC is invoked by the following command -- MAC d:filename $parms Onlù 'filename§ ió required¬ anä iô representó á filå nameä 'filename.ASM'® MAà maù  theî generatå uð tï ³ otheò fileó -- filename.HEØ (thå Inteì  Heø Formaô File)¬  filename.PRÎ (thå P. MAC.SUB is invoked by -- SUBMIT MAC filename where 'filename' is the name of the MAC file 'filename.ASM'. :XMAC XMAà ió á versioî oæ MAà whicè doeó NOÔ recognizå thå intrinsiã Inteì 808° assembleò languagå mnemonics®  XMAà ió intendeä tï bå useä foò Cross- Assemblù  usinç  .LI fileó whicè contaiî thå assembleò mnemonicó  foò  thå targeô  machine®  XMAà ió invokeä iî exactlù thå samå waù MAà ió  (excepô thaô  nï SUBMIÔ filå ió available)¬  anä iô recognizeó thå samå  pseudo-arameters Thå controì parameteò lisô ió precedeä bù á $¬  anä maù contaiî anù oæ the following in any order -- A - controls the source disk for the .ASM file H - controls the destination of the .HEX machine code file L - controls the source disk for the .LIB files M - controls MACRO listing in the .PRN file P - controls the destination of the .PRN listing file Q - controls the listing of LOCAL symbols Š S - controls the generilå tï drivå B:¬  getó thå .ASÍ filå froí drivå A:¬  sendó the .HEX file to drive B:, and sends the .SYM file to CON:. Thå parameteró L¬  S¬  M¬ Q¬ anä ± maù bå precedeä bù eitheò « oò - tï enable or disable their respective functions -- +L - list the input lines read from the MACRO library -L - suppress listing of the MACRO library (default) +S - append the .SYM output to the end of the .PRN file (default) -S - suppress the generation of the sorted symbol table     +M - list all MACRO lines as they are processed (default) -M - suppress all MACRO lines as they are processed *M - list only HEX code generated by macro expansions in listing +Q - list all LOCAL symbols in the symbol list -Q - suppress all LOCAL symbols in the symbol list (default) +1 - produce a listing file on the first pass (for MACRO debugging) -1 - suppress listing on pass 1 (default) Thå  programmeò  caî  intersperså  controló  throughouô  thå  assehe end of conditional assembly ENDM marks the end of a MACRO EQU performs a numeric "equate" EXITM abort expansion of the current MACRO level IF begins conditional assembly IRP INLINE MACRO with string substitution IRPC INLINE MACRO with character substitution LOCAL define LOCAL variables unique to each MACRO repetition MACLIB specify MACRO Library to load MACRO defiiteä properly from the next item by a comma Ä - Datå errorº elemenô iî á datá statemenô (DB,DW© cannoô bå  placeä in the specified data area E - Expression error: expression is ill-formed and cannot be computed I - Invalid character: a non-graphic character has been found L - Label error: label cannot appear in this context M - MACRO overflow error: internal MACRO expansion table overflow N - Not implemented error: unimplemented feature used Ï  - Overflo÷ ectory is full SOURCÅ  FILÅ NAMÅ ERROÒ - Thå forí oæ thå sourcå filå namå ió invalid» notå thaô MAà ió invokeä bù 'MAà filename'¬  anä thå .ASÍ filå typå ió  NOÔ specified. SOURCE FILE READ ERROR - Error in reading source file OUTPUT FILE WRITE ERROR - Error in writing output file Š CANNOT CLOSE FILE - An output file cannot be closed. UNBALANCED MACRO LIBRARY - No ENDM encountered for a MACRO definition INVALIÄ  PARAMETEÒ - Invaliä assemblù parameteò waó founä iî thå inInvoking MACRO-80 MACRO-80 Switches MACRO-80 Pseudo-Ops MACRO-80 In-Line Error Messages MACRO-80 Console Error Messages Invoking LINK-80 LINK-80 Switches Invoking LIB-80 LIB-80 Switches Invoking CREF-80 Debugging MACRO-80 Programs Using DEBUG.MAC :Invoking MACRO-80 MACRO-80 is invoked by the following command -- M80 obj:fn1.ext,lst:fn2.ext=src:fn3.ext where obj:fn1.ext is the device/filename for the object program lst:fn2.ext is the device/filename for the limblù languagå sourcå oò librarù files®  Intersperseä controló arå denoteä bù  á "$¢  iî  thå  firsô  columî oæ thå inpuô linå  followeä  immediatelù  bù  á parameter. :Assembler Pseudo-Ops The following Pseudo-Ops are supported -- DB defines data bytes or strings of data DS reserves storage areas DW defines words of storage ELSE alternate to IF END terminates the physical program ENDIF marks tnes beginning of a MACRO ORG sets the program or data origin PAGE defines the listing page size for output REPT defines the beginning of a INLINE MACRO SET performs a numeric "set" or assignment TITLE enables page titles and options :Inline Error Messages   - Balancå  errorº MACRÏ doesn'ô terminatå properlù oò  conditionaì assembly is ill-formed à - Commá  errorº  expressioî  waó  encountereä  buô  noô  delim errorº expressioî ió toï complicateä oò thå numbeò  oæ LOCAL labels has exceeded 9999 Р - Phaså  errorº  labeló doeó noô havå samå valuå  oî  botè  passeó (multiple label) Ò - Registeò errorº valuå specifieä foò á registeò ió noô  compatablå with op code S - Statement/Syntax error: statement is ill-formed V - Value error: operand is improperly formed or out of range :Console Error Messages NO SOURCE FILE PRESENT - .ASM file not found NO DIRECTORY SPACE - Dirpuô line. ilename'¬  anä thå .ASÍ filå typå ió  NOÔ specified. SOURCE FILE READ ERROR - Error in reading source file OUTPUT FILE WRITE ERROR - Error in writing output file Š CANNOT CLOSE FILE - An output file cannot be closed. UNBALANCED MACRO LIBRARY - No ENDM encountered for a MACRO definition INVALIÄ  PARAMETEÒ - Invaliä assemblù parameteò waó founä iî thå insting src:fn3.ext is the device/filename for the source :MACRO-80 Switches The following switches may be specified in the command line -- O Print all listing addresses in octal H Print all listing addresses in hexadecimal R Force generation of an object file L Force generation of a listing file C Force generation of a cross reference file Z Assemble Zilog (Z80) mnemonics I Assemble Intel    (8080) mnemonics Р Eacè /Ð allocateó aî extrá 25¶ byteó oæ stacë spacå foò uså during assembly. Use /P if stack overflow errors occur during assembly. :MACRO-80 Pseudo-Ops The following are the pseudo-ops recognized by MACRO-80 -- ASEG COMMON CSEG DB DC DS DSEG DW END ENTRY PUBLIC EQU EXT EXTRN NAME ORG PAGE SET SUBTTL TITLE .COMMENT .PRIA Argument Error O Bad opcode or objectionable syntax C Conditional nesting err P Phase error D Double Defined Symbol Q Questionable E External error R Relocation M Multiply Defined Symbol U Undefined symbol N Number error V Value error :MACRO-80 Console Error Messages No end statement encountered in input file -- no END statement Unterminated conditional -- at least set -- put loader back in initial state /E or /E:Name Exiô LINK-8° anä returî tï CP/M®  Searcè thå systeí librarù foò anù undefineä references®  /E:Namå useó Namå foò thå starô addresó  oæ the program. /G or /G:Name Starô  executioî  oæ  thå program®  Again¬  iæ  /G:Namå  ió specified, Name defines the start address of execution. /N Save the binary on disk under the name 'filename.COM'. /P:adr and /D:adr ed¬  /Ø wilì causå thå filå tï bå saved in Intel HEX format with a extension of .HEX. /Ù Iæ á filename/Î waó specified¬ /Ù wilì creatå á filename.SYÍ filå wheî /Å ió entered® Thió filå containó thå nameó anä addresseó oæ alì globals for use with SID or ZSID. :Invoking LIB-80 To invoke LIB-80, type -- LIB Commandó  tï LIB-8° consisô oæ aî optionaì destinatioî filenamå  whicè setó  thå  namå oæ thå librarù beinç created¬  followeä bù aî  equaì  sign¬ fol /L List cross reference /C Create -- start LIB over /E Exit -- rename .LIB to .REL and exit /R Rename -- rename .LIB to .REL :Invoking CREF-80 CREF-80 is invoked by typing -- CREF80 listing=source wherå  'listing§  ió  thå  namå oæ thå  filå  'listing.LST§  generateä  anä 'source§  ó  thå  namå  oæ thå filå  'source.CRF§  generateä  bù  MACRO-80® 'listing§ ió optional¬ and¬ iæ omitted¬ thå listinç filå generateä ió nameä 'source.LST'. :DebuggNTX .RADIX .REQUEST .Z80 .8080 IF IFT IFE IFF IF1 IF2 IFDEF IFNDEF IFB IFNB ENDIF .LIST .XLIST .CREF .XCREF REPT ENDM MACRO IRP IRPC EXITM LOCAL COND ENDC *EJECT DEFB DEFS DEFW DEFM DEFL GLOBAL EXTERNAL INCLUDE MACLIB ELSE .LALL .SALL .XALL Š:MACRO-80 In-Line Error Messages one conditional is unterminated Unterminated REPT/IRP/IRPC/MACRO -- at least one block is unterminated [xx] [No] Fatal error(s) [,xx warnings] -- the number of fatal errors and warnings :Invoking LINK-80 LINK-80 is invoked by typing -- L80 obj1:filename.ext/sw1,obj2:filename.ext/sw2,... wherå  objn:filename.exô  denoteó á .REÌ filå tï bå linkeä anä swî  denoteó switches which control the linking process. :LINK-80 Switches /R Re Seô  thå Prograí anä Datá areá originó foò thå nexô  prograí to be loaded. /U Lisô thå origiî anä enä oæ thå prograí anä datá areá aó welì as all undefined globals. /M Lisô  thå origiî anä enä oæ thå prograí anä datá  area¬  alì defineä globaló anä theiò values¬  anä alì undefineä globaló followeä bù aî asterisk. /S Search 'filename.REL' to satisfy references. /Ø Iæ á filename/Î waó specifiloweä bù modulå nameó separateä bù commaó oò filenameó witè modulå nameó enclosed in angle brackets separated by commas. Tï  selecô  á  giveî modulå froí á file¬  uså thå  namå  oæ  thå  filå followeä  bù  thå  module(s©  specifieä  encloseä  iî  anglå  bracketó  anä separateä  bù  commas®  Iæ nï moduleó arå selecteä froí á file¬  theî  alì modules are selected. :LIB-80 Switches /O Set listing radix to Octal /H Set listing radix to Hexadecimal /U List undefinedsing MACRO-80 Programs Using DEBUG.MAC Š DEBUG.MAà ió  á  packagå oæ MACROó whicè thå useò maù emploù  tï  aiä himselæ  iî debugginç MACRO-8° programs®  Thió packagå containó twï  prinô MACROs¬  onå  registeò displaù MACRO¬  anä onå exiô MACRO®  Iî alì  cases¬ these MACROs have no net affect on any register. DEBUG.MAà ió useä bù firsô specifyinç iô aó á MACRÏ Librarù withiî thå user's program. This is accomplished by the statement -- MACLIB DEBUG.MAC aó aî assembl   y-languagå instructioî aô thå beginninç oæ hió program®  Thió statemenô  loadó thå librarù DEBUG.MAà anä makeó itó MACROó  availablå  foò use. These MACROs are -- Name # Args Size (Bytes) Function Example ---- ------ ------------ -------- ------- EXIT 0/1 275 or 263+ Print an exit message, EXIT print the contents of EXIT all registers, and warm ô contaiî restricteä MACRO-80 symbols (such as !) or an error message will result. An example of the use of these MACROs follows -- MACLIB DEBUG.MAC -- code -- REGS ; print all register values at this point -- code -- PRINT ; got to check point 1 -- code -- EXIT ; should not have taken this path -- code -- PRINT ; got to check pointIntroduction to the Microsoft BASIC Interpreter Special Characters Variable Type Declaration Chars Commands Edit Mode Subcommands Program Statements (except I/O) PRINT USING Format Field Specifiers Input/Output Statements Operators Arithmetic Functions String Functions I/O and Special Functions Interpreter Error Codes Introduction to the Microsoft BASIC Compiler Compiler Commands and Switches Compiler Error Messages :Introduction to the Microsoft BASIC Interpreter Thió  HELÐ Filå ió files>][/M:] Iæ  Deletes last char typed Escapes Edit Mode Subcommands . Current line for EDIT, RENUM, DELETE, LIST, LLIST commands &O,& Prefix for Octal Constant &H Prefix for Hex Constant : Separates statements typed on the same line ? Equivalent to PRINT statement Š:Variable Type Declaration Characters $ String 0 to 255 chars % Integer -32768 to 32767 ! Single Precision 7.1 digit f boot CP/M PRINT 1 19+ Print a message on CON: PRINT PRINTC 1 17+ Print a char string on PRINTC <'M1',0DH> CON: REGS 0 241 Print the contents of REGS all registers on CON: Noteº Thå « afteò á sizå indicateó thaô onå musô adä tï thå indicateä sizå the number of characters specified in the parameter. Noteº  Messageó specifieä foò EXIÔ anä PRINÔ shoulä no 2 -- code -- EXIT ; normal exit -- code -- ROs follows -- MACLIB DEBUG.MAC -- code -- REGS ; print all register values at this point -- code -- PRINT ; got to check point 1 -- code -- EXIT ; should not have taken this path -- code -- PRINT ; got to check pointderiveä froí thå "Microsofô BASIà Referencå  Book"¬ anä  iô  ió divideä intï twï partó -- onå coverinç thå Interpreteò anä  thå otheò  coverinç thå Compiler®  Theså programó procesó programó writteî  iî almosô  exactlù  thå  samå languagå -- Microsofô  BASIC»  therå  arå  minoò differenceó betweeî thå two¬  however¬  anä theså arå discusseä iî thå filå under the Compiler Introduction. The MBASIC (Microsoft BASIC) Interpreter is invoked as follows -- MBASIC [][/F:<# . :Special Characters ^A Enters Edit Mode on line being typed or last line typed ^C Interrupts program execution and returns to MBASIC ^G Rings at terminal ^H Deletes last char typed ^I Tab (every 8) ^O Halts/resumes program output ^R Retypes the line currently being typed ^S Suspends program execution ^Q Resumes execution after ^S ^U,^X Deletes line being typed Ends every line being typed in Breaks a loating point # Double Precision 17.8 digit floating point :Commands Command Syntax Function AUTO AUTO [line][,inc] Generate line numbers CLEAÒ CLEAÒ [,[exp1][,exp2]Ý Cleaò prograí variables»  Exp± setó enä  oæ memorù anä Exp² setó amounô of stack space CONT CONT Continue program execution DELETE DELETE [[start][-[end]]]     Delete program lines EDIT EDIT line Edit a program line FILES FILES [filename] Directory LIST LIST [line[-[line]]] List program line(s) LLIST LLIST [line[-[line]]] List program line(s) on printer LOAD LOAD filename[,R] Load program; ,R means RUN MERGE MERGE filename Merge prog on disk with that in mem NAME NAME old AS new Change the name of a disk file NEW NEW sk»  ,Á saveó proç in ASCII and ,P protects file SYSTEM SYSTEM Return to CP/M TROFF TROFF Turn trace off TRON TRON Turn trace on WIDTÈ WIDTÈ [LPRINTÝ exð Seô terí oò printeò carriagå width» default is 80 (term) and 132 (prin) :Edit Mode Subcommands A Abort -- restore original line and restart Edit nCc Change, delete chars End edit and save changes :Program Statements (except I/O) Statement Syntax Function CALL CALL variable [(arg list)] Call assembly or FORTRAN routine CHAIN CHAIN [MERGE] filename [,[line exp][,ALL][,DELETE range]] Calì  á prograí anä pasó variableó tï it»  MERGÅ witè  ASCIÉ fileó allowó overlays» starô aô linå exð iæ given» ALÌ meanó alì variableó wilì bå passeä (otherwiså COMMOÎ only)» DELETÅ DEFSTR " " " " " " " String DIM DIM list of subscripted vars Allocate arrays END END Stop prog and close files ERASE ERASE var [,var ... ] Release space and var names ERROR ERROR code Generate error code/message FOR FOR var=exp TO exp [STEP exp] FOR loop Statement Syntax Function GOSUB GOSUB line number Call BASIC subroutine GOTO GOTO li ... ] End FOR ON ERROR ON ERROR GOTO line Error trap subroutine GOTO ON/GOSUB ON exp GOSUB line[,line] Computed GOSUB ON/GOTO ON exp GOTO line[,line] Computed GOTO Statement Syntax Function OPTION OPTION BASE n Min val for subscripts (n=0,1) BASE OUT OUT port,byte Output byte to port POKE POKE address,byte Memory put RANDOMIZE RANDOMIZE [exp] Reseed random nu Delete current prog and vars NULL NULL exp Set num of s after each line RENUM RENUM [[new][,[old][,inc]]] Renumber program lines RESET RESET Init CP/M; use after disk change Command Syntax Function RUN RUN [line number] Run a prog (from a particular line) RUN filename[,R] Run a prog on disk SAVÅ SAVÅ filename[,Á oò ,PÝ Savå proç ontï die n characters nD Delete n characters E End edit and save changes; don't type rest of line Hstr Delete rest of line and insert string Istr Insert string at current pos nKc Kill all chars up to the nth occurrance of c L Print the rest of the line and go to the start of the line Q Quit edit and restore original line nSc Search for nth occurrance of c Xstr Goto the end of the line and insert string Backspace over chars; in insert mod allows deletion of an overlay before CHAIN is executed COMMON COMMON list of vars Pass vars to a CHAINed prog DEF DEF FNx[(arg list)]=exp Arith or String Function DEF USRn=address Define adr for nth assembly routine DEFINT range(s) of letters Define default var type INTeger DEFSNG " " " " " " " Single DEFDBL " " " " " " " Double ne number Branch to specified line IF/GOTO IF exp GOTO line [ELSE stmt ... ] IF exp <> 0 then GOTO IF/THEN IF exp THEN stmt[:stmt] [ELSE stmt ... ] IF exp <> 0 then ... else ... LET [LET] var=exp Assignment MID¤  MID$(string,n[,m])=string²  Replacå á portioî oæ strinç  witè string2; start at pos n for m chars NEXT NEXT var[,varmber generator REM REM any text Remark -- comment RESTORE RESTORE [line] Reset DATA pointer RESUME RESUME or RESUME 0 Return from ON ERROR GOTO RESUME NEXT Return to stmt after error line RESUME line Return to specified line RETURN RETURN Return from subroutine STOP STOP Stop prog and print BREAK msg WAIÔ WAIÔ prot,mask[,selectÝ     Pauså untiì inpuô porô [XOÒ selectÝ AND mask <> 0 WHILE/ WHILE exp stmts ... WEND Execute stmts as long as exp is T WEND :PRINT USING Format Field Specifiers Numeric Specifiers Specifier Digits Chars Definition # 1 1 Numeric field . 0 1 Decimal point + 0 1 Print leading or trailing sign - 0 1 Trailing sign (- if neg, otherwise) haracter // Character field; width=2+number of & Variable length field :Input/Output Statements Statement Syntax/Function CLOSE CLOSE [[#]f[,[#]f ... ]] Close disk files; if no arg, close all DATA DATA constant list List data for READ statement FIELD FIELD [#]f,n AS string var [,n AS string var ...] Define fields in random file buffer GET GET [#]f[,record number] Reat string;] string var INPUÔ Reaä aî entirå linå froí terminal»  leadinç semicoloî suppresseó echo of / LINE INPUT #f,string var Read an entire line from a disk file LSET LSET field var=string exp Storå datá iî randoí filå buffeò left-justifieä oò  left-justifù a non-disk string in a given field OPEN OPEN mode,[#] f,filename Open a disk file; mode must be one of -- I = sequential input file o a data file READ READ var [,var ...] Read data from a DATA statement into the specified vars RSET RSET field var = string exp Storå  datá  iî  á randoí filå buffeò righô justifieä  oò  righô justify a non-disk string in a given field WRITE WRITE [list of exps] Output data to the terminal WRITE #f, list of exps Output data to a sequential file or a random field buffer :Operators Symbol Function = Assign =,>,<, Relational tests (TRUE=-1, FALSE=0) <=,=<, >=,=>, <> The precedence of operators is -- 1. Expressions in parentheses 8. Relational Operators 2. Exponentiation 9. NOT 3. Negation (Unary -) 10. AND 4. *,/ 11. OR 5. \ 12. XOR 6. MOD 13. IMP 7. +,- 14. EQV :Arithmetic Functions Function Action ABS(exp) Absol** 2 2 Leading asterisk $¤  ±  ² Floatinç dollaò sign»  placeä iî  fronô  oæ leading digit **$ 2 3 Asterisk fill and floating dollar sign , 1 1 Use comma every three digits ^^^^ 0 4 Exponential format _ 0 1 Next character is literal String Specifiers Specifier Definition ! Single cd a record from a random disk file INPUT INPUT [;] [prompt string;] var [,var ...] INPUT [;] [prompt string,] var [,var ...] Reaä  datá froí thå terminal»  leadinç semicoloî suppresseó echï oæ  /0 or omitted returns new random number Function Action SGN(exp) 1 if exp >0 0 if exp =0 -1 if exp <0 SIN(exp) Sine of the expression (in radians) SQR(exp) Square root of eSTR([exp,]str1,str2) Returnó  thå firsô positioî oæ thå firsô occurrencå oæ  str² in str1 starting at position exp LEFT$(str,len) Returns leftmost length chars of the string expression LEN(str) Returns the length of a string MID$(string,start[,length]) Returnó charó froí thå middlå oæ thå strinç startinç aô  thå positioî  specifieä  tï thå enä oæ thå strinç oò foò  lengtè characters Function Action OCT$(nvertó  thå  strinç  representatioî oæ á  numbeò  tï  itó numeric value :I/O and Special Functions Function Action CVI(str) Converts a 2-char string to an integer CVS(str) Converts a 4-char string to a single precision number CVD(str) Converts an 8-char string to a double precision number EOF(f) Returns TRUE (-1) if file is positioned at its end ERL Error Line Number ERR Error Code Number INP(port) Inputs a byte from afied by exp POS(n) Returns carriage position of terminal (n is dummy) SPC(exp) Used in PRINT statements to print spaces TAB(exp) Used in PRINT statements to tab to specified position USR[n](arg) Calls the user's machine language subroutine with the arg VARPTR(var© Returnó addresó oæ vaò iî memorù oò zerï iæ vaò haó noô beeî assigned a value VARPTR(#f© Returnó thå addresó oæ thå disë I/Ï buffeò assigneä tï  filå number :Interpreter  21 Unprintable error 9 Subscript out of range 22 Missing operand 10 Redimensioned array 23 Line buffer overflow 11 Division by zero 26 FOR without NEXT 12 Illegal direct 29 WHILE without WEND 13 Type mismatch 30 WEND without WHILE Disk Errors -- Code Error Code Error 50 Field overflow 58 File already exists 51 Internal error 61 Disk full 52 Bxpression TAN(exp) Tangent of the expression (in radians) :String Functions Function Action ASC(str) Returns ASCII value of first char in string CHR$(exp) Returns a 1-char string whose char has ASCII code of exp FRE(str) Returns remaining memory free space HEX$(exp) Converts a number to a hexadecimal string INPUT$(length [,[#]f]) Returnó á strinç oæ lengtè charó reaä froí consolå oò froí á disk file; characters are not echoed INexp) Converts an expression to an Octal string RIGHT$(str,len) Returns rightmost length chars of the string expression SPACE$(exp) Returns a string of exp spaces STR$(exp) Converts a numeric expression to a string STRING$(length,str) Returnó  á strinç lengtè lonç containinç thå firsô  chaò  oæ the str STRING$(length,exp) Returnó  á strinç lengtè lonç containinç charó witè  numeriã value exp VAL(str©  Con input port LOC(f© Returnó nexô recorä numbeò tï reaä oò writå (randoí file© oò number of sectors read or written (sequential file) LPOS(n) Returns carriage position of line printer (n is dummy) MKI$(value) Converts an integer to a 2-char string MKS$(value) Converts a single precision values to a 4-char string MKD$(value) Converts a double precision value to an 8-char string Function Action PEEK(exp) Reads a byte from memory location speciError Codes Code Error Code Error 1 NEXT without FOR 14 Out of string space 2 Syntax error 15 String too long 3 RETURN without GOSUB 16 String formula too complex 4 Out of data 17 Can't continue 5 Illegal function call 18 Undefined user function 6 Overflow 19 No RESUME 7 Out of memory 20 RESUME without error 8 Undefined line ad file number 62 Input past end 53 File not found 63 Bad record number 54 Bad file mode 64 Bad file name 55 File already open 66 Direct statement in file 57 Disk I/O error 67 Too many files :Introduction to the Microsoft BASIC Compiler Thå followinç direcô modå commandó arå NOÔ implementeä oî thå compileò and will generate an error message -- AUTO CLEAR CLOAD CSAVE C   ONT DELETE EDIT LIST LLIST RENUM COMMON SAVE LOAD MERGE NEW ERASE Thå  followinç statementó arå useä differentlù witè thå compileò  thaî with the interpreter (refer to the manual for details) -- CALL DEFINT DEFSNG DEFDBL DEFSTR DIM ERASE END ON ERROR GOTO RESUME STOP TRON TROFF USRn :BASIC Compiler Commands and Switches TheÅ NEXÔ is used /N Do not list generated object code /D Generate debug/checking code at runtime /S Write quoted strings of more than 4 chars as they are encountered /4 Recognize Microsoft 4.51 BASIC Interpreter conventions /à Relaø  linå  numberinç  constraints»   lineó  neeä  noô  bå  numbereä sequentially; /4 and /C may not be used together /Z Use Z80 opcodes :BASIC Compiler Error Messages Compile-Time Fatal Errors SN Syntax error OM Ou ND Array not dimensioned SI Statement ignored Run-Time Error Messages 2 Syntax error 52 Bad file number 3 RETURN without GOSUB 53 File not found 4 Out of data 54 Bad file mode 5 Illegal function call 55 File already open 6 Floating/Integer ovfl 57 Disk I/O error 9 Subscript out of range 58 File already exists 11 Division by zero 61 Disk full 14 Out of strå!9"Ô¯2!Í!]~þ Ê·Â0+Ž ëÍ)>2ÃF!e~þ Ê=·ÂF—ëÍ)\ÍþÿÂa:·ÂnÆÍÉ!Ö"‚Í4·Êg1Ô!Ö~þ:‚ÍØ*ÔùÉÍ›1ÍÍýþÊ}þ*ÊêæßõÍŠñÖ@GʨÒ±ëÍ ¹Ò¨*~ÂÄ#ÍØÂ~#þÊáþ ÊÖþ ÂÄ#~þ:ʹþÂÄÍÂ*~Í•#ÍÛ~þÂðÃnÅÕåÍáÑÁõÍŠñÉõÅÕå_ÍáÑÁñÉÅÕå ÍáÑÁÉ~æ#Â)É\Íõ*‚€€ëÍ)ë"‚ñÉ~þ Êaþ ÊbÍ#ÃO##ÍŠ:€=2€ÀšÍÍýæßþAÊnþÊ}͕͊É> Í> ÍÉ>2€É!ÖÍ•>A2}lÍ~þ:ÊÔþÊ} :}Í<2}>.Í> ÍÍOî"~ÉÍ•ÍO~þÊþ:Êþ ÂÛÍôÃÛ:€GÅÍcÁÂø compiler is invoked by the BASCOM command; it may be called by -- BASCOM or BASCOM command line where "command line" is -- [dev:][obj file][,[dev:][lst file]]=[dev:]source file[/switch ...] Iæ  jusô BASCOÍ ió used¬  thå useò wilì bå prompteä witè aî  asterisk¬ after which he should enter the command line. Switches -- /E Use this switch if ON ERROR GOTO with RESUME is used /Ø Uså thió switcè iæ OÎ ERROÒ GOTÏ witè RESUME¬ RESUMÅ 0¬ oò RESUMt of memory SQ Sequence error TM Type mismatch TC Too complex BS Bad subscript LL Line too long UC Unrecognizable command OV Math overflow /0 Division by zero DD Array already dim'ed FN FOR/NEXT error FD Function already def UF Function not defined WE WHILE/WEND error /E Missing /E switch /X Missing /X switch Compile-Time Warning Errorsing space 62 Input past end 20 RESUME without error 63 Bad record number 21 Unprintable error 64 Bad filename 50 Field overflow 67 Too many files 51 Internal error  mode 5 Illegal function call 55 File already open 6 Floating/Integer ovfl 57 Disk I/O error 9 Subscript out of range 58 File already exists 11 Division by zero 61 Disk full 14 Out of stråÉÍŠ:€=2€Â-ÍÍýþÊ}Í•ÉHELP V1.1 $ ++ EOI ++ Type CTRL-C to return to CP/M, to continue -$ HELP File Selections are -- $HELP HLP Type "A"=Abort, CTRL-C=CP/M, =Cont -$ HELP FATAL ERROR -- File not Found$ HELP ERROR -- Invalid Response $ HELP ERROR -- EOF on HELP File $ Type CTRL-C to return to CP/M, "*" to select all, or enter selection - $ections are -- $HELP HLP Type "A"=Abort, CTRL-C=CP/M, =Cont -$ HELP FATAL ERR:The HELP Subsystem for Online Documentati   on This is HELP, the Online Documentation Subsystem. The purpose of HELP is to allow the user to interactively query the *.HLP files of the system in order to receive information summaries on various aspects of the user's working environment, such as the language systems he is using and certain subsystems available to him. When the user types 'HELP', a search is done for the file 'HELP.HLP'. If found, the contents of this HELP File is displayed to the user; if not found, the HELP Infor; ; The missing 'HELP' facility for ZCPRKPII ; 24 June 1983 ; Gary K. Berkheiser ; Ergo Software, Inc. ; ; This helps compensate for a lack of on-line ; documentation that came with my copy of ZCPRKPII ; which was obtained via the Kaypro Users Group of N.J. ; My thanks guys, so here's a little bit in return. ;........................GKB ; ; ; My source of information for CP/M is: ; "CP/M PROGRAMMER'S REFERENCE GUIDE" ; revised edition, by Sol Libes, ; Editor of 'MICROSYSTEMS' ; ; In ready status ;00=not rdy, ff=ready ; ; org 0100h ;start of it all ; begin: lxi h,0 ;save system sp dad sp ; shld oldsp ;saved lxi sp,stack ;set our stack lxi d,screen1 ;bring up first screen mvi c,msgout call bdos call getres ;wait for user done with this one lxi d,screen2 ;bring up the second screen mvi c,msgout call bdos done: lhld oldsp ;restore cp/m stack sphl ; ret ;no reboot as no files used ; get user keystroke ; if its a control-c exit, otherwise retue.typ Search for named file ' db 'on specified drive.',cr,lf db 'DIR (d:)*.typ Display all files of ' db '"typ" on specified drive.',cr,lf db 'DIR (d:)filename.* Display all types of ' db '"filename" on specified drive.',cr,lf,cr,lf db 'TYPE (d:)filename.typ Display ascii file on ' db 'console.',cr,lf db 'LIST (d:)filename.typ Copy ascii file to ' db 'listing device. No paging.',cr,lf,cr,lf db 'ERA (d:)filename.typ Erase specified file.',cr,lf db 'ERA (d:)*.* Erase all files on seleccified drive.',cr,lf db '[more]$' screen2:db 1ah,' ' db 'ZCPR BUILT-IN COMMANDS ' db 'Page 2',cr,lf,cr,lf db 'GO Start program execution ' db 'at 100H.',cr,lf,cr,lf db 'GET Load a file anywhere in ' db 'memory. Will not allow',cr,lf db ' overwrite of BDOS or BIOS.' db cr,lf db 'JUMP xxxx Start program execution ' db 'at "xxxx" - address in HEX.',cr,lf,cr,lf db ' ' db 'ADDITIONAL mation you are now reading is displayed. If the user desires information on a specific topic and he has a HELP File of that name (ie, CPM.HLP is a HELP File on CP/M), he may issue of HELP Command of the form -- HELP d:topic where "d:" is the disk the HELP File resides on (optional) and "topic" is the name of the HELP File (topic.HLP, like CPM.HLP). Please refer to the HELP File "HELP.HLP" for more information. formation on ZCPR came from an article in the June 1983 ; 'MICROSYSTEMS' pp 90-98 ; -and- ; 'DOCTOR DOBB'S JOURNAL' #81 July 1983, pp 86-90 ; ; ; ; equates cr equ 0dh ;carriage return lf equ 0ah ;linefeed ctlz equ 1ah ;control-z(clear screen) ctrlc equ 3 ;control-c(exit) ; ; bdos equates ; bdos equ 0005h ;address to call for access conin equ 1 ;get a character from console conout equ 2 ;display a character on the console msgout equ 9 ;send string to console const equ 11 ;consolern ; getres: mvi c,const ;look for character ready call bdos ora a ;check result jz getres ;loop on no character mvi c,conin ;get input character call bdos cpi ctrlc ;is it abort character? jz done ;exit if so ret ;return with character ; ; ; messages ; screen1: db 1ah ;screen clear db ' ' db 'ZCPR BUILT-IN COMMANDS' db ' Page 1',cr,lf,cr,lf db 'DIR (d:) Display files on selected ' db 'drive.',cr,lf db 'DIR (d:)filenamted ' db 'drive and current user.',cr,lf db 'ERA (d:)*.typ Erase all files of "typ".' db cr,lf db 'ERA (d:)filename.* Erase all files of "filename".' db cr,lf,cr,lf db 'REN (d:)newname.type=oldname.typ ' db ' Rename a file.',cr,lf,cr,lf db 'SAVE n (d:)filename.typ' db ' Save "n" 256 byte pages of memory to disk.',cr,lf db cr,lf db 'USER n Change to a new user area. ' db '(n=0 to 15)',cr,lf db 'DFU n Change default user.' db ' (n=0 to 15)',cr,lf,cr,lf db 'd: Log in speUTILITIES',cr,lf,cr,lf db 'FF Send a formfeed to the ' db 'listing device.',cr,lf db 'PRT96 Set OKI92 to print at ' db '12 cpi.',cr,lf db 'PRT144 Set OKI92 to print at ' db '17.5 cpi.',cr,lf db 'PRT80 Set OKI92 to print at ' db '10 cpi.',cr,lf,cr,lf db 'CLS Clear KAYPRO II screen.' db cr,lf,'$' ; oldsp: ds 2 ;save stack ds 22 ;our stack stack: ds 2 ; end    åååååååååå   åååååååååå   åååååååååå   åååååååååå   åååååååååå   åååååååååå   åååååååååå   åååååååååå   åååååååååå   åååååååååå   åååååååååå   åååååååååå   åååååååååå   åååååååååå   åååååååååå   åååååååååå   åååååååååå   åååååååååå   åååååååååå    åååååååååå!   åååååååååå!   åååååååååå"   åååååååååå"   åååååååååå#   åååååååååå#   åååååååååå$   åååååååååå$   åååååååååå%   åååååååååå%   åååååååååå&   åååååååååå&   åååååååååå'   åååååååååå'   åååååååååå