IMD 1.15: 15/05/2007 13:45:21 fog mis 018   åååååååååå  åååååååååå  åååååååååå  -FOG/MIS018/MIS#018DOC ,BARCODE BAS%BARCODE DOC &CBASIC HLP1 MBASIC HLP&PLOT BAS'(PLOT DOC )åUNPROTECDOC *WS HLP/ !XMODEM HLP)"#$ZCPR2TEZDOCo/MIS#018CRC+åååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååååå ZCPR2 Teaser Teaser for ZCPR2 The Z80-based Command Processor Replacement Version 2 (ZCPR2) is a replacement for the CP/M Console Command Processor (CCP) which creåates an extremely capable and flexible environ- ment, placing a totally new interface on the user's CP/M system. The primary purpose of ZCPR2 is to improve the user's product- ivity by giving him an environment which is much more responsi  ve to his needs and configurable to his specific desires than CP/M 2.2 while still remaining CP/M 2.2 compatable and allowing him to run most, if not all, of his CP/M software with little or no modification. ) -- a tutorial on the basic concepts associated with using ZCPR2, the ZCPR2 System of Programs, and the ZCPR2 environments 3) Rationale -- why things were done the way they  ZCPR2 Overview ZCPR2 provides an interactive interface to the user's micro- computer which is significantly extended over that interface provided by the CP/M 2.2 CCP. The user is invited to refer to the Rationale Manua were done under ZCPR2 4) User's Guide -- how to use ZCPR2, including details on all of the ZCPR2 commands in the ZCPR2 System Directories under ZCPR2 A directory under ZCPR2 is a user area on a disk, and l for a detailed comparison between the CP/M 2.2 CCP and ZCPR2. A working knowledge of CP/M 2.2 is assumed for the following discussion. Also, the following discussion pertains to ZCPR2 systems which are configured in the recommended it is identified by the combination of the disk letter and the number of the user area (like A10 or B7) or by a mnemonic name (like JEFF or ROOT). The directory is a logical concept, and there is only one physical file directory (w way (see the Installation Manual). There are over 4,000,000 ways (conceivably) that one may configure a ZCPR2 system for his own uses, and, as a general rule, the features described below may be turned on or off as the system manager deshich keeps track of all the files) on each logical disk. Page 1 ZCPR2 Teaser The disk/user way of identifying a directory (called the ires. There are currently four documents planned to accompany ZCPR2. These documents and their functions are: 1) Installation Manual -- How to Install ZCPR2 2) Concepts Manual (this teaser was derived from itDU form from here on) is standard to the ZCPR2-resident commands and the ZCPR2-specific utilities. In all cases, these commands will permit use of the DU: form wherever the simpler D: form was used under CP/M 2.2, and the D part of the   DU: form is optional. For instance, the following ZCPR2-resident commands are valid exam- ples which illustrate the utility of this extended directory specification: A>DIR A7: A>DIR A: A>DIR 7:  is no longer necessary and is not available under ZCPR2 unless a programmer implements it as a transient. ZCPR2 is a replacement for the CP/M 2.2 CCP, but it is only a part of the ZCPR2 SYSTEM. The ZCPR2 System is a collection of  A>ERA B22:MYFILE.TXT A>TYPE C31:README.TXT A>LIST 12:LOCAL.MSG A>SAVE 2DH C12:SYSTEM.CPM Hence, the user can "sit" in any directory on any disk and readily work with files in any other di programs consisting of ZCPR2 itself and a series of utilities designed to augment the capabilities of ZCPR2. All of these utilities respond to the ZCPR2 DU form, just like the ZCPR2- resident commands, while the conventional Crectory on any disk. Likewise, where the user used to be able to prefix a COM file with a disk letter in order to temporarily log into another disk and extract that file from it, the ZCPR2 user can prefix a COM file with a DU foP/M utilities do not. For example, the following commands show examples of some of the ZCPR2 utilities available in the ZCPR2 distribution: Page 2 rm: A>7:MYPROG A>C31:RUNIT A>B:MYGO Finally, the third logical extension of this DU form is to allow the user to employ it to "log into" a directory, like he used the D: form before to simply ZCPR2 Teaser A>XDIR B7: A>ERASE C4:FILE1.TXT,B31:FILE2.TXT,FILE3.TXT A>RENAME B12:*.BAS=*.BAK,14:MYFILE.TXT=HISFILE.TXT A>MCOPY C22:=A11:*.* These ZCPR2 utilities, however, support  change disks and the "USER n" command to change user areas: A>B7: B7>12: B12>C: C12>0: C> As a side note, because of the flexibility of the DU form, the USER commanda second form of directory specification as well as the DU form. This is the named directory specification, called the DIR form from now on. The DIR form is a logical association between a mnemonic name and a disk/user area. For   example, the directory name of ROOT may be assigned to mean A0, JEFF to mean C4, BACKUP to mean C0, etc. All of the ZCPR2 utilities (by and large) recognize this form as well; the following are examples: A>XDIR WORK1:*.ASM 2 Named Directory Structure ZCPR2 Resident Commands Like the CP/M 2.2 CCP, ZCPR2 contains some commands within itself. It contains all of the CCP commands (except USER, which isn't needed anymore) and a few more, but all of th A>ERASE TEXT1:FILE1.TXT,TEXT2:FILE2.TXT,FILE3.TXT A>RENAME JEFF:*.BAS=*.BAK A>MCOPY BACKUP:=*.* With the named directory environment fully implemented, the user's ZCPR2 system can be configured in a nue ZCPR2 resi- dent commands are different with logical extensions to the CCP commands. We have already seen the DU form, which can be used with any ZCPR2 resident command. Note that the DU form is a logical extension of the D: pmber of different ways beyond even the 4,000,000+ basic ways ZCPR2 can be config- ured. In particular, a directory tree structure can be set up, similar to the UNIX concept but much more flexible. For example, the following environmrefix under CP/M 2.2. The following is a comparison of the various resident com- mand forms under the CP/M 2.2 CCP and ZCPR2: Page 3 ZCPR2 Teaent is one such working environment which can be created under ZCPR2: ----------------- ROOT ----------------------- | / \ | ROBERT JEFF LINDA BOSS ser Comparison of ZCPR2 and CP/M 2.2 CCP Resident Commands Function ZCPR2 Command CCP Command Display $DIR File Names DIR DU:afn DIR D:afn Display $SYS | / | \ / | | \ | || HARDWORK JA CB JC LA CB LC LD WATCHJ |WATCHL / | | WATCHR GAMES SCHOOL GAMES Sample ZCPR File Names DIR DU:afn S No Equivalent Display All File Names DIR DU:afn A No Equivalent Erase Specified Files ERA DU:afn ERA D:afn Erase with Verify ERA DU:afn V No Equivalent   Rename File REN DU:ufn=ufn2 REN DU:ufn=ufn2 Rename Over Existing File REN DU:ufn=ufn2 No Equivalent Print File on Console TYPE DU:ufn P TYPE D:ufn Without Paging Print File on Console TYPE Page 4 ZCPR2 Teaser ZCPR2 Standard Transient Commands All of the CP/M-supplied transient commands will work with ZCPR2, and ZCPR2 supplies several addit DU:ufn No Equivalent With Paging Print File on Printer LIST DU:ufn No Equivalent Save Memory into File SAVE n DU:ufn SAVE n D:ufn Save Memory into File SAVE n DU:ufn No Equivalent Wiional ZCPR2-specific tran- sients, as indicated in the following tables: Program Function ------- --------- CD Log Into Named Directory with Extended Preprocessing COMPARE Utility to Compare Two Files CRC Cyclic Redth Overwrite Warning Save Memory into File SAVE nH DU:ufn No Equivalent and Specify Size in Hex Save Memory into File SAVE n DU:ufn S No Equivalent and Specify Number of or Blocks SAundancy Check Utility DIFF Utility to List File Differences DUTIL Disk Utility, based on DU ECHO Utility to Echo Its Command Line ERASE File Erase Utility FINDBAD Bad Block Scanner, based on FINDBD GENINS Utility toVE nH DU:ufn S Load File Anywhere Into GET adr DU:ufn No Equivalent Memory Reexecute Last Transient GO params No Equivalent Without Reloading It Call Subroutine Anywhere in JUMP adr No Equival Install Itself and Other Utilities HELP Online Documentation System LD Load Named Directory Buffer LU/LRUNZ Command Library Utility and Extended Command Processor MCHECK Menu File Syntax Checker MCOPY File Copy Utility went Memory Change Disk D: D: Change User U: USER n Change Disk and User at DU: No Equivalent Same Time hich can replace PIP in many cases MENU Extended Command PreProcessor designed to create menus MKDIR Create Named Directory File PATH Define/Display ZCPR2 Paths PROTECT Utility to Set File Attributes PWD Print Current N  amed Directory Environment RENAME File Rename Utility STARTUP Initial Command Line Generator SUB2 Extended SUBMIT Indirect Command File Facility XDIR Directory Display and Scan Utility ZEX Memory-Based Indirect Command F Command processing under ZCPR2, however, is quite different: 1) Input and Parse Command Line from User or File 2) Determine if it is a ZCPR2-resident command and run it if so 3) Search along ile Facility and Monitor Multiple Command Lines Another major feature of ZCPR2 is the Multiple Command Line. Unlike CP/M 2.2, ZCPR2 will allow you to specify a sequence of commands to be executed on one line. Under the rthe command search path, logging into the disks and user areas indicated in the path until either the bottom of the path is reached or the desired COM file is found; run program if found 4) Invokecommended configuration, each command is separated by a semicolon. For example: A>B:;DIR A7:*.TXT;DIR C22:*.COM A;C7:;ERA *.COM;DIR A>1:;TINIT ASM;B7:;WS TEST.TXT;ERA *.BAK;XDIR e an Extended Command Processor, passing the Command Line to it 5) Print error message if 2, 3, and 4 fail As the reader can see, the concept of a path is fundamental to ZCPR2. In the ZCPR2 vernacular, a P Page 5 ZCPR2 Teaser Paths Command processing under CP/M 2.2 is really quite simple: 1) Input and Parse Command Line from User or File ath is a sequence of directories to be searched for a file. The specification of a path is as a sequence of DU forms which are extended by the introduction of the "$" character to indicate a current disk or current user area.  2) Determine if it is a CCP-resident command and run it if so 3) Determine if there is a COM file in the current disk/user area and load it and run it if so 4) Print error message if 2 and 3 fail  Examples of paths are: 1) $$ $0 A$ A0 -- Path From Current Disk/Current User to Current Disk/User 0 to Disk A/Current User to Disk A/User 0 (Current Disk/User is the disk/user area that   the user is logged into) 2) $$ A0 A22 A14 B22 C12 C0 B0 $0 A$ -- I think you can follow this path; this is to illustrate that a path length is indefinite (usually up to 16 directories, wefined 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ä flexibilhich is quite reasonable) and can extend into user areas beyond 15, which can't be logged into When ZCPR2 searches for a file, it follows such a path. Two extremely flexible features about the ZCPR2 designitù  oæ CBASIC¬  á duaì floppù disë systeí anä aô leasô 32Ë oæ memorù ió recommended® Iæ CBASIà ió executeä iî á  systeí smalleò thaî 20K¬  á CP/Í LOAÄ ERROÒ  maù occur. Thå CBASIà systeí consistó oæ twï programó  -- CBASIà anä CRUN®  C are: 1) the command search path may be redefined dynamically by the user 2) several ZCPR2 transients use paths also, and these paths may be the same path used by command search or BASIà 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à (witè thå $  optioî  tï suppresó listing)¬ anä ruî iô usinç CRUN. Refer to t they may be unique to each transient Page 6  ZCPR2 transients use paths also, and these paths may be the same path used by command search or he 84-page CBASIC manual -- C B A S I C A Commercially Oriented Compiler/Interpreter BASIC Language Facility for CP/M Systems February 17, 1978 CBCBASIC 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 PredASIC²  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¬ CBASIC² addó thå following: 1. Integer variables 2. Chaining with common vari  ables 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å witè thå Veó  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å  printeä  eveî  iæ Togglå  ió set®  Togglå  doeó noô affecô listinç tï thå printersioî ² Run-Timå Monitoò (CRUN2). Foò furtheò information¬ refeò tï thå 100-pagå referencå manuaì -- C B A S I C A Commercially Oriented Š Compiler/Interpreter BASIC Language Facility eò (Togglå F© oò disë filå (Togglå 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. 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®  T 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å variablå aó 'amt'. Toggle D is initially off. TOGGLÅ Ehå toggleó   arå  seô  bù  typinç  á  dollar-sigî  ($© followeä bù thå letteò designationó oæ thå  desireä toggleó  startinç  onå  spacå  oò  morå  afteò  thå prograí namå oî thå commanä line® Toggleó maù onlù bå seô foò thå compiler. Exº 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 iampleó  oæ  compileò toggleó anä  invocatioî formó arå -- CBAS2 INVENTRY $BGF B:CBAS2 A:COMPARE $GEC CBAS2 PAYROLL $B CBAS2 B:VALIDATE $E CBASIà Compileò Toggles TOGGLÅ  Bº  Suppresss initially off. TOGGLÅ Fº  Causeó thå compileò outpuô listinç tï bå printeä oî thå LSTº devicå iî additioî tï thå Šsysteí console® Toggle F is initially off. TOGGLÅ Gº  Causeó thå compileò outpuô listinç tï bå writteî tï dis  kette® Thå filå containinç thå compileò  listinç  haó  thå samå namå aó  thå  .BAÓ file¬ buô itó typå ió .LST. Normallù  thå disë listinç wilì bå  placeä  oî thå  samå  sourcå drivå aó thå  sourcå  file®  Thå operatoò maù selecô anotheò driå  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å oò untiì thå enä oæ thå commanä  linå  becomå  thå  title®  Thå  titlå  ió truncateä vå bù specifyinç thå desireä drive¬  encloseä iî parens¬ followinç thå Ç toggle» foò example, CBAS2 B:TAX $G(A:) extractó  thå  sourcå froí drivå Bº  anä sendó  thå listinç tï drivå A:. Toggle G is initially off. :CBASIC2: XR tï  3° characteró iæ thå listinç ió  13² columnó widå anä 2° characteró iæ thå Ä togglå  (8° columî listing© ió specified. XREF Toggles Togglå  Aº  Causeó thå listinç tï bå otpuô tï thå lisô devicå aó wEF 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ó elì aó thå disë file. Togglå Bº  Suppresseó outpuô tï thå disk® Iæ onlù  thå  Â  togglå ió  specified¬  nï  outpuô  ió produced. Togglå Cº  Suppresseó outpuô tï thå disë  anä Špermitó outpuô tï thå lisô device»  samå aó Á anä  coprovided¬ 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æ  typå XRF®  Thå standarä outpuô ió 13²  columnó wide. The following command is used to invokembined. Togglå  Dº  Causeó  outpuô tï bå 8°  columnó widå insteaä oæ 132. Togglå  Eº  Produceó  outpuô witè  onlù  thå identifieró anä theiò usage. Foò example¬  thå followinç commanä produceó á crosó referencå listinç o XREF -- XREF [disk ref] [$] ['title'] Iæ   thå  disë  referencå  ió  specified¬   iô instructó XREÆ aó tï whaô disë tï placå thå  outpuô on. The toggles are described on the next display. Thå  optionaì  titlî thå lisô devicå whicè ió 8° columnó widå -- XREF PROG $CD :CBASIC: Compiler Error Messages Text Messages NO SOURCE FILE: .BAS Thå  compileò coulä noô locatå á  sourcå  filå useä  iî  eith  eò  á CBASIà commanä  oò  aî  INCLUDÅ directive. PROGRAM CONTAINS n UNMATCHED FOR STATEMENT(S) Therå  arå  î FOÒ statementó foò whicè á  NEXÔ coulä noô bå found. PROGRAM CONTAINS n UNMATCHED WHILE STATEMENT(S) Therå arå î WHILÅ statemINT©  filå coulä  noô  bå closed. CÉ -- Closå Include Aî invaliä filå namå iî aî %INCLUDÅ statement. CÓ -- COMMOÎ Statemenô error Á  COMMOΠ statemenô whicè waó noô  thå  firsô statemenô iî thå prograí waó detected. CÖ -- COMMOÎ Vaentó foò whicè á  WENÄ coulä noô bå found. WARNING: INVALID CHARACTER IGNORED Thå  previouó  linå containó aî invaliä  ASCIÉ character»   thió  characteò  ió  ignoreä  bù   thå compiler¬  anä  á  questioî marë ió printeä iî  itó place. riablå error Aî impropeò referencå tï á subscriptå variablå iî á COMMOÎ statement. DÅ -- Disë Error Á disë erroò occurreä whilå tryinç tï reaä thå .BAÓ file. DÆ -- Disë Full Therå  waó  nï spacå oî thå disë oò  thå  disë direc OUT OF DISK SPACE Thå  compileò haó ruî ouô oæ disë spacå  whilå attemptinç tï writå eitheò thå INÔ oò LSÔ files. OUT OF DIRECTORY SPACE Thå compileò haó ruî ouô oæ directorù  entrieó whilå attemptinç tï creatå oò extenä á file. DISKtorù waó full® Thå .INÔ filå waó noô created. DÌ -- Duplicatå Linå 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å numberó dï noô  ERROR Á  disë erroò occurreä whilå tryinç tï reaä oò writå tï á disë file. INCLUDE NESTING TOO DEEP NEAR LINE n Aî includå statemenô neaò linå î iî thå sourcå prograí  exceedó  thå maximuí leveì oæ  nestinç  oæ sourcå files. Š exist. DÐ -- Defineä Previously Á  variablå iî á DIÍ statemenô waó  previouslù defined. EÆ -- Exponentiaì Format Á numbeò iî exponentiaì formaô waó inpuô  witè nï digitó followinç thå E. FÁ -- Functioî Attribute Á functioî na 2-Letter Error Codes BF -- Branch into Function Á  brancè intï á multiplå linå  functioî  froí outsidå waó attempted. BN -- Bad Number Aî invaliä numeriã constanô waó encountered. CE -- Close Error Thå  intermediatå  (.må appearó oî thå lefô sidå oæ aî assignmenô   statemenô  buô  ió  noô  withiî   thaô function. FÄ -- Functioî Definition Á  functioî  namå  thaô  haó  beeî  previouslù defineä ió beinç redefineä iî á DEÆ statement. FÅ -- FOÒ Error Š   Á  mixeä  modå  expressioî  existó  iî  á  FOÒ statemenô whicè thå compileò cannoô correct. FÉ -- FOÒ Index Aî  expressioî  whicè ió noô aî  unsubscripteä numeriã variablå ió beinç useä aó á FOÒ looð index. FÎ -- Functioî parameteò Numbeò ó required. MÍ -- Mixeä Mode Variableó  oæ typå strinç anä typå numeriã arå combineä iî thå samå expression. MÓ -- Mixeä String Á  numeriã expressioî waó useä wherå á  strinç expressioî ió required. Š NÄ -- Nï DEFFN Á  FENÄ  st Á  functioî  referencå containó  aî  incorrecô numbeò oæ parameters. FÐ -- Functioî Parameteò type Á  functioî referencå parameteò typå doeó  noô matcè thå parameteò typå useä iî thå function'ó DEÆ statement. FÕ -- Functioî Undefineatemenô waó encountereä  withouô  á correspondinç DEF. NÉ -- NEXÔ Index Á variablå referenceä bù á NEXÔ statemenô doeó noô matcè thå variablå referenceä bù thå associateä FOÒ statement. NÕ -- NEXÔ Unexpected Á NEXÔ statemenô occuró d Á  functioî haó beeî referenceä beforå iô  haó beeî defined. IÅ -- IÆ Expression Aî expressioî useä immediatelù followinç aî IÆ evaluateó  tï typå string®  Onlù typå  numeriã  ió permitted. IÆ -- Iî File Á variablå useä iî withouô aî  associateä FOÒ statement. OÆ -- Ouô oæ Function Á  brancè ouô oæ á multiplå linå functioî froí insidå thå functioî waó attempted. OÏ -- OÎ Overflow Morå  thaî 2µ OÎ statementó werå useä  iî  thå program. PÍ -- ?? á FILÅ statemenô ió oæ typå numeriã wherå typå strinç ió required. IÐ -- Inpuô Prompt Aî  inpuô  prompô strinç ió noô surroundeä  bù quotes. IÓ -- Invaliä Subscript Á  subscripteä variablå waó referenceä  beforå iô waó dimensioned.  Á  DEÆ  statemenô appeareä withiî  á  multiplå linå function® Functionó maù noô bå nested. SÅ -- Syntaø Error Thå sourcå linå containó á syntaø error. SÆ -- SAVEMEÍ File Á SAVEMEÍ statemenô useó aî expressioî oæ typå numeriã  tï  s IÔ -- Invaliä Toggle Aî invaliä compileò directivå waó encountered. IÕ -- Invaliä Use Á variablå defineä aó aî arraù ió useä witè nï subscripts. MÆ -- Mixeä Format Aî  expressioî evaluateó tï typå  strinç  wheî typå numeriã ipecifù thå filå tï bå  loaded®  Thió expressioî   musô  bå  á  string®   Possiblù   thå quotatioî markó werå lefô ofæ á strinç constant. SÎ -- Subscripô Number Á  subscripteä variablå containó aî  incorrecô numbeò oæ subscripts. SÏ -- S  yntaø Overflow Thå  expressioî ió toï compleø anä  shoulä  bå simplifieä anä placeä oî morå thaî onå line. TÏ -- Tablå Overflow Thå prograí ió toï largå foò thå system®  Thå prograí  musô  bå  simplifieä oò  thå  systeí  sizå increaseò oæ fieldó  entereä ió  differenô froí thå numbeò oæ fieldó  specified® Alì fieldó specifieä bù thå INPUÔ statemenô musô bå reentered. 2-Letteò Warninç Codes DÚ -- Dividå bù Zero Á  numbeò waó divideä bù zero®  Thåd. UÌ -- Undefineä Linå number Á  linå  numbeò thaô doeó noô exisô  haó  beeî referenced. UÓ -- Undefineä String Á  strinç  haó beeî terminateä bù  á  carriagå returî ratheò thaî quotes. Š VÏ -- Variablå Overflow Variablå nameó resulô ió seô tï thå largesô valiä CBASIà number. FÌ -- Fielä Length Á  fielä  lengtè greateò thaî  25µ  byteó  waó encountereä durinç á REAÄ LINE® Onlù thå firsô 25µ characteró oæ thå recorä arå retained. LÎ -- Logarithí error Th arå toï lonç foò onå statement. Thió shoulä noô occur. WÅ -- WHILÅ Error Thå  expressioî immediatelù followinç á  WHILÅ statemenô ió noô numeric. WÕ -- WHILÅ Undefined Á  WENÄ statemenô occuró withouô aî associateä WHILÅ statemå  argumenô  giveî iî thå LOÇ  functioî  waó zerï  oò  negative®  Thå valuå oæ thå argumenô  ió returned. NÅ -- NEgativå number Á negativå numbeò waó specifieä followinç  thå raiså tï á poweò operatoò (^)®  Thå absolutå valuå ió useä iî ent. :CBASICº Run-Timå Erroò Messageó -- Warnings Twï   textuaì  run-timå  erroò  messageó   arå presenteä bù CRUN: NÏ INTERMEDIATÅ FILE Á  filå namå waó noô specifieä witè  thå  CRUÎ command¬  oò nï filå oæ typå .INÔ anä thå specifithå calculation. OÆ -- OverFlow Á  calculatioî  produceä á numbeò  toï  large® Thå  resulô  ió  seô oô thå  largesô  valiä  CBASIà Šnumber. SÑ -- SQuarå rooô error Á  negativå  numbeò waó specifieä iî  thå  SQÒ function® Thå absolueä filå namå waó founä oî disk. IMPROPEÒ INPUÔ - 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å numbetå valuå ió used. :CBASICº Run-Timå Erroò Messageó -- Erroò Codes Aà -- AsCié error Thå  strinç  useä  aó thå argumenô iî  aî  ASà functioî evaluateä tï á nulì string. BÎ -- BUFÆ Number Thå valuå followinç thå BUFÆ optioî iî aî OPEÎ    oò CREATÅ statemenô ió lesó thaî ± oò greateò  thaî 52. Cà -- Chaiî Code Á  chaineä program'ó codå areá ió largeò  thaî thå maiî program'ó codå area. CÄ -- Chaiî Data Á  chaineä program'ó datá areá ió largeò  thaî thå maiî program'hicè nï IÆ ENÄ statemenô haó beeî executed. EÒ -- Erroò iî 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. FÒ -- Filåó datá area. CÅ -- Closå Error Aî erroò occurreä upoî closinç á file. CÆ -- Chaiî Function Á  chaineä  program'ó constanô areá ió  largeò thaî thå maiî program'ó constanô area. CÐ -- Chaiî Vaò Storage Á  chaineä program'ó varia Rename Aî  attempô  waó madå tï renamå á filå  tï  aî existinç filå name. FÔ -- Filå Toggle Á  FILÅ  statemenô waó executeä wheî 2°  fileó werå alreadù active. FÕ -- Filå Undefined Aî attempô waó madå tï reaä oò writå tï á filåblå storagå areá  ió largeò  thaî  thå maiî program'ó  variablå  storagå area. CÓ -- Chaiî SAVEMEM Á chaineä prográ reserveä á differencå  amounô oæ  memorù  witè á SAVEMEÍ statemenô thaî thå  maiî program. CÕ -- Closå Undefineä filå  thaô waó noô active. IÆ -- Invaliä Filå name Á filå namå waó invalid. IÒ -- Invaliä Recorä number Á recorä numbeò lesó thaî onå waó specified. IÖ -- Invaliä Version Aî  attempô  waó madå tï executå aî  INÔ  filå createä bù á Á closå statemenô specifieä á filå numbeò thaô waó noô active. DÆ -- Defineä File Aî  OPEÎ oò CREATÅ waó specifieä witè  á  filå numbeò thaô waó alreadù active. DÕ -- Deletå Undefineä file Á  DELETÅ  statemenô specifieä á  filå   Versioî ± Compiler. IØ -- ?? Á  FENÄ  statemenô waó  encountereä  prioò  tï executinç á RETURÎ statement. L× -- Linå Width Á  linå widtè lesó thaî ± oò greateò thaî  13³ waó specifieä iî aî LPRINTEÒ WIDTÈ statement. MÅ -- MAKÅ Errnumbeò thaô waó noô active. D× -- Disë Writå error Aî  erroò  occurreä whilå writinç tï  á  file® ŠThió  occuró wheî eitheò thå directorù oò thå  disë ió full. EÆ -- Enä oæ File Á reaä pasô thå enä oæ filå occurreä oî á filå foò wor Aî  erroò occurreä whilå creatinç oò extendinç á filå becauså thå disë directorù waó full. MÐ -- MATCÈ Parameter Thå  thirä parameteò iî á MATCÈ  functioî  waó zerï oò negative. NÆ -- Numbeò oæ FILE Thå  filå numbeò specifieä   waó lesó thaî ±  oò greateò thaî 20. ŠNÍ -- Nï Memory Therå  waó  insufficienô  memorù tï  loaä  thå program. NÎ -- Nï Numbeò field Aî  attempô waó madå tï prinô á numbeò witè  á PRINÔ  USINÇ statemenô buô therå waó noô á  numeriã aó madå tï reaä pasô thå enä oæ á recorä iî á fixeä file. RÇ -- RETURÎ witè nï GOSUB Á  RETURΠ occurreä  foò whicè  therå  waó  nï GOSUB. RÕ -- Randoí Undefined Á randoí reaä oò prinô waó attempteä tï  otheò thaî á fixeä file. S datá fielä iî thå USINÇ string. NÓ -- Nï Strinç field Aî  attempô waó madå tï prinô á strinç witè  á PRINÔ  USINÇ statemenô buô therå waó noô  á  strinç fielä iî thå USINÇ string. OÄ -- Overflo÷ Data Á  REAÄ  statemenô waó executeä w -- SuBscript Š Aî arraù subscripô waó useä whicè exceedeä thå boundarieó foò whicè thå arraù waó defined. SÌ -- Strinç Length Á concatenatioî operatioî resulteä iî á strinç oæ morå thaî 25µ bytes. SÏ -- SAVEMEM Thå  filå  specifitè  nï  DATÁ available. OÅ -- OPEÎ Error Aî attempô waó madå tï OPEÎ á filå thaô didn'ô exisô  anä  foò whicè nï IÆ ENÄ statemenô haä  beeî previouslù executed. OÉ -- OÎ Index Thå expressioî specifieä iî aî OÎ ..® GOSU oò aî OÎ ieä  iî á  SAVEMEÍ  statemenô coulä noô bå locateä oî thå referenceä disk. SÓ -- SubStrinç error Thå  seconä parameteò oæ á MID¤  functioî  waó zerï oò negative. TÆ -- Toï manù Files Aî  attempô  waó  madå tï havå  morå  thaî  2° ac..® GOTÏ statemenô evaluateä tï á numbeò lesó thaî  ± oò greateò thaî thå numbeò oæ linå  numberó containeä iî thå statement. OÍ -- Overflo÷ Memory Thå   prograí   raî  ouô  oæ   memorù   durinç execution. QÅ -- Quotå Error Aî  attetivå fileó simultaneously. TÌ -- TA Length Á  TA  statemenô containeä á  parameteò  lesó thaî ± oò greateò thaî thå currenô linå width. UÎ -- UNdefineä ediô string Á  PRINÔ  USINÇ statemenô waó executeä witè  á nulì ediô string. mpô  waó  madå tï PRINÔ tï  á  filå  á strinç containinç á quotatioî mark. R -- Randoí BUFF Randoí   accesó  waó  attempteä  tï   á   filå activateä witè thå BUFÆ optioî specifyinç morå thaî ± buffer. RÅ -- REAÄ Error Aî  attempô wWÒ -- WRitå 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º CBASIà Reserveä Words ABÓ ANÄ AÓ ASà ATN BUFÆ CALÌ    CHAIÎ CHR¤ CLOSE COMMAND¤  COMMOΠ CONCHAR¥  CONSOLÅ CONSTAT% COÓ CREATÅ DATÁ DEÆ DELETE DIÍ ELSÅ ENÄ EÑ EXP FENÄ FILÅ FOÒ FRÅ GE GÏ GOSUs I/Ï Functions CONSTAT¥  - Returnó  thå  consolå  statuó  aó   aî integer®  Iæ  ready¬  á logicaì TRUÅ  ió returned. CONCHAR¥  - Readó  onå characteò froí thå  consolå device.  GOTÏ GÔ IF INITIALIZÅ INÐ INPUÔ INÔ INT% LÅ LEFT¤ LEÎ LEÔ LINE LOÇ LPRINTEÒ LÔ MATCÈ MID$ NÅ NEXÔ NOÔ OÎ OPEN OÒ OUÔ  Machine-Languagå Functions PEEË () - Returnó  thå  contentó  oæ  thå  memorù locatioî giveî bù thå expression. POKÅ ¬ - Low-ordeò   eighô   bitó   oæ    seconä expressioî  arå storeä iî mem PEEË POKÅ POS PRINÔ RANDOMIZÅ REAÄ RECÌ RECS REÍ REMARË RENAMÅ RESTORÅ RETURN RIGHT¤ RNÄ SADÄ SGÎ SIN SIZÅ SQÒ STEÐ STOÐ STR$ SU TA orù locatioî selecteä bù firsô expression. CALÌ - CALÌ  á  machinå  languagå  prograí  aô addresó specified. SAVEMEÍ ¬ - Reservå ½ ½ <¾ LÔ LÅ GÔ GÅ EÑ NE 6® NOT 7® AND 8® OÒ XOR :CBASIC2º Predefineä Function Strinç 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$) Disë Functions R  ENAME(a$,b$© SIZE(a$) User-Defineä Functions Thå generaì formó arå -- [Ý DEÆ Ý ½ and [Ý  DEÆ  ] . . . [Ý FEND å . [Ý FEND ååååå  Introduction 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 Funcata files that may be open at any one time during the execution of a program. The default here is 3. The /M: sets the highest memory locations that will be used by MBASIC. All memory to the start of FDOS is used by defaulttions 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 This HELP File is . :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 derived from the "Microsoft BASIC Reference Book", and it is divided into two parts -- one covering the Interpreter and the other covering the Compiler. These programs process programs written in almost exactly the same language -- Microso 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 ft BASIC; there are minor differences between the two, however, and these are discussed in the file under the Compiler Introduction. The MBASIC (Microsoft BASIC) Interpreter is invoked as follows -- MBASIC [][/F:<# logical line into physical lines 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 : files>][/M:] If is present, MBASIC proceeds as if a RUN command were typed after initialization is complete. A default extension of .BAS is assumed. If /F:<# files> is present, it sets the number of disk d 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  loating point # Double Precision 17.8 digit floating point :Commands Command Syntax Function AUTO AUTO [line][,inc] Generate line numbers CLEAR CLEAR [,[exp1][,exp2]] Clear program variabl change Command Syntax Function RUN RUN [line number] Run a prog (from a particular line) RUN filename[,R] Run a prog on disk SAVE SAVE filename[,A or ,P] Save prog onto dies; Exp1 sets end of memory and Exp2 sets amount of stack space CONT CONT Continue program execution DELETE DELETE [[start][-[end]]] sk; ,A saves prog in ASCII and ,P protects file SYSTEM SYSTEM Return to CP/M TROFF TROFF Turn trace off TRON TRON Turn trace o 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 lin WIDTH WIDTH [LPRINT] exp Set term or printer carriage width; default is 80 (term) and 132 (prin) :Edit Mode Subcommands A Abort -- restore original line and restart Edit nCc Changne(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 e 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  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 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  e, 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 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][,ALL][,DELETE range]] Call a program and pass variables to it; MERGE with ASCII files allows overlays; start at line exp if given; ALL means all variables will be passed (otherwise COMMON only); DELETEne 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  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 <> 0 then ... else ... LET [LET] var=exp Assignment MID$ MID$(string,n[,m])=string2 Replace a portion of string with string2; start at pos n for m chars NEXT NEXT var[,varadr for nth assembly routine DEFINT range(s) of letters Define default var type INTeger DEFSNG " " " " " " " Single DEFDBL " " " " " " " Double  ... ] 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 Fun 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 namesction 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  mber 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 st 1 Use comma every three digits ^^^^ 0 4 Exponential format _ 0 1 Next character is literal String Specifiers Specifier Definition ! Single cmt after error line RESUME line Return to specified line RETURN RETURN Return from subroutine STOP STOP Stop prog and print BREAK msg WAIT WAIT prot,mask[,select] haracter // Character field; width=2+number of & Variable length field :Input/Output Statements Statement Syntax/Function CLOSE CLOSE [[#]f[,[#]f ... ]] Close disk files Pause until input port [XOR 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 Di; 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] Reagits Chars Definition # 1 1 Numeric field . 0 1 Decimal point + 0 1 Print leading or trailing sign - 0 1 Trailing sign (- if neg, otherwise) d a record from a random disk file INPUT INPUT [;] [prompt string;] var [,var ...] INPUT [;] [prompt string,] var [,var ...] Read data from the terminal; leading semicolon suppresses echo of / and semicol** 2 2 Leading asterisk $$ 1 2 Floating dollar sign; placed in front of leading digit **$ 2 3 Asterisk fill and floating dollar sign , 1 on after prompt string causes question mark after prompt while comma after prompt suppresses question mark Statement Syntax/Function KILL KILL filename Delete a disk file LINE LINE INPUT [;] [promp  t string;] string var INPUT Read an entire line from terminal; leading semicolon suppresses echo of / LINE INPUT #f,string var Read an entire line from a disk file LSET LSET field var=string exp 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 Store data in random file buffer left-justified or left-justify 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 ment or equality test - Negation or subtraction + Addition or string concatenation * Multiplication / Division (floating point result) ^ Exponentiation \ Integer division (integer result) MOD Int O = sequential output file R = random input/output file Statement Syntax/Function PRINT PRINT [USING format string;] exp [,exp ...] Print data at the terminal using the format specified PRINT #f, eger modulus (integer result) NOT One's complement (integer) AND Bitwise AND (integer) OR Bitwise OR (integer) XOR Bitwise exclusive OR (integer) EQV Bitwise equivalence (integer) IMP Bitwise implication (integer)[USING format string;] exp [,exp ...] Write data to a disk file LPRINT [USING format string;] var [,var ...] Write data to a line printer PUT PUT [#] f [,record number] Write data from a random buffer t =,>,<, 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 -) 1o a data file READ READ var [,var ...] Read data from a DATA statement into the specified vars RSET RSET field var = string exp Store data in a random file buffer right justified or right justify a non-0. AND 4. *,/ 11. OR 5. \ 12. XOR 6. MOD 13. IMP 7. +,- 14. EQV :Arithmetic Functions Function Action ABS(exp) Absol  ute value of expression ATN(exp) Arctangent of expression (in radians) CDBL(exp) Convert the expression to a double precision number CINT(exp) Convert the expression to an integer COS(exp) Cosine of the expression (in radians)  Returns remaining memory free space HEX$(exp) Converts a number to a hexadecimal string INPUT$(length [,[#]f]) Returns a string of length chars read from console or from a disk file; characters are not echoed INCSNG(exp) Convert the expression to a single precision number EXP(exp) Raises the constant E to the power of the expression FIX(exp) Returns truncated integer of expression FRE(exp) Gives memory free space not used by MBASIC INT(STR([exp,]str1,str2) Returns the first position of the first occurrence of str2 in str1 starting at position exp LEFT$(str,len) Returns leftmost length chars of the string expression LEN(str) Returns the length ofexp) Evaluates the expression for the largest integer LOG(exp) Gives the natural log of the expression RND[(exp)] Generates a random number exp <0 seeds new sequence exp =0 returns previous number  a string MID$(string,start[,length]) Returns chars from the middle of the string starting at the position specified to the end of the string or for length characters Function Action OCT$( exp >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 eexp) 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$(lxpression 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) ength,str) Returns a string length long containing the first char of the str STRING$(length,exp) Returns a string length long containing chars with numeric value exp VAL(str) Co  nverts the string representation of a number to its 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 preciage subroutine with the arg VARPTR(var) Returns address of var in memory or zero if var has not been assigned a value VARPTR(#f) Returns the address of the disk I/O buffer assigned to file number :Interpreter sion 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 aError 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 on input port LOC(f) Returns next record number to read or write (random file) or number of sectors read or written (sequential file) LPOS(n) Returns carriage position of line printer (n is dummy) MKI$(value) Convertsf 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  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 speci 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 withoufied 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 langut 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 B  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 the user will be prompted with an asterisk, after which he should enter the command line. Switches -- /E Use this switch if ON ERROR GOTO with RESUME is used /X Use this switch if ON ERROR GOTO with RESUME, RESUME 0, or RESUM 67 Too many files :Introduction to the Microsoft BASIC Compiler The following direct mode commands are NOT implemented on the compiler and will generate an error message -- AUTO CLEAR CLOAD CSAVE CE NEXT 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 /C ONT DELETE EDIT LIST LLIST RENUM COMMON SAVE LOAD MERGE NEW ERASE The following statements are used differently with the compiler than with the interpreter (refer to the Relax line numbering constraints; lines need not be numbered 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 manual for details) -- CALL DEFINT DEFSNG DEFDBL DEFSTR DIM ERASE END ON ERROR GOTO RESUME STOP TRON TROFF USRn :BASIC Compiler Commands and Switches Thet 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  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 ...] If just BASCOM is used,  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 Errors   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åing 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 ååCursor Commands Scroll, Delete, & Other Commands Saves & Block Commands Text Markers, Find/Replace, & Add Files Commands Control Character Commands P Commands DOTs Commands Specials Command Help Commands :CURSOR: ^S Left CHARACTER å ^D Right CHARACTER ^QS Left LINE ^QD Right LINE ^A Left WORD ^F Right WORD ^QE To Top of screen ^QX To Bottom of screen ^QR Beginning of file   ^QC To End of file --------- | E | | up | _____________|________|_____________  ^B Reform to para. ^P Overprint ^J Menu ^Q,J,K,O,P prefix menus -------------------------------------------------------------------------- :SAVES: ^KD Save ^KX Save & get CP/M ^KS Sav | A | S | D | F | CURSOR CONTROL | left | left | right | right | | word | char | char | word | ------------------------------------ e & re-edit same [ in-progress save ] ^KQ Abort ^KP Print toggle -------------------------------------------------------------------------- BLOCKS: ^KB mark block begin ^K | X | | down | ---------- ------------------------------------------------------------------------ :SCROLL: ^Z Up one line ^C Up one screen K mark block end ^QB cursor to block start ^QK cursor to block end ^KH Hide/restore marker ^KV move block ^KC recopy block ^KY delete block ^KW write blo ^W Down one line ^R Down one screen ------------------------------------------------------------------------ DELETE: ^G Char left ^RUB Char right ^Y Line ^T Word right ck to file ^R repeat last command ^KJV help! ^QV Return cursor to block start --------------------------------------------------------------------------- :TEXT MARKERS: ^K 0-9 Set/Hide te ^QY to end of line ^QRUB to begin of line ------------------------------------------------------------------------ OTHER: ^V insertion togle ^I Tab ^U restart command ^VN Insert (with WW)xt marker ^Q 0-9 Cursor to marker --------------------------------------------------------------------------- FIND/ ^QF Find ^QA Replace ^L Find/Replace next occurence REPLACE: options: the nth occurence    G global replace or find last N replace without query B search backward U ignore case W whole word only ----------------------------------------------- : "P" Commands: Put a ^Char in the file ^PS Underscore start/end ^PB Boldface start/end cancel prefix < ret > overprint line follows ------------------------------------------------------------------------ ADDITIONAL ^QH Block Write ^QR Read additional file FILES: ^QJ Delete File ^QP Print file -------------------------------------------------------------------------- :CONTROL:----------------------------------------- :DOTs .PL paper length defaults to 11 inches .MT margin top " 3 lines .MB margin bottom " 8 lines .HM heading margin "  ^O display current status ^OC center this line ^OL set left margin ^OR set right margin ^OI set tab here ^ON clear tab here ^OF set margins & tabs to match curr 2 lines .FM footer margin " 2 lines .PC page # col. " 1/2 right margin .PO page offset " 8 cols. .PA new page .CPn conditional page ent line ^V..^P then ^O^F to store reusable non-printing ruler. ^OS set line spacing ^B reform to end of paragraph ^OX margin release ^OW  .HE {or .HE #} header text .FO " " footer text .OP omit page numbers .PN start with page number .IG non-printing comment -----------------------------------------------------------------------word wrap ^OJ justify ^OT ruler ^OP page ends ^OD dot commands ^PO non-break spaces ^P overprint next line ----------------------------------------------------------------- :SPECIALS: ^QCOP number of words in the text ^QQn Repeat: eg. QQZn scroll line at speed n (0-9) QQCn scroll screens ------------------------------------------------------------------------- :    WORDSTAR HELP COMMANDS ^O Show me the current status ^JH Set level of prompts ^JD show dot commands and print controls ^JI command index ^JS status line ^JF flags info. ^JB , MODEM2, MODEM4, MODEM527, MODEM206, CMODEM.C, MODEM7, MODEM71, TRS-MODEM, APMODEM, MODEMH89, MBOOT3, etc.) which are available from the CP/M users SIG/M, or from many of the software exchange systems listed in RCPMLIST.DOC. MODEM206, MBOOT3, and MOparagraph commands ^JP place markers ^JM margins and tabs ^JV moving text  show dot commands and print controls ^JI command index ^JS status line ^JF flags info. ^JB DEM71 are here on this system. :TO SEND A FILE FROM THIS SYSTEM TO YOURS Type "XMODEM S" filename.filetype. The file you want to receive (send from this system to yours) must be on the A drive (no drive specified in the XMODEM command chain The SOFTWARE involved To send a file FROM this system TO yours If you do not have a 'MODEM' series program running Judging FILE SIZE and TRANSMISSION TIME To send a file FROM your system TO this one (Return to the main HELP menu) :The Software Neededmeans it defaults to the logged in drive, and we assume for purposes of this example that you are logged in on drive A; that is, you have not changed to drive B since the system answered the phone). (Note: Transferring files from drive B is discusse at This End and Your End-- You must use XMODEM.COM when downloading from this system. Some RCPM (=Remote CP/M) systems allow you to TYPE all files and then to save what you see on your screen to disk or print it out. Here, that will work only with d further on.) Thus, if you want to receive on your system the file called "CHEESE.ASM", it should look like this on the screen: A0>XMODEM S CHEESE.ASM (or, say, B3>XMODEM S CHEESE.ASM) Then... Wait until you see this system respond with: very short ASCII files and a couple of vital longer files, like MBOOT3.ASM. You should have a copy of a program called MODEM.COM installed on your system. This would be the object code of one of the versions of Ward Christensen's MODEM.ASM (MODEM FILE OPEN, EXTENT LENGTH: XXH Now the system is waiting for an acknowledgement from your MODEM.COM program that it (your MODEM. COM) is ready to receive the file. At this point you put your system into local mode and prepare it for reception.   Depending on the program you are using, you should either type control-E and then: MODEM R CHEESE.ASM (with MODEM2, MODEM4, MODEM527, etc., or type control-E and R CHEESE.ASM (with MODEM7) :If you do not have one of these MODEM programs runn (actually, SD-12/15.ASM) shows how large the files are in kilobytes. You can use "wild card" options just like with standard "DIR". Some examples: A0>DIR A0>DIR B: A0>DIR CHEESE.ASM A0>DIR *.ASM A0>DIR CHE*.* A0>DIR B:CH??SE.* DIR wing but have some way of saving what you see on the screen on disk or tape, you can ignore XMODEM and simply type TYPE CHEESE.ASM (or whatever the name of the file is) when that file is in ASCII (i.e., not a COM or OBJ file) and when it is eitheill respond with the file size in K. At 300 baud, a 2K file takes about 1 1/4 minutes to transfer, so be guided accordingly. Attempts to take 200K worth of files in one session will tie the system up 2 hours and even longer it the lines are bad. Andr very short (2-4K) or it is specially important (like MBOOT3 and BULLETIN). Other files can only be TYPEd up to the end of the 80th line. After than, the TYPE program tells you to use XMODEM to see more. TYPESQ works the same way for squeezed file that will not make either the sysop or other users happy. :Sending a file TO this system works similarly... TO SEND A FILE TO THIS SYSTEM: Type "XMODEM R" filename.filetype, then go into your system's local mode and type "MODEM S" files. It will never type past the 80th line. TYPE is not a good method of transferring files anyway, as it uses no error-checking routines. So use TYPE to take MBOOT3, play with MBOOT3 until you get it running properly (it may have a couple of zits iname.file- type. For example, if you want to send a file called "MYPROG.ASM", this system's command line should look like this: A>XMODEM R MYPROG.ASM The name of the file that this system is to receive does not have to be same as the name of then it because of the way you took it), and then use MBOOT3 with XMODEM to take more advanced MODEM programs and other files. :To find out how large the file is that you want to get, use the "DIR" directory command. The version of DIR on this system file you are sending. But be careful not to try sending a filename that already exists on the A or B drives. This system's "XMODEM.COM" will abort the transfer and return to the CP/M command mode. And make sure there is enough free disk space   on the drive -- use 'DIR' and look at the bottom of the screen. Please do not attempt to send a CP/M .COM file. This system's "XMODEM.COM" program will abort the transfer and return to the CP/M command mode. If you want to send a CP/M .COM file,å you should use the CP/M filetype ".OBJ" when telling XMODEM the file name at this end. It naturally doesn't have to have the same name at your end. If you do send a CP/M .OBJ file, please also include some comments (documentation) about what it is,ÿÐa UNIVERSAL PRODUCT CODE - Aöa’ Ð:† R(ÿ),DL$(),DR$(),A( ) bDG$ð"01010":DCðub(„ "0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"ßb2„ "1110010","1100110","1101100","1000010","1011100"," what it does, and how to do it. Thanks. ::HELP same name at your end. If you do send a CP/M .OBJ file, please also include some comments (documentation) about what it is,1001110","1010000","1000100","1001000","1110100"úb<‚ Ið Î :‡ DL$(I):ƒ IcF‚ Ið Î :‡ DR$(I):ƒ I"cP‘ ÿ–()HcZ‘"UNIVERSAL PRODUCT CODE - A":‘:‘Ÿcd… "CODE DECIMAL CHARACTER = 0. ENTER NEW CHARACTER, OR FOR NO CHANGE ";I·cn‹ Iï ÷ Iñå Ï DCðIÇcxDC$ðDL$(DC)Ôc‚‘ ÿ–()úcŒ‘"UNIVERSAL PRODUCT CODE - A":‘:‘+d–… "ENTER DATA TO BE ENCODED (10 DIGITS) ";D$Cd ‹ ÿ’(D$)ï Ï ‰ ‚`dª‚ Ið Î  :I$ðÿƒ(D$,I,)‚d´‹ ÿ”(I$)ñ ø ÿ”(I$)ï Ï ‰ ‚Šd¾ƒ I¦dÈA0$ðÿ(D$,):A0ðÿ”(A0$)ÄdÒA1$ðåÿƒ(D$,,):A1ðÿ”(A1$)âdÜA2$ðÿƒ(D$,,):A2ðÿ”(A2$)eæA3$ðÿƒ(D$,,):A3ðÿ”(A3$)eðA4$ðÿƒ(D$,,):A4ðÿ”(A4$)‚ ZðY1 Î Y Ñ S:XðX1:YðZ: è:ƒ Z:‰ ŽhHMð(YóY1)õ(XóX1)°hR‹ ÿ†(M)ï Ï Sðÿ†(õM) :¢ Sð"ƒ A¾c,‰ ,ëc CARTESIAN COORDINATE FUNCTION PLOTTINGýcš‘ ÿ–():’ È d¤• ¨ ‰ Xd© MAKE X,Y AXIS@d®‚ Fð€u Î ÿu:™ F,:ƒ Fed¸‚ Gð Î :™ (pòGô€), :ƒ G´d™ •u,:™ u,:™ „u,:™ ‡u,:™ ‹u,:™ Žu,:™ Âh\‹ XñX1 Ï SðóSÕhf‚ ZðX1 Î X Ñ SñhpXðZ:YðMô(ZóX1)òY1: èùhzƒ Zi„X1ðX:Y1ðYiŽƒ A!i˜‚ Ið Î ¸ :ƒBi¢‹ Ýð" " Ï Æ :¢ DðDò:‰ ÚLi¬ èTi¶ƒ A^iÀ‰ ÀeiÊ ›iÔ SUBROUTINE TO DETERMINE WHICH GRAPHIC CHARACTERËiÙ TO PRINT - #  DEPENDS ON VALUE OF X AND Y.ÑiÛùiÞ APPLY SCALING FACTOR AND ROUNDINGjèXðÿ…(Xôõò€):Yðÿ…(Yò€)Ují CONVERT TRS-80 COORDINATES TO OSBORNE COORDINATESojòYOðÿ…(Yõ):XOðÿ…(Xõ)žj÷ GET ADDRESS IN VIDEO MEMORY TO WORK WITH¶jüADDRðpòY  Ï ™ ADDR, :Žån‹ ÿ—(ADDR)ð  Ï ™ ADDR, :Žo(‹ ÿ—(ADDR)ð  Ï ™ ADDR, :Ž+o2‹ ÿ—(ADDR)ð Ï ™ ADDR, :Ž1o<ŽToF‹ ÿ—(ADDR)ð  Ï ™ ADDR, :ŽwoP‹ ÿ—(ADDR)ð  Ï ™ ADDR, :ŽšoZ‹ ÿ—(ADDR)ð  Ï ™ ADDR, :޽od‹ ÿ—(ADDR)ð  ÏOô€òXOòj CONVERT TRS-80 COORDINATES TO PIXEL-LEVEL COORDINATESkYDðYõóÿ…(Yõ):XDðXõóÿ…(Xõ)Hk‹ YDð ÷ XDð Ï ‰ 8 :Û UPPER LEFT OF PIXELwk‹ YDð ÷ XDð€ Ï ‰ ’ :Û UPPER RIGHT¥k$‹ YDð€ ÷ XDð Ï ‰ ì :Û LOWER LEFT×k.‹ YDð ™ ADDR, :Žàon‹ ÿ—(ADDR)ð  Ï ™ ADDR, :Žpx‹ ÿ—(ADDR)ð  Ï ™ ADDR, :Ž&p‚‹ ÿ—(ADDR)ð  Ï ™ ADDR, :ŽIpŒ‹ ÿ—(ADDR)ð Ï ™ ADDR, :ŽOp–Ž ADDR, :Žpx‹ ÿ—(ADDR)ð  Ï ™ ADDR, :Ž&p‚‹ ÿ—(ADDR)ð  Ï ™ ADDR, :ŽIpŒ‹ ÿ—€ ÷ XDð€ Ï ‰ F :Û LOWER RIGHTúk8‹ ÿ—(ADDR)ð  Ï ™ ADDR, :ŽlB‹ ÿ—(ADDR)ð  Ï ™ ADDR, :Ž@lL‹ ÿ—(ADDR)ð  Ï ™ ADDR, :ŽclV‹ ÿ—(ADDR)ð  Ï ™ ADDR, :ކl`‹ ÿ—(ADDR)ð  Ï ™ ADDR, :Ž©lj‹ ÿ—(ADDR)ð  Ï ™ ADDR, :ŽÌlt‹å ÿ—(ADDR)ð  Ï ™ ADDR, :Žïl~‹ ÿ—(ADDR)ð Ï ™ ADDR, :ŽõlˆŽm’‹ ÿ—(ADDR)ð  Ï ™ ADDR, :Ž;mœ‹ ÿ—(ADDR)ð  Ï ™ ADDR, :Ž^m¦‹ ÿ—(ADDR)ð  Ï ™ ADDR, :Žm°‹ ÿ—(ADDR)ð  Ï ™ ADDR, :ޤmº‹ ÿ—(ADDR)ð  Ï ™ ADDR, :ŽÇmÄ‹ ÿ—(A PLOT TRS-80 STYLE PIXEL GRAPHICS by Gobind Singh Khalsa Videï  displaù  oî  á  TRS-8°  Modeì  IIÉ  oò  IÖ  haó  somå similaritieó tï thaô oî thå Osborne®  One¬ theù arå botè memory- mapped®   Two¬   thå   uppeò  left-DDR)ð  Ï ™ ADDR, :Žêm΋ ÿ—(ADDR)ð  Ï ™ ADDR, :Ž nØ‹ ÿ—(ADDR)ð Ï ™ ADDR, :ŽnâŽ6nì‹ ÿ—(ADDR)ð  Ï ™ ADDR, :ŽYnö‹ ÿ—(ADDR)ð  Ï ™ ADDR, :Ž|n‹ ÿ—(ADDR)ð  Ï ™ ADDR, :ŽŸn ‹ ÿ—(ADDR)ð  Ï ™ ADDR, :ŽÂn‹ ÿ—(ADDR)ðhanä  corneò  oæ  thå  screeî coorespondó  tï  thå  lowesô addresó  iî  videï  memory®  Three¬ succeedinç characteró ¨ goinç froí lefô tï righô oî eacè linå  oæ thå displaù © cooresponä tï succeedinç positionó iî videï memory® Anä four¬  botè hav$  å thå abilitù tï displaù blocë graphics®  Thå maiî  differenceó  arå  thaô  Osborne'ó  blocë  graphicó  havå  á resolutioî oæ ² bù 2¬  whereaó thå TRS-8° haó ² bù 3®  Also¬ thå Osborne'ó  displaù linå ió 12¸ characteró widå aó opposeä tï  thå TRSå-80'ó 6´ oò 8° characteò line® Anä Osborne'ó Mbasiã lackó thå "SET¢  anä  "RESET¢ commandó oæ thå TRS-8° versioî  oæ  Microsofô Basic¬ whicè allo÷ foò individuaì pixeló tï bå turneä oî anä off® Thå  followinç  prograí  illustrateó onå waù  iî  whic UNPROTECTING PROTECTED BASIC by Gobind Singh Khalsa Iî  thå Novembeò '8³ issuå oæ Creativå Computing¬  Murraù L® Lesseò explainó ho÷ tï unprotecô á Basiã prograí filå saveä  witè thå  ",P¢  ¨  foò Protecô © option® è  tï  takå advantagå  oæ  thå manù screeî graphicó programó writteî foò  thå TRS-80®  Thå  subroutinå  startinç  aô linå  100°  containó  thå essentiaì algorithí foò convertinç á plotteä functioî froí TRS-8° tï Osborneä blocë graphics®  Thå prec Aó applieä tï  thå  Osbornå running Mbasic under CP/M, the steps are as follows: You'lì  neeä DDT.COM¬  MBASIC.COM¬  anä thå probleí  prograí readù oî á disk® Let'ó assumå thaô thå prograí tï bå unprotecteä ió nameä 'TEST.BAS§ anä whaô folloedinç sectionó arå  deriveä from similar programs for the TRS-80. 100°  containó  thå essentiaì algorithí foò convertinç á plotteä functioî froí TRS-8° tï Osborneä blocë graphics®  Thå precwó ió exactlù whaô yoõ enteò aô whatever prompt presents itself at the time. STEP 1) ENTER -> DDT MBASIC.COM 2) S80 3) 00 4) å. 5) G 6) LOAD "TEST" 7©  LEÔ DDÔ ½ &H3¸ 9) S0BEC %   10) 00 11) . 12) G 13) LIST ( or LLIST T .BAS CRC = FE 3A --> FILE: PLOT .DOC CRC = 9E 82 --> FILE: UNPROTEC.DOC CRC = BC E5 --> FILE: WS .HLP CRC = EE DE --> FILE: XMODEM .HLP CRC = 37 F5 --> FILE: ZCPR2TEZ.DOC CRC = D0 D0 ---------------------> SUM OF or SAVE "TEST" to save it in an unprotected format)  G 13) LIST ( or LLIST  CRCS = 48 5E P CRC = EE DE --> FILE: XMODEM .HLP CRC = 37 F5 --> FILE: ZCPR2TEZ.DOC CRC = D0 D0 ---------------------> SUM OFå using SAVE"filename",P. The following files were received from Rick Schmidt of Federal Way, Washington. CBASIC.HLP describes use of CBASIC. MBASIC.HLP describes use of MBASIC. WS.HLP describes use of WordStar. XMODEM.HLP describes use of thåe XMODEM program typically found on remote CP/M (RCP/M) systems. Each of these files is intended for use with the HELP program found on FOG/UTL.005. ZCPR2TEZ.DOC describes the console command processor (CCP) replacement ZCPR2 found on FOG/UTL.0 --> FILE: -FOG/MIS.018 CRC = 00 00 --> FILE: /MIS#018.DOC CRC = E1 31 --> FILE: BARCODE .BAS CRC = 3A 94 --> FILE: BARCODE .DOC CRC = D9 98 --> FILE: CBASIC .HLP CRC = 4A 6D --> FILE: MBASIC .HLP CRC = B7 50 --> FILE: PLO35. Jim Woolley FOG Disk Librarian January 1984 ogram found on FOG/UTL.005. ZCPR2TEZ.DOC describes the console command processor (CCP) replacement ZCPR2 found on FOG/UTL.0&  å using SAVE"filename",P. Also, see MBASIC-P found on FOG/MIS.016. The following files were received from Rick Schmidt of Federal Way, Washington. CBASIC.HLP describes use of CBASIC. MBASIC.HLP describes use of MBASIC. WS.HLP describes use ofå WordStar. XMODEM.HLP describes use of the XMODEM program typically found on remote CP/M (RCP/M) systems. Each of these files is intended for use with the HELP program found on FOG/UTL.005. ZCPR2TEZ.DOC describes the console command processor  DISK.DOC FOG/MIS.018 First Osborne Group (FOG) Miscellaneous Disk The following files were submitted from Gobind Khalsa of Liverpool, NY. BARCODE will generate Universal Product Code A barcode u (CCP) replacement ZCPR2 found on FOG/UTL.035. Jim Woolley FOG Disk Librarian January 1984 sing an Epson with Graftrax. Refer to BARCODE.DOC. PLOT will display converted TRS-80 block graphics plots on an Osborne 1 screen. Refer to PLOT.DOC. These are MBASIC programs. Place BAS files in drive A and MBASIC.COM in drive B. At the A>å prompt, type B:MBASIC At the Ok prompt, type RUN "program" where program is the name of the program, which must be capitalized and surrounded by quotation marks. UNPROTEC.DOC describes a procedure for unprotecting an MBASIC file savedå'  åååååååååå