home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / simtel / sigm / vols000 / vol054 / zcpr.doc < prev    next >
Encoding:
Text File  |  1985-02-10  |  44.3 KB  |  1,383 lines

  1.              ZCPR - A Z80 Replacement for the CP/M CCP
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.      Documentation on ZCPR - A Z80 Replacement for the CP/M CCP
  9.  
  10.  
  11.  
  12.  
  13.               ZCPR is a Group Project By the CCP-GROUP:
  14.             RLC - Richard Conn            FJW - Frank Wancho
  15.             KBP - Keith Peterson          RGF - Ron Fowler
  16.  
  17.  
  18.                       ZCPR Documentation By RLC
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.                           Table of Contents
  27.                           ----- -- --------
  28.  
  29.        Introduction                                       2
  30.  
  31.        Part A: Installation Instructions                  4
  32.             ZCPR Integration Example                      5
  33.             Setting the ZCPR Inline Options               8
  34.               REL, BASE, CPRLOC, RAS, SUBA, CLEVEL3       8
  35.             Customization Symbols                         8
  36.               NLINES, WIDE, PGDFLT                        8
  37.               PGDFLG, MAXUSR, SYSFLG, SOFLG, SUPRES,
  38.                 DEFUSR, SPRMPT, CPRMPT, NUMBASE,          9
  39.                 SECTFLG, FENCE                           10
  40.             Patching SUBMIT.COM                          10
  41.  
  42.        Part B: Usage Instructions and Explanation of
  43.                Commands                                  11
  44.             The ZCPR Command Hierarchy Search            11
  45.             The ZCPR-Resident Commands                   14
  46.               DIR, ERA                                   14
  47.               LIST, TYPE, SAVE                           15
  48.               REN, USER, DFU                             16
  49.               JUMP, GO, GET                              17
  50.             ZCPR Error Messages                          18
  51.  
  52.        Part C: ZCPR Command Levels and How to Use Them   19
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.                                                 Page 1
  62.  
  63.  
  64.  
  65.  
  66.  
  67.              ZCPR - A Z80 Replacement for the CP/M CCP
  68.  
  69.  
  70.  
  71.      Documentation on ZCPR - A Z80 Replacement for the CP/M CCP
  72.  
  73.  
  74.  
  75.  
  76.        ZCPR i≤ ß replacemen⌠ fo≥ thσ CP/═ Consolσ CommanΣ Processo≥ ì
  77.   (CCP⌐á whicΦá i≤á designeΣ t∩ ruε a≤ par⌠ oµá CP/═á oεá Z80-baseΣ ì
  78.   microcomputers«á  Iε mos⌠ case≤ i⌠ i≤ upward-compatible witΦá thσ ì
  79.   origina∞ CP/═ Versioε 2.▓ CCP.
  80.  
  81.        ZCPR¼á however¼á provide≤á man∙ extension≤ t∩ thσ CP/═á CCP«  ì
  82.   IncludeΣ iε thesσ extension≤ arσ thσ followinτ features:
  83.  
  84.             « Thσ TYP┼ functioε caε bσ madσ t∩ pagσ o≥ no⌠ pagσ it≤ ì
  85.   outpu⌠ a⌠ thσ user'≤ discretion
  86.  
  87.             «á ┴ LIS╘ functioε i≤ availablσ whicΦ send≤ it≤á outpu⌠ ì
  88.   t∩ thσ CP/═ LST║ Devicσ anΣ doe≤ NO╘ page
  89.  
  90.             «á Thσá DI╥ commanΣ ha≤ beeε extendeΣ t∩ allo≈ thσ dis-ì
  91.   pla∙ oµ thσ systeφ file≤ o≥ al∞ files
  92.  
  93.             « Thσ ER┴ commanΣ no≈ print≤ ou⌠ thσ name≤ oµ thσ file≤ ì
  94.   i⌠ i≤ erasing
  95.  
  96.             «á Thσá curren⌠ use≥ numbe≥ ma∙ bσ includeΣ a≤ par⌠á oµ ì
  97.   thσ commanΣ prompt╗á iµ thσ use≥ i≤ unde≥ ß numbe≥ othe≥ thaεá 0¼ ì
  98.   thσ promp⌠ i≤ oµ thσ forφ 'du>º (likσ 'A2>º o≥ 'B10>')¼á and¼á iµ ì
  99.   thσá use≥ i≤ unde≥ 0¼á thσ promp⌠ ma∙ bσ 'd>º o≥ 'd0>º a≤ pe≥ hi≤ ì
  100.   choice
  101.  
  102.             «á Thσá SUBMI╘ facilit∙ ha≤ beeε changeΣ iεá tw∩á basiπ ì
  103.   ways:
  104.                  - thσá promp⌠á change≤ t∩ 'du$º o≥ 'd$ºá wheεá thσ ì
  105.   SUBMI╘ commanΣ i≤ printed
  106.                  - thσ $$$.SU┬ i≤ executeΣ froφ drivσ A║ (notσ tha⌠ ì
  107.   thσá origina∞á SUBMI╘á probleφ no≈ exists¼á bu⌠ thσá ne≈á SUB.CO═ ì
  108.   facilit∙á correct≤ it)╗á thσ CCP-GROU╨ definitioε oµ aεá Indirec⌠ ì
  109.   CommanΣá Filσá no≈á applies¼á anΣ thi≤á definitioεá i≤á tha⌠á an∙ ì
  110.   sequencσ oµ command≤ whicΦ ma∙ bσ issueΣ froφ thσ consolσ i≤ als∩ ì
  111.   ßá valiΣá sequencσá oµ command≤ fo≥ executioεá froφá aεá Indirec⌠ ì
  112.   Command File; hence, the sequence:
  113.  
  114.                       DIR
  115.                       B:
  116.                       DIR
  117.                       A:
  118.  
  119.   ma∙á bσá issueΣá froφ eithe≥ thσ consolσ o≥ aεá Indirec⌠á CommanΣ ì
  120.   File¼á anΣ thσ result≤ oµ thσ executioε oµ thi≤ sequencσ arσá thσ ì
  121.   same«á  Basically¼á thi≤á say≤á tha⌠ Indirec⌠ CommanΣá File≤á arσ ì
  122.   upward-compatiblσá t∩ thσ consolσ inpu⌠ (bu⌠ no⌠ necessaril∙ tha⌠ ì
  123.   thσá content≤á oµ aε Indirec⌠ CommanΣ Filσ ma∙ bσ issueΣá a⌠á thσ ì
  124.   consolσ withou⌠ modification).è
  125.  
  126.                                                 Page 2
  127.  
  128.  
  129.  
  130.  
  131.  
  132.              ZCPR - A Z80 Replacement for the CP/M CCP
  133.  
  134.  
  135.  
  136.             «á ┴ command-searcΦ hierarch∙ i≤ no≈ implementeΣá whicΦ ì
  137.   i≤ executeΣ roughl∙ a≤ follows:
  138.                  - thσá user'≤ commanΣ i≤ checkeΣ agains⌠ thσá CPR-ì
  139.   residen⌠ command≤ anΣ executeΣ immediatel∙ iµ ß matcΦ i≤ found
  140.                  - failinτá that¼á thσá curren⌠ use≥ numbe≥ oεá thσ ì
  141.   curren⌠ disδ i≤ scanneΣ fo≥ thσ CO═ file╗á thσ CO═ filσ i≤ loadeΣ ì
  142.   anΣ executeΣ iµ found
  143.                  - failinτ that¼ ß defaul⌠ use≥ numbe≥ (initiall∙ ░ ì
  144.   bu⌠á caε bσ rese⌠ witΦ thσ DF╒ CPR-residen⌠ command⌐ oε thσá cur-ì
  145.   ren⌠ disδ i≤ scanneΣ fo≥ thσ CO═ file╗ thσ CO═ filσ i≤ loadeΣ anΣ ì
  146.   executeΣ iµ found
  147.                  - finally¼á failinτ that¼á thσ defaul⌠ use≥ numbe≥ ì
  148.   oε disδ A║á i≤ scanneΣ fo≥ thσ CO═ file╗á thσ CO═ filσ i≤á loadeΣ ì
  149.   anΣ executeΣ iµ founΣ o≥ aε erro≥ messagσ (COMMAND?¼ wheε COMMAN─ ì
  150.   wa≤ thσ user'≤ commanΣ name⌐ i≤ printed
  151.  
  152.             «á  Thσá numeriπá argumen⌠ fo≥ thσ SAV┼ commanΣ caεá bσ ì
  153.   specifieΣá iε hexadecima∞ s∩ tha⌠ thσ use≥ ma∙ emplo∙ thσá value≤ ì
  154.   presented by tools such as DDT exactly as they are given
  155.  
  156.             «á ┴á GE╘á commanΣ whicΦ load≤ ß filσá a⌠á ßá specifieΣ ì
  157.   memor∙ addres≤ anΣ ß JUM╨ commanΣ whicΦ "callsó thσ subroutinσ a⌠ ì
  158.   ßá specifieΣ memor∙ addres≤ havσ beeε added╗á ß G╧ commanΣá whicΦ ì
  159.   "callsóá thσá subroutinσ a⌠ 100╚ (subse⌠ oµ thσ JUM╨á capability⌐ ì
  160.   has also been added
  161.  
  162.  
  163.        Thi≤á documen⌠ provide≤ thσ use≥ oµ ZCPR witΦ thσá followinτ ì
  164.   information:
  165.  
  166.             Part A:  Installation Instructions
  167.             Part B:  Usage Instructions and Explanation of Commands
  168.             Part C:  ZCPR Command Levels and How to Use Them
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.                                                 Page 3
  193.  
  194.  
  195.  
  196.  
  197.  
  198.              ZCPR - A Z80 Replacement for the CP/M CCP
  199.  
  200.  
  201.  
  202.                                Part A
  203.                       Installation Instructions
  204.  
  205.        Iεá orde≥ t∩ instal∞ ZCPR oε ß targe⌠ microcompute≥ (mus⌠ bσ ì
  206.   currently running CP/M 2.2), the user must know two basic things:
  207.  
  208.             1)  Where his CCP is currently running in memory
  209.             2⌐á Wherσ hi≤ CC╨ i≤ locateΣ iε thσ SYSGE╬á image¼á or¼ ì
  210.   fo≥ system≤ whicΦ don'⌠ suppor⌠ SYSGE╬ (sucΦ a≤ P&╘ CP/═ 2.▓á fo≥ ì
  211.   thσ TRS-8░ Mode∞ II)¼ wherσ hi≤ CC╨ i≤ locateΣ oε disδ anΣ ho≈ t∩ ì
  212.   place the new ZCPR on top of it
  213.  
  214.        Thσá firs⌠ questioε i≤ answereΣ relativel∙ easily«á  ┴á pro-ì
  215.   gram¼á knowεá a≤ eithe≥ BDOSLO├ o≥ BDLO├ (fo≥ BDO╙á Locator)¼á i≤ ì
  216.   provideΣá witΦ ZCPR«á  Yo⌡ shoulΣ assemblσ thi≤ prograφ fo≥á you≥ ì
  217.   particula≥á compute≥ (changσ thσ basσ OR╟ iµ yo⌡ arσ runninτ non-ì
  218.   ORG-░ CP/M⌐ anΣ executσ it«á  Upoε execution¼ i⌠ wil∞ providσ yo⌡ ì
  219.   witΦá thσ basσ addres≤ oµ (1⌐ thσ BDO╙ anΣ (2⌐ thσ CC╨á fo≥á you≥ ì
  220.   particula≥ system«á  BDOSLO├ ha≤ workeΣ correctl∙ fo≥ al∞ system≤ ì
  221.   testeΣ s∩ far¼á bu⌠ therσ i≤ alway≤ ß chancσ tha⌠ i⌠ ma∙ NO╘ worδ ì
  222.   fo≥ somσ non-testeΣ system«á  Fo≥ thσ timσ being¼á assumσ tha⌠ i⌠ ì
  223.   work≤ correctl∙ anΣ recorΣ thσ startinτ basσ pagσ addres≤ oµ you≥ ì
  224.   CCP.
  225.  
  226.        Thσá seconΣ questioε i≤ no⌠ answereΣ nearl∙ s∩á easily«á  Iµ ì
  227.   yo⌡á havσá thσ abilit∙ t∩ SYSGE╬ you≥ system¼á i⌠ i≤ mucΦá easie≥ ì
  228.   (commonly⌐ thaε iµ yo⌡ d∩ not«á  Yo⌡ must¼á afte≥ assemblinτá thσ ì
  229.   ZCPRá properly¼á integratσ i⌠ int∩ thσ sysgeε (o≥ disk⌐ imagσá oµ ì
  230.   CP/M«á  Thi≤á caεá bσá donσ b∙ obtaininτ ß SYSGE╬ imagσá oµá you≥ ì
  231.   system¼ scanninτ i⌠ viß ß debugge≥ sucΦ a≤ DD╘ t∩ finΣ thσ offse⌠ ì
  232.   fo≥ thσ CCP¼á readinτ thσ ne≈ CPR iε oε to≡ oµ thσ olΣá one¼á anΣ ì
  233.   finall∙á runninτá SYSGE╬ agaiε t∩ placσ thσ resultan⌠á systeφá oε ì
  234.   disk«á  Iµá yo⌡á D╧ NO╘ havσ SYSGE╬ capability¼á ßá Disδá Utilit∙ ì
  235.   prograφá i≤ requireΣ t∩ locatσ thσ CC╨ oε disδ anΣ theε writσ thσ ì
  236.   ne≈á ZCPRá oεá to≡á oµ thσ olΣá one«á  Thσá ne⌠á resul⌠á oµá thi≤ ì
  237.   integratioεá i≤á thσ placemen⌠ oµ thσ ne≈ ZCPR ont∩ disδá iεá thσ ì
  238.   prope≥á placσ s∩ tha⌠ i⌠ wil∞ bσ loadeΣ witΦ thσ res⌠ oµ CP/═á oε ì
  239.   colΣ boo⌠ anΣ executeΣ properly.
  240.        T∩ finΣ thσ origina∞ CCP¼ yo⌡ typicall∙ havσ t∩ locatσ i⌠ b∙ ì
  241.   it≤ appearance«á  I⌠ i≤ probabl∙ storeΣ contiguousl∙ oε disk¼ so¼ ì
  242.   oncσ i⌠ i≤ found¼ ß sequentia∞ overwritσ i≤ al∞ tha⌠ i≤ required«  ì
  243.   Probabilit∙á i≤ extremel∙ higΦ tha⌠ i⌠ i≤ storeΣ contiguousl∙á iε ì
  244.   thσ SYSGE╬ image«á  Thσ CC╨ start≤ witΦ tw∩ (2⌐ anΣ ONL┘ TW╧ jum≡ ì
  245.   instruction≤á followeΣá b∙ ß buffe≥ areß (possibl∙ containinτá aε ì
  246.   initia∞á commanΣ and/o≥ thσ Digita∞ ResearcΦá copyrigh⌠á notice)«  ì
  247.   Thσá Digita∞á ResearcΦ manual≤ sho≈ thσ CC╨ t∩ residσ a⌠á addres≤ ì
  248.   980╚á iε thσ SYSGE╬ image¼á bu⌠ thi≤ ma∙ var∙á witΦá system«á  T∩ ì
  249.   finΣá thi≤ image¼á usσ DD╘ o≥ somσ othe≥ sucΦ debugger¼á loaΣ thσ ì
  250.   SYSGE╬ imagσ yo⌡ caε ge⌠ viß SYSGEN¼á anΣ examinσ memor∙ startinτ ì
  251.   a⌠ arounΣ 900╚ fo≥ thσ tw∩ (anΣ ONL┘ two⌐ jump≤ describeΣá above«  ì
  252.   Iµá yo⌡ finΣ aε areß witΦ morσ thaε tw∩ jump≤ (ß grou≡ oµá them)¼ ì
  253.   yo⌡á arσ probabl∙ lookinτ a⌠ thσ BIO╙ anΣ shoulΣ g∩ lowe≥ fo≥ thσ ì
  254.   CCP«á  Thσá CC╨ wil∞ probabl∙ star⌠ oε aε eveε pagσ o≥á half-pagσ ì
  255.   address (like 900H, 980H, 1100H, etc).è
  256.  
  257.                                                 Page 4
  258.  
  259.  
  260.  
  261.  
  262.  
  263.              ZCPR - A Z80 Replacement for the CP/M CCP
  264.  
  265.  
  266.  
  267.        No≈ tha⌠ thσ locatioε oµ thσ CC╨ ha≤ beeε found¼ recorΣ thi≤ ì
  268.   addres≤ fo≥ later«  Yo⌡ arσ no≈ read∙ fo≥ thσ integratioε oµ ZCPR ì
  269.   int∩ you≥ system«á  T∩ d∩ this¼ perforφ thσ followinτ step≤ usinτ ì
  270.   thσá informatioεá oµ thσ pagσ addres≤ oµ thσ CC╨á (obtaineΣá froφ ì
  271.   BDOSLO├á anΣá calleΣá CPRLO├ withiε ZCPR⌐ anΣá thσá SYSGE╬á imagσ ì
  272.   address of the CCP (called IMAGE for reference in this document).
  273.  
  274.             1«á Edi⌠á ZCP╥á anΣ se⌠ thσ CPRLO├ equatσ t∩ thσá valuσ ì
  275.   obtaineΣ froφ above«  Als∩ se⌠ an∙ flag≤ anΣ value≤ a≤ yo⌡ desirσ ì
  276.   (seσ thσ sectioε oε ZCP╥ Customizatioε below)«á  Wheεá satisfied¼ ì
  277.   enΣ thσ edi⌠ session.
  278.  
  279.             2«á  Assemblσá ZCPRá witΦ MA├á (o≥á equivalent)«á  Thi≤ ì
  280.   assemble≥á i≤á requireΣá becausσ oµ thσ MACRO≤á used«á  Onl∙á thσ ì
  281.   resultant HEX file is required.
  282.  
  283.             3«á  Assuminτ tha⌠ yo⌡ caε usσ SYSGEN¼á obtaiε ß SYSGE╬ ì
  284.   image of your current CP/M system and save it on disk.
  285.  
  286.             4«á  LoaΣá thσá SYSGE╬ imagσ int∩ memor∙ witΦá DD╘á (o≥ ì
  287.   equivalent)«  Oncσ loaded¼ verif∙ tha⌠ thσ origina∞ CC╨ i≤ a⌠ thσ ì
  288.   IMAG┼á addres≤á founΣ abovσ anΣ computσá thσá integratioεá offse⌠ ì
  289.   using the DDT H command:
  290.                  H<IMAGE adr>,<CPRLOC adr>
  291.   Thσá seconΣ numbe≥ displayeΣ give≤ yo⌡ thσ OFFSE╘ valuσá requireΣ ì
  292.   for step 5.
  293.  
  294.             5«á  Integratσá ZCPR int∩ you≥ SYSGE╬ imagσ viß DDT'≤ ╔ ì
  295.   anΣ ROFFSE╘ commands«  Usσ IZCPR.HE╪ (o≥ thσ namσ oµ you≥ versioε ì
  296.   oµá ZCPR⌐ t∩ loaΣ thσ FC┬ anΣ ROFFSE╘ (wherσ OFFSE╘ wa≤á computeΣ ì
  297.   iεá ste≡ 4⌐ t∩ loaΣ thσ ZCPR.HE╪ filσ int∩ memor∙ a⌠á thσá prope≥ ì
  298.   location«á  Checδá t∩ seσ tha⌠ ZCPR i≤ indeeΣ properl∙ loadeΣá b∙ ì
  299.   examining the SYSGEN IMAGE area.
  300.  
  301.             6«á  Placσ thσ ne≈ systeφ oε disδ b∙ runninτ SYSGE╬ anΣ ì
  302.   NOT loading the system from disk (use the memory image).
  303.  
  304.        Fo≥áá furthe≥á clarificatioεá oµá thσá abovσá process¼áá thσ ì
  305.   followinτá i≤ ß samplσ termina∞ sessioε whicΦ outline≤ thσá step≤ ì
  306.   taken.
  307.  
  308.                       ZCPR Integration Example
  309.  
  310.  
  311.   B>; Sample terminal session for integrating ZCPR
  312.   B>sysgen
  313.   SYSGEN VER 2.2
  314.   SOURCE DRIVE NAME (OR RETURN TO SKIP)b
  315.   SOURCE ON B, THEN TYPE RETURN  <-- I hit the RETURN key here
  316.   FUNCTION COMPLETE                                /
  317.   DESTINATION DRIVE NAME (OR RETURN TO REBOOT)  <-- and here
  318.   B>save 44 cpm56.com      <-- We now have a SYSGEN image of CP/M
  319.                                 to work with
  320. è
  321.  
  322.                                                 Page 5
  323.  
  324.  
  325.  
  326.  
  327.  
  328.              ZCPR - A Z80 Replacement for the CP/M CCP
  329.  
  330.  
  331.   B>xdir
  332.   XDIR   Version 2.6  User Number:   0,  Double Density
  333.   File Attributes:  Non-System  
  334.  
  335.   Filename.Typ Size K   Filename.Typ Size K   Filename.Typ Size K
  336.   -------- --- ------   -------- --- ------   -------- --- ------
  337.   !TEXTWRK.-12      0   CPR     .DOC      8   EE687   .TXT      4
  338.   CPR     .AQM     34   TFS     .HLP      6   EE687PRE.TXT      4
  339.   CPR     .ASM     50   CONTENTS.T01      6   SW1     .TXT     10
  340.   CPR     .BAK      4   CONTENTS.T02      4   SW2     .TXT      2
  341.   CPM56   .COM     12   CONTENTS.T03      4
  342.   B:  30 Entries &   22 Files --    338K Bytes Remaining
  343.   File Data:         14 Files --    154K Bytes Displayed
  344.   B>bdosloc      <-- Now to locate the CCP's address
  345.   The Base Page Address of this system's BDOS is C5
  346.   The Base Page Address of this system's CCP is  BD <-- This is it
  347.   B>ddt cpm56.com     <-- Now to find the CCP in the SYSGEN image
  348.   DDT VERS 2.0
  349.   NEXT  PC
  350.   2D00 0100
  351.   -d900,90f      <-- Start looking around here
  352.   0900 31 80 E7 3E 06 3C 3C FE 1B CA 00 C2 DA 11 E7 D6 1..>.<<.........
  353.   -da00,a0f
  354.   0A00 31 00 01 01 01 0C C5 CD 0F E4 21 00 BE 11 00 04 1.........!.....
  355.   -db00,b0f
  356.   0B00 31 00 01 01 01 11 C5 CD 0F E4 21 00 C0 11 00 02 1.........!.....
  357.   -db80,b8f
  358.   0B80 31 00 01 01 09 01 CD A8 00 21 00 D2 11 00 C2 0E 1........!......
  359.           -- Detail Left Out --
  360.   -d1100         <-- I found it at 1100H; note the 2 JMP's
  361.   1100 C3 FF BD C3 FB BD 50 10 20 20 20 20 20 20 20 20 ......P.        
  362.   1110 20 20 20 20 20 20 20 20 00 00 00 00 00 00 00 00         ........
  363.   1120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  364.           -- Detail Left Out --
  365.   -^├            <-- Returε t∩ CP/M╗ ╔ kno≈ tha⌠ CPRLO├ wil∞ be
  366.                       BD00H and the IMAGE offset is 1100H
  367.  
  368.   B>eΣ cpr.asφ {edi⌠ ZCPR herσ anΣ placσ CPRLOC=BD00H}#  
  369.           -- Detail Left Out --
  370.  
  371.   B>mac cpr $pz sz         <-- Now to assemble the CPR
  372.   CP/M MACRO ASSEM 2.0
  373.   C4F0                     <-- Note that CPR MUST end before BDOS
  374.                                 begins!
  375.   014H USE FACTOR
  376.   END OF ASSEMBLY
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.                                                 Page 6
  389.  
  390.  
  391.  
  392.  
  393.  
  394.              ZCPR - A Z80 Replacement for the CP/M CCP
  395.  
  396.  
  397.  
  398.  
  399.   B>ddt cpm56.com          <-- Now to integrate!
  400.   DDT VERS 2.0
  401.   NEXT  PC
  402.   2D00 0100
  403.   -h1100,bd00              <-- Compute offset for new CPR
  404.   CE00 5400                <-- Offset is 5400H
  405.   -icpr.hex                <-- Init FCB
  406.   -r5400                   <-- Read in new CPR with offset
  407.   NEXT  PC
  408.   2D00 0000
  409.   -^C                      <-- Done!
  410.   B>sysgen                 <-- Now to SYSGEN onto disk
  411.   SYSGEN VER 2.2
  412.   SOURCE DRIVE NAME (OR RETURN TO SKIP)   <-- Use memory image
  413.   DESTINATION DRIVE NAME (OR RETURN TO REBOOT)b     <-- onto B:
  414.   DESTINATION ON B, THEN TYPE RETURN
  415.   FUNCTION COMPLETE
  416.   DESTINATION DRIVE NAME (OR RETURN TO REBOOT) <-- Done for now
  417.  
  418.   B>
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.                                                 Page 7
  455.  
  456.  
  457.  
  458.  
  459.  
  460.              ZCPR - A Z80 Replacement for the CP/M CCP
  461.  
  462.  
  463.  
  464.                    Setting the ZCPR Inline Options
  465.  
  466.        Thσá followinτá arσ thσ fou≥ basiπ option≤ availablσ t∩á thσ ì
  467.   user under ZCPR for customization of his package.
  468.  
  469.   Option Name    Function
  470.  
  471.      REL         Configures CPRLOC (CPRLOC equ 0) for integration
  472.                  via MOVCPM rather than the DDT/SYSGEN technique
  473.                  outlined above; set to TRUE for MOVCPM integra-
  474.                  tion or FALSE for DDT/SYSGEN integration
  475.  
  476.      BASE        Base address of your CP/M system; standard CP/M
  477.                  has a base of 0, but some CP/M systems (such as
  478.                  for the TRS-80 Model I and Heath/Zenith H89/Z89)
  479.                  start physical RAM memory at a higher address;
  480.                  equate BASE to the starting RAM memory address of
  481.                  your system
  482.  
  483.      CPRLOC      This is the starting address of ZCPR; set the
  484.                  second CPRLOC equate to the address you obtain
  485.                  from BDOSLOC
  486.  
  487.      RAS         This is an equate which masks out selected ZCPR
  488.                  command functions for security purposes on
  489.                  Remote Access Systems such as Bulletin Boards;
  490.                  the masked out functions currently include
  491.                  SAVE, ERA, REN, JUMP, GO, and GET; set RAS to TRUE
  492.                  to mask these out or FALSE to leave them in
  493.  
  494.      SUBA        This is an equate which determines the drive
  495.                  onto which ZCPR will look for an executing
  496.                  Indirect Command File.  If the basic philosophy
  497.                  of the Indirect Command File described above is
  498.                  to be maintained, this symbol should be set to
  499.                  TRUE (look on drive A: for the $$$.SUB file); if
  500.                  not, this symbol should be set to FALSE (look on
  501.                  the default drive from the $$$.SUB file).  To
  502.                  review, the basic philosophy of the Indirect
  503.                  Command File is that any sequence of commands
  504.                  which may be issued from the console (within
  505.                  reason, which means NOT to erase a $$$.SUB file)
  506.                  may also be issued from within an Indirect
  507.                  Command File, and the resultant execution should
  508.                  be identical (same functions performed).
  509.  
  510.      CLEVEL3     This equate enables or disables extended Command
  511.                  Leve∞ │ Processing«  Iµ se⌠ t∩ TRUE¼ extended
  512.                  Command Level 3 Processing is enabled and the user
  513.                  command line is automatically capitalized, the
  514.                  terminatinτ zer∩ i≤ placeΣ a⌠ thσ enΣ oµ thσ
  515.                  buffer, and the internal CIBPTR is set correctly
  516.                  (see later for more information).
  517.  
  518.  
  519.  
  520.                                                 Page 8
  521.  
  522.  
  523.  
  524.  
  525.  
  526.              ZCPR - A Z80 Replacement for the CP/M CCP
  527.  
  528.  
  529.  
  530.  
  531.                         Customization Symbols
  532.  
  533.        Thσ followinτ symbol≤ arσ provideΣ fo≥ furthe≥ customizatioε ì
  534.   of ZCPR to a user's particular tastes and hardware facilities.
  535.  
  536.   Option Name    Function
  537.  
  538.      NLINES      Number of lines on the user's CRT for paging
  539.  
  540.      WIDE        This equate is used to select a narrow or wide
  541.                  display under the DIR command; if WIDE is equated
  542.                  to TRUE, each file name is separated by two
  543.                  spaces, a FENCE, and two more spaces; if WIDE is
  544.                  equated to FALSE, each file name is separated by
  545.                  one space, a FENCE, and one more space
  546.  
  547.      PGDFLT      This is the Paging Default flag for the TYPE
  548.                  command; if PGDFLT is set to TRUE, the TYPE
  549.                  command will page its output by default and
  550.                  the P option on the TYPE command (see below)
  551.                  will prohibit paging; if PGDFLT is set to FALSE,
  552.                  the TYPE command will NOT page its output by
  553.                  default and the P option will enable paging
  554.  
  555.      PGDFLG      This sets the option character in the command
  556.                  line for the TYPE command (the 'P' mentioned
  557.                  above); if the user wishes to change this option
  558.                  character, he need only change this equate
  559.  
  560.      MAXUSR      This is the largest user number recognized by
  561.                  the USER command; if the user wishes to protect
  562.                  the higher user areas, he may set this symbol
  563.                  to the highest area normally accessable; 15 is
  564.                  the largest permitted value for MAXUSR
  565.  
  566.      SYSFLG      This is the option character for the DIR command
  567.                  line which is used to specify that DIR search
  568.                  All Files (both $SYS and $DIR) for its display;
  569.                  the distributed default for this is 'A'
  570.  
  571.      SOFLG       This is the option character for the DIR command
  572.                  line which is used to specify that DIR search
  573.                  ONLY the $SYS files for its display; the distri-
  574.                  buted default for this is 'S'
  575.  
  576.      SUPRES      Set SUPRES to TRUE to suppress printing the user
  577.                  number when the user is under User Number 0 or
  578.                  set SUPRES to FALSE to ALWAYS display the User
  579.                  Number with the CPR prompt; with SUPRES set to
  580.                  TRUE, a user on B: in user 0 sees 'B>' as the
  581.                  prompt, but with SUPRES set to FALSE, a user on
  582.                  B: in user 0 sees 'B0>' as the prompt
  583.  
  584.  
  585.  
  586.                                                 Page 9
  587.  
  588.  
  589.  
  590.  
  591.  
  592.              ZCPR - A Z80 Replacement for the CP/M CCP
  593.  
  594.  
  595.  
  596.      DEFUSR      This is the CPR-default user number which is
  597.                  searched in the command hierarchy for the COM
  598.                  files (distributed as 0); the DFU changes this
  599.                  temporarily until a Warm Boot or Cold Boot is
  600.                  done, at which time the search reverts to this
  601.                  value
  602.  
  603.      SPRMPT      This is the CPR prompt character which indicates
  604.                  that a SUBMIT file is in execution; by default
  605.                  it is set to '$', so prompts like 'A$' appear
  606.                  during SUBMIT file execution
  607.  
  608.      CPRMPT      This is the CPR prompt character which indicates
  609.                  that the CPR is awaiting a user console command;
  610.                  by default it is set to '>', so prompts like
  611.                  'A>' appear during user input to the CPR
  612.  
  613.      NUMBAS┼     Thi≤ i≤ thσ escapσ characte≥ useΣ b∙ thosσ
  614.                  commands which require a DECIMAL number as
  615.                  an argument; placing this character after
  616.                  the number argument switches the base to
  617.                  HEXADECIMAL; for example, 'SAVE 15 MYFILE' can be
  618.                  expressed as 'SAVE FH MYFILE' if NUMBASE is
  619.                  set to 'H' (the default)
  620.  
  621.      SECTFLG     This character constant is the suffix option for
  622.                  the SAVE command which specifies that sectors,
  623.                  as opposed to pages, are to be saved; the default
  624.                  value is 'S'
  625.  
  626.      FENCE       This is the character printed to separate entries
  627.                  in a directory listing; it's default value is '|'
  628.  
  629.  
  630.                          Patching SUBMIT.COM
  631.  
  632.        SUBMIT.CO═á ma∙ bσ patcheΣ t∩ ruε witΦ ZCP╥ b∙ thσ followinτ ì
  633.   procedurσá (thi≤á i≤á recommendeΣá iµá thσá use≥á doe≤á no⌠á havσ ì
  634.   SUB.COM)«á  Thi≤á patcΦ simpl∙ make≤ i⌠ alway≤ placσ thσá $$$.SU┬ ì
  635.   filσ oε Drivσ A:«  Illustrative termina∞ sessioε follows:
  636.  
  637.   A>ddt b:submit.com
  638.   DDT VERS 2.0
  639.   NEXT  PC
  640.   0600 0100
  641.   -s5bb           <-- Patch is at 5BB Hex
  642.   05BB 00 1       <-- Change 0 (default drive) to 1 (drive A:)
  643.   05BC 24 .       <-- That's it!
  644.   -d5b0 5cf       <-- See change
  645.   05B0 00 00 00 00 00 00 30 30 31 20 24 01 24 24 24 20 ......001 $.$$$ 
  646.   05C0 20 20 20 20 53 55 42 00 00 00 1A 1A 1A 1A 1A 1A     SUB.........
  647.   -^C             <-- Done
  648.   A>save 5 newsubmt.com   <-- Save new SUBMIT.COM file
  649.  
  650.  
  651.  
  652.                                                 Page 10
  653.  
  654.  
  655.  
  656.  
  657.  
  658.              ZCPR - A Z80 Replacement for the CP/M CCP
  659.  
  660.  
  661.  
  662.                                Part B
  663.            Usage Instructions and Explanation of Commands
  664.  
  665.  
  666.        Thσá followinτ instruction≤ arσ writteε witΦ thσá assumptioε ì
  667.   tha⌠á thσá reade≥ i≤ quitσ familia≥ witΦ ho≈ t∩ usσ CP/═ 2.▓á anΣ ì
  668.   it≤ CCP«á  ZCPR i≤ writteε a≤ ß logica∞ extensioε oµ thσ CP/═ 2.▓ ì
  669.   CC╨ philosoph∙ anΣ shoulΣ bσ addresseΣ a≤ such.
  670.  
  671.  
  672.  
  673.                   The ZCPR Command Hierarchy Search
  674.  
  675.        Thσ first¼á anΣ mos⌠ basiπ thing¼ t∩ learε abou⌠ ZCPR i≤ thσ ì
  676.   orde≥ iε whicΦ i≤ searche≤ fo≥ ß CO═ filσ fo≥ executioε o≥ ß filσ ì
  677.   specifieΣá b∙ thσ GE╘ command«á  Unde≥ thσ CP/═ 2.▓ CCP¼á iµá thσ ì
  678.   specifieΣá CO═ filσ commanΣ wa≤ no⌠ founΣ oε thσ curren⌠ drivσ iε ì
  679.   thσá curren⌠ use≥ area¼á thσ CC╨ aborteΣ witΦ aεá erro≥á message«  ì
  680.   ZCPR¼á however¼á continue≤ searchinτ froφ thi≤ poin⌠ ß maximuφ oµ ì
  681.   tw∩á morσá levels«á  Thi≤ commanΣ hierarch∙ searcΦá wa≤á outlineΣ ì
  682.   abovσ anΣ i≤ describeΣ herσ iε furthe≥ detail.
  683.  
  684.             1«á  Iµá thσá commanΣ i≤ oµ thσ forφ 'COMMANDº anΣá NO╘ ì
  685.   'd:COMMAND'¼á thσá CPR-residen⌠á commanΣ lis⌠ i≤ searcheΣá fo≥á ß ì
  686.   match«á  Iµá thσá matcΦ i≤ found¼á thσá CPR-residen⌠á commanΣá i≤ ì
  687.   immediatel∙ processed«á  Iµ thσ matcΦ i≤ no⌠ founΣ o≥ thσ commanΣ ì
  688.   i≤á oµ thσ forφ 'd:COMMAND'¼á thσ nex⌠ ste≡ i≤ taken«á  Notσ tha⌠ ì
  689.   thσá 'd:COMMANDºá forφ i≤ gooΣ fo≥ executinτ ß commanΣá CO═á filσ ì
  690.   whicΦá ha≤ thσ samσ namσ a≤ ß CPR-residen⌠ commanΣ (sucΦ a≤á SAV┼ ì
  691.   or DIR).
  692.  
  693.             2«á  Iµá thσ commanΣ i≤ oµ thσ forφá 'd:COMMAND'¼á disδ ì
  694.   drivσá 'd:ºá i≤á temporaril∙ loggeΣ iε fo≥á thσá purposσá oµá thσ ì
  695.   commanΣá search«á  Otherwise¼á thσá currentl∙ logged-iε drivσá i≤ ì
  696.   used.
  697.  
  698.             3«  No≈ thσ filσ nameΣ COMMAND.CO═ i≤ searcheΣ for«  Iµ ì
  699.   found¼á i⌠á i≤ loadeΣ int∩ memor∙ startinτ a⌠ 100╚ anΣá executed«  ì
  700.   If not, proceed to step 4.
  701.  
  702.             4«á  No≈á tha⌠á thσ firs⌠ searcΦá fo≥á COMMAND.CO═á ha≤ ì
  703.   failed¼á thσá CPR check≤ t∩ seσ iµ thσ use≥ i≤ unde≥ thσá curren⌠ ì
  704.   Defaul⌠ Use≥ Number«á  Thσ Defaul⌠ Use≥ Numbe≥ ma∙ bσ tha⌠ se⌠ b∙ ì
  705.   thσá DEFUS╥ equatσ iε thσ CPR o≥ tha⌠ se⌠ b∙ thσ use≥ viß thσ DF╒ ì
  706.   command«á  DEFUS╥á i≤ iε effec⌠ iµ DF╒ ha≤ no⌠ beeε issueΣá sincσ ì
  707.   thσ las⌠ Warφ o≥ ColΣ Boot¼ anΣ DF╒ i≤ iε effec⌠ iµ i⌠ wa≤ issueΣ ì
  708.   sincσ thσ las⌠ Warφ o≥ ColΣ Boot«á  Iµ thσ use≥ i≤ NO╘ unde≥á thσ ì
  709.   curren⌠á Defaul⌠ Use≥ Number¼á ZCPR temporaril∙ log≤ hiφ int∩á i⌠ ì
  710.   anΣá searche≤á thσ directory«á  Iµ COMMAND.CO═ i≤á found¼á i⌠á i≤ ì
  711.   loadeΣ a≤ describeΣ abovσ anΣ executed«  Iµ not¼ ZCPR proceed≤ t∩ ì
  712.   the next step.
  713.  
  714.  
  715.  
  716.  
  717.  
  718.                                                 Page 11
  719.  
  720.  
  721.  
  722.  
  723.  
  724.              ZCPR - A Z80 Replacement for the CP/M CCP
  725.  
  726.  
  727.  
  728.             5«á  Thσ use≥ i≤ no≈ iε thσ Defaul⌠ Use≥ Number¼ anΣ a⌠ ì
  729.   thi≤á point¼á ZCPR check≤ t∩ seσ iµ thσ use≥ i≤ oε disδ drivσ A:«  ì
  730.   Iµ not¼ i⌠ temporaril∙ log≤ int∩ A║ anΣ searche≤ thσ defaul⌠ use≥ ì
  731.   numbe≥á oµá A║á fo≥á COMMAND.COM«á  Iµ found¼á i⌠á i≤á loadeΣá a≤ ì
  732.   describeΣ abovσ anΣ executed«á  Iµ not¼á ZCPR print≤ thσá commanΣ ì
  733.   namσá a≤á aεá erro≥ messagσ anΣ return≤ t∩á commanΣá inpu⌠á mode¼ ì
  734.   aborting the SUBMIT file if COMMAND came from it.
  735.  
  736.        Iεá al∞ case≤ oµ thσ searcΦ above¼á iµ COMMAND.CO═ i≤ found¼ ì
  737.   afte≥á i⌠á i≤ loadeΣ int∩ memory¼á ZCPR reset≤ thσá use≥á t∩á hi≤ ì
  738.   origina∞ disδ drivσ anΣ use≥ number«  Hence¼ thσ file≤ referenceΣ ì
  739.   by the user by default are obtained from this environment.
  740.  
  741.        T∩á illustratσ thi≤ commanΣ hierarch∙ search¼á conside≥á thσ ì
  742.   following examples:
  743.  
  744.   Example 1:  DEFUSR equ 0 {default user number is 0}
  745.  
  746.   B10>           <-- User is on Drive B:, User Number 10
  747.   B10>ASM TEST.BBZ    <-- User wishes to assemble TEST.ASM in
  748.                            Drive B:, User 10
  749.        <-- At this point, ZCPR looks on B:/10 for ASM.COM, fails,
  750.             looks on B:/0, fails, and finally looks on A:/0; it
  751.             finds ASM.COM here and goes back to B:/10 for the file
  752.  
  753.  
  754.   Example 2:  DEFUSR equ 0 and DFU issued
  755.  
  756.   B10>           <-- User is on Drive B:, User Number 10
  757.   B10>DFU 5      <-- User Selects User 5 as default
  758.   B10>ASM TEST.BBZ    <-- As above
  759.        <-- At this point, ZCPR looks on B:/10 for ASM.COM, fails,
  760.             look on B:/5, fails, and finally looks on A:/5; it
  761.             fails here also and prints ASM? as an error message
  762.  
  763.   Example 3:  DEFUSR equ 0
  764.  
  765.   B>             <-- User is on Drive B:, User Number 0
  766.   B>ASM TEST.BBZ      <-- As above
  767.        <-- At this point, ZCPR looks on B:/0 for ASM.COM, fails,
  768.             looks on A:/0, fails, and prints error message
  769.  
  770.   Example 4:  DEFUSR equ 0
  771.  
  772.   A10>           <-- User is on Drive A:, User Number 10
  773.   A10>ASM TEST.AAZ    <-- As above, but file on A:
  774.        <-- At this point, ZCPR looks on A:/10 for ASM.COM, fails,
  775.             looks on A:/0, fails, and prints error message
  776.  
  777.  
  778.  
  779.  
  780.  
  781.  
  782.  
  783.  
  784.                                                 Page 12
  785.  
  786.  
  787.  
  788.  
  789.  
  790.              ZCPR - A Z80 Replacement for the CP/M CCP
  791.  
  792.  
  793.  
  794.   Another Example:
  795.  
  796.             Fo≥á example¼á iµ thσ use≥ i≤ loggeΣ int∩ Drivσá B║á iε ì
  797.   Use≥ Areß 10¼ thσ Defaul⌠ Use≥ Numbe≥ i≤ 0¼ anΣ thσ followinτ CO═ ì
  798.   file≤ arσ presen⌠ a≤ indicateΣ --
  799.  
  800.                  WM.COM on Drive A: in User 0
  801.                  MBASIC.COM on Drive A: in User 0 and on
  802.                       Drive B: in User 0
  803.                  TEST.COM on Drive B: in User 10 and Drive B:
  804.                       in User 0
  805.  
  806.   theεá thσá followinτá happen≤ wheεá thσá followinτá command≤á arσ ì
  807.   issued from the console (or Indirect Command File):
  808.  
  809.   B10>WM TEST2.TXT
  810.    \   \    \__ File to be edited
  811.     \   \__ Invoke the WM.COM file (Word Master editor)
  812.      \__ User is on Drive B: in User Area 10
  813.  
  814.        Results:
  815.             ZCPR searche≤ B║á Use≥ 10¼ B║ Use≥ 0¼ anΣ A║ Use≥ ░ fo≥ ì
  816.   WM.COM╗á i⌠ find≤ WM.CO═ iε A║á Use≥ 0¼á load≤ it¼á log≤ thσ use≥ ì
  817.   back into B: User 10, and executes it.
  818.  
  819.   B10>MBASIC
  820.    \    \__ Invoke the MBASIC.COM file (MBASIC Interpreter)
  821.     \__ User is on Drive B: in User Area 10
  822.  
  823.        Results:
  824.             ZCPR searche≤ B║á Use≥ 1░ anΣ B║ Use≥ ░ fo≥ MBASIC.COM╗ ì
  825.   i⌠ find≤ MBASIC.CO═ iε B║ Use≥ 0¼ s∩ i⌠ doesn'⌠ bothe≥ t∩ looδ oε ì
  826.   A║á Use≥ 0«á  MBASIC.CO═ i≤ theε loadeΣ anΣ executeΣ a≤ describeΣ ì
  827.   in the previous example.
  828.  
  829.   B10>TEST
  830.     \   \__ Invoke the TEST.COM file (TEST program)
  831.      \__ User is on Drive B: in User Area 10
  832.  
  833.        Results:
  834.             ZCPRá searche≤á B║á Use≥á 1░á fo≥á TEST.COM╗á i⌠á find≤ ì
  835.   TEST.CO═ iε B║á Use≥ 0¼á s∩ i⌠ doesn'⌠ bothe≥ t∩ looδ furthe≥ (iµ ì
  836.   i⌠ had¼á i⌠ woulΣ havσ founΣ TEST.CO═ iε B║ Use≥ 0)«  TEST.CO═ i≤ ì
  837.   then loaded and executed as described above.
  838.  
  839.   B10>TEST2
  840.     \    \__ Invoke the TEST2.COM file (TEST2 program)
  841.      \__ User is on Drive B: in User Area 10
  842.  
  843.        Results:
  844.             ZCPR searche≤ B║á Use≥ 10¼ B║ Use≥ 0¼ anΣ A║ Use≥ ░ fo≥ ì
  845.   TEST2.COM╗á i⌠á doesn'⌠ finΣ it¼á s∩ i⌠ issue≤ thσ erro≥á messagσ ì
  846.   'TEST2?', which says it couldn't find TEST2.COM.
  847. è
  848.  
  849.                                                 Page 13
  850.  
  851.  
  852.  
  853.  
  854.  
  855.              ZCPR - A Z80 Replacement for the CP/M CCP
  856.  
  857.  
  858.  
  859.  
  860.  
  861.                      The ZCPR-Resident Commands
  862.  
  863.        Thσá followinτá page≤ describσ thσá ZCPR-Residen⌠á Commands«  ì
  864.   Thesσá arσ command≤ locateΣ withiε ZCPR itselµ whicΦ arσ executeΣ ì
  865.   froφ withiε ZCPR«  Thσ phrase≤ <afn╛ anΣ <ufn╛ refe≥ t∩ ambiguou≤ ì
  866.   file name and unambigous file name as per the CP/M convention.
  867.  
  868.   Command: DIR
  869.   Function:  To Display a listing of the names of the files on disk
  870.   Forms:
  871.        DIR <afn>           <-- Displays $DIR files
  872.        DIR <afn> S         <-- Displays $SYS files
  873.        DIR <afn> A         <-- Displays both $DIR and $SYS files
  874.   Customization Variables:
  875.        WIDE      SYSFLG    SOFLG     FENCE
  876.   Examples:
  877.        DIR *.ASM           <-- All $DIR .ASM files
  878.        DIR *.COM S         <-- All $SYS .COM files
  879.        DIR *.COM A         <-- All .COM files
  880.   Notes:
  881.        Iµá ßá filσ i≤ scanneΣ fo≥ anΣ n∩ sucΦ namσ exist≤ oεá disk¼ ì
  882.   thσá 'N∩á Filesº messagσ wil∞ appear«á  However¼á iµá ßá filσá i≤ ì
  883.   scanneΣ fo≥ anΣ thσ namσ exist≤ a≤ ß $SY╙ filσ anΣ $DI╥ file≤ arσ ì
  884.   beinτá scanneΣ for¼á n∩ filσ namσ i≤ displayeΣ bu⌠ thσ 'N∩ Filesº ì
  885.   messagσ doe≤ NO╘ appear«  Fo≥ example¼ iµ TEST.CO═ i≤ ß $SY╙ filσ ì
  886.   anΣá 'DI╥á TEST.COMº i≤ issued¼á n∩á messagσá appears«á  Iµá 'DI╥ ì
  887.   TEXT.COMº i≤ issueΣ anΣ TEXT.CO═ doe≤ no⌠ exis⌠ oε disk¼á thσ 'N∩ ì
  888.   Files' message is displayed.
  889.  
  890.  
  891.   Command: ERA
  892.   Function:  To Erase the specified $R/W files from disk
  893.   Forms:
  894.        ERA <afn>           <-- Erase both $DIR and $SYS files
  895.   Customization Variables:
  896.        WIDE      FENCE
  897.   Examples:
  898.        ERA *.ASM           <-- Erase all .ASM files
  899.        ERA *.*             <-- Erase all files
  900.   Notes:
  901.        Iµ ß $R/╧ filσ i≤ encountered¼á ß BDO╙ erro≥ messagσ wil∞ bσ ì
  902.   displayeΣá anΣ thσ procedurσ i≤ stopped«á  Thσ use≥ i≤ unsurσá a⌠ ì
  903.   thi≤á timσ a≤ t∩ whicΦ file≤ havσ beeε eraseΣ anΣ whicΦ havσá no⌠ ì
  904.   anΣ shoulΣ check«  Sorr∙ fo≥ thi≤ problemí  Thσ ERAS┼ commanΣ (t∩ ì
  905.   bσá giveεá t∩ SIG/═ b∙ RL├ iε thσ nea≥ future⌐ i≤ ßá solutioεá t∩ ì
  906.   this problem.
  907.  
  908.  
  909.  
  910.  
  911.  
  912.  
  913.  
  914.  
  915.                                                 Page 14
  916.  
  917.  
  918.  
  919.  
  920.  
  921.              ZCPR - A Z80 Replacement for the CP/M CCP
  922.  
  923.  
  924.  
  925.  
  926.   Command: LIST
  927.   Function:  To Print the specified file on the CP/M LST: device
  928.   Forms:
  929.        LIST <ufn>          <-- Print the file (no paging)
  930.   Customization Variables:
  931.        -None-
  932.   Examples:
  933.        LIST TEST.TXT       <-- Print TEST.TXT on LST:
  934.   Notes:
  935.        Iµá thσ filσ ha≤ ß $SY╙ attribute¼á i⌠ wil∞ bσ founΣ a≤ wel∞ ì
  936.   as those with $DIR attributes.
  937.  
  938.  
  939.   Command: TYPE
  940.   Function:  To Print the specified file on the CP/M CON: device
  941.   Forms:
  942.        TYP┼ <ufn╛          <-- Prin⌠ thσ filσ witΦ thσ paginτ deflt
  943.        TYPE <ufn> P        <-- Print the file with the paging deflt
  944.                                 negated
  945.   Customization Variables:
  946.        NLINES    PGDFLT    PGDFLG
  947.   Examples:
  948.        TYPE TEST.TXT
  949.        TYPE TEST.TXT P
  950.   Notes:
  951.        Wheεá thσá displa∙ pause≤ durinτ paging¼á typσ an∙á cha≥á t∩ ì
  952.   continue or ^C to abort.  ^S also works.
  953.  
  954.  
  955.   Command: SAVE
  956.   Function:  To Copy the TPA starting at 100H to disk
  957.   Forms:
  958.        SAVE <Number of Pages> <ufn>  <-- <Number of Pages> in DEC
  959.        SAVE <Number of Pages>H <ufn> <-- <Number of Pages> in HEX
  960.        SAVE <Number of Sectors> <ufn> S  <-- Number of sectors
  961.        SAVE <Number of Sectors>H <ufn> S <-- Number of sectors
  962.   Customization Variables:
  963.        NUMBASE   RAS
  964.   Examples:
  965.        SAVE 15 MYFILE.TXT        <-- 15 pages saved
  966.        SAVE FH MYFILE.TXT        <-- 15 pages saved
  967.        SAVE 10H MYFILE.TXT S     <-- 16 sectors (8 pages) saved
  968.   Notes:
  969.        Iµ thσ filσ namσ t∩ bσ saveΣ alread∙ exists¼á theε SAV┼ wil∞ ì
  970.   exi⌠ witΦ thσ messagσ 'Delete File?'╗ iµ thσ use≥ REALL┘ want≤ t∩ ì
  971.   savσá unde≥á thi≤ name¼á hσ ma∙ theε typσ ┘ o≥ ∙ anΣ thσá curren⌠ ì
  972.   filσ wil∞ bσ deleteΣ anΣ theε recreateΣ containinτ thσá specifieΣ ì
  973.   part of the TPA.
  974.  
  975.  
  976.  
  977.  
  978.  
  979.  
  980.  
  981.                                                 Page 15
  982.  
  983.  
  984.  
  985.  
  986.  
  987.              ZCPR - A Z80 Replacement for the CP/M CCP
  988.  
  989.  
  990.  
  991.  
  992.  
  993.   Command: REN
  994.   Function:  To Change the name of a disk file
  995.   Forms:
  996.        REN <ufn new>=<ufn old>
  997.   Customization Variables:
  998.        RAS
  999.   Examples:
  1000.        REN NEWFILE.TXT=OLDFILE.TXT
  1001.   Notes:
  1002.        Iµ <ufε new╛ alread∙ exists¼ thσ messagσ 'Deletσ File?º wil∞ ì
  1003.   bσá printeΣá anΣ thσ use≥ ma∙ responΣ witΦ ┘ o≥ ∙ t∩á deletσá thσ ì
  1004.   curren⌠ <ufε new╛ anΣ theε renamσ <ufε old╛ t∩ <ufε new>.
  1005.  
  1006.   Command: USER
  1007.   Function:  To Change the current user number
  1008.   Forms:
  1009.        USER <User Number>       <-- <User Number> in DEC
  1010.        USER <User Number>H      <-- <User Number> in HEX
  1011.   Customization Variables:
  1012.        -None-
  1013.   Examples:
  1014.        USER 15        USER FH        USER 0
  1015.        USER      <-- Same as USER 0
  1016.   Notes:
  1017.        -None-
  1018.  
  1019.  
  1020.   Command: DFU
  1021.   Function:  To Temporarily Change the default user number for the
  1022.              command hierarchy search
  1023.   Forms:
  1024.        DFU <User Number>        <-- <User Number> in DEC
  1025.        DFU <User Number>H       <-- <User Number> in HEX
  1026.   Customization Variables:
  1027.        -None-
  1028.   Examples:
  1029.        DFU 15         DFU FH         DFU 0
  1030.        DFU       <-- Same as DFU 0
  1031.   Notes:
  1032.        See above for explanation.
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038.  
  1039.  
  1040.  
  1041.  
  1042.  
  1043.  
  1044.  
  1045.  
  1046.  
  1047.                                                 Page 16
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.              ZCPR - A Z80 Replacement for the CP/M CCP
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.   Command: JUMP
  1060.   Function:  To "call" the subroutine at the specified page address
  1061.   Forms:
  1062.        JUMP <Address> <Cmd Parms> <-- <Address> in HEX
  1063.   Customization Variables:
  1064.        NUMBASE   RAS
  1065.   Examples:
  1066.        JUMP E000 or JUMP E000H  <-- Jump to E000H
  1067.        JUMP                     <-- Jump to 000H
  1068.        JUMP 0                   <-- Jump to 000H
  1069.   Notes:
  1070.        JUM╨ perform≤ ß subroutinσ "call"¼ s∩ thσ calleΣ routinσ ma∙ ì
  1071.   return to the ZCPR by either a RET or a Warm Boot.
  1072.  
  1073.  
  1074.   Command: GO
  1075.   Function:  To "call" the subroutine starting at 100H
  1076.   Forms:
  1077.        GO <Cmd Parms>           <-- Execute reentrant at 100H
  1078.   Customization Variables:
  1079.        RAS
  1080.   Examples:
  1081.        GO *.ASM                 <-- Assuming XDIR is loaded,
  1082.                                      gives directory of *.ASM
  1083.   Notes:
  1084.        Thi≤á commanΣ i≤ identica∞ iε functioε t∩ JUM╨á 100H╗á JUMP¼ ì
  1085.   however¼ leave≤ thσ addres≤ a≤ thσ firs⌠ entr∙ iε CP/═ BAS┼ ½ 80╚ ì
  1086.   (the input line buffer), while GO has no such address.
  1087.  
  1088.  
  1089.   Command: GET
  1090.   Function:  To load a file from disk into memory starting at the
  1091.              specified page
  1092.   Forms:
  1093.        GET <Address> <ufn>      <-- <Address> in HEX
  1094.   Customization Variables:
  1095.        NUMBASE   RAS
  1096.   Examples:
  1097.        GET 8000 TEST.80         <-- Load TEST.80 starting at 8000H
  1098.        GE╘ 10░ TEST.8░ o≥ GE╘ 100╚ TEST.8░ <-- LoaΣ TEST.8░      
  1099.                                      starting at 100H
  1100.        GE╘ ░ TEST.8░            <-- LoaΣ TEST.8░ startinτ a⌠ 000H
  1101.   Notes:
  1102.        GE╘á searche≤ fo≥ thσ specifieΣ filσ accordinτ t∩á thσá samσ ì
  1103.   commanΣá hierarch∙á searcΦ employeΣ b∙ thσ ZCPR commanΣá scanner«  ì
  1104.   Hence¼á iµ thσ use≥ i≤ oε B:/1░ anΣ thσ filσ i≤ oε A:/░ witΦá thσ ì
  1105.   curren⌠á defaul⌠ use≥ numbe≥ a⌠ 0¼á GE╘ wil∞ searcΦ froφ B:/1░ t∩ ì
  1106.   B:/0 to A:/0 in looking for the file.
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.                                                 Page 17
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.              ZCPR - A Z80 Replacement for the CP/M CCP
  1120.  
  1121.  
  1122.  
  1123.                          ZCPR Error Messages
  1124.  
  1125.        Thσá followinτá arσ thσ erro≥ message≤ issueΣá b∙á ZCPRá anΣ ì
  1126.   their meanings.
  1127.  
  1128.   Message   Meaning
  1129.  
  1130.   ?         Printed after a command or an argument means that such
  1131.               was invalid
  1132.  
  1133.   No File   From DIR, this means that DIR did not locate any files
  1134.             Also from ERA with the same meaning
  1135.  
  1136.   All?      Issued in response ERA *.*, asks the user is he really
  1137.               wants to erase all the files.  Unlike under the
  1138.               original CP/M 2.2 CCP, single character input is
  1139.               required (Y or y for yes and anything else for no)
  1140.               with NO <CR> to end the line
  1141.  
  1142.   Full      From SAVE, means that there is not enough space on
  1143.               disk
  1144.             From GET or command load by CPR, means that there
  1145.               is not enough space in memory
  1146.  
  1147.   Delete File?
  1148.             Froφ RE╬ o≥ SAVE¼ mean≤ tha⌠ thσ filσ specifieΣ alread∙ ì
  1149.               exist≤ oε disδ anΣ thσ use≥ ma∙ typσ ┘ o≥ ∙ t∩ deletσ ì
  1150.               it and proceed with the REN or SAVE function
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.                                                 Page 18
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.              ZCPR - A Z80 Replacement for the CP/M CCP
  1186.  
  1187.  
  1188.  
  1189.  
  1190.                                Part C
  1191.                ZCPR Command Levels and How to Use Them
  1192.  
  1193.  
  1194.        ZCPRá Versioε 1.░ anΣ beyonΣ support≤ threσ distinc⌠ commanΣ 
  1195.   level≤ iε it≤ implementation«  EacΦ leve∞ constitute≤ ß differen⌠ ì
  1196.   way to issue a command for ZCPR to process.
  1197.  
  1198.        CommanΣ Level≤ ▒ anΣ ▓ arσ commoε t∩ al∞ implementation≤á oµ ì
  1199.   CP/═á anΣ CP/Z═ froφ CP/═ Versioε 1.4«á  CommanΣ Leve∞ ▒ i≤á tha⌠ ì
  1200.   commanΣ leve∞ iε whicΦ thσ commanΣ i≤ issueΣ b∙ thσ use≥ froφ hi≤ ì
  1201.   consolσá terminal«á  Thσá promp⌠á 'd>º o≥ 'du>ºá appear≤á oεá thσ ì
  1202.   terminal¼á anΣá thσá use≥á i≤ alloweΣ t∩ ente≥ thσá commanΣá witΦ ì
  1203.   editinτ froφ thσ terminal«  CommanΣ Leve∞ ▓ i≤ tha⌠ commanΣ leve∞ ì
  1204.   in which the command is entered from an executing $$$.SUB file.
  1205.  
  1206.        Iεá botΦ cases¼á thσ commanΣ i≤ storeΣ iε thσ interna∞á ZCPR ì
  1207.   buffe≥ calleΣ CIBUF╞ (CommanΣ Inpu⌠ BUFFer)«á  Unde≥ botΦ CommanΣ ì
  1208.   Level≤á ▒á anΣ 2¼á thσ commanΣ i≤ placeΣ int∩á thi≤á buffer¼á thσ ì
  1209.   character≤ oµ thσ commanΣ linσ arσ capitalized¼ ß characte≥ coun⌠ ì
  1210.   whicΦá indicate≤ thσ numbe≥ oµ character≤ iε thσ commanΣ linσá i≤ ì
  1211.   storeΣ iε CBUF╞ (thσ bytσ beforσ CIBUFF)¼á aε endinτ binar∙ ░á i≤ ì
  1212.   placeΣá afte≥á thσ las⌠ characte≥ iε thσ commanΣá line¼á anΣá thσ ì
  1213.   interna∞á pointe≥ CIBPT╥ (CommanΣ Inpu⌠ Buffe≥ PoinTeR⌐ i≤ se⌠ t∩ ì
  1214.   point to CIBUFF (the first character of the command line).
  1215.  
  1216.        CommanΣá Leve∞ │ i≤ aε extendeΣ concep⌠ t∩ CommanΣ Level≤á ▒ ì
  1217.   anΣá ▓á whicΦ i≤ specificall∙ supporteΣ b∙ ZCP╥ Versioεá 1.░á anΣ ì
  1218.   beyond«  Thi≤ commanΣ leve∞ allow≤ ß transien⌠ prograφ t∩ placσ ß ì
  1219.   commanΣá linσ int∩ CIBUF╞ anΣ thσ characte≥ coun⌠ int∩ CBUF╞á anΣ ì
  1220.   havσ thi≤ commanΣ linσ executeΣ b∙ ZCPR«á  Oncσ contro∞ i≤ trans-ì
  1221.   ferreΣ t∩ ZCP╥ t∩ executσ thσ commanΣ line¼ thσ transien⌠ prograφ ì
  1222.   whicΦá placeΣá thσ commanΣ linσ lose≤ contro∞ anΣ thσ commanΣá i≤ ì
  1223.   executeΣá exactl∙ a≤ thougΦ i⌠ haΣ beeε typeΣ b∙ thσ use≥ a⌠á hi≤ ì
  1224.   consolσ terminal.
  1225.  
  1226.        Iεá orde≥á fo≥á ß transien⌠ prograφ t∩ utilizσá thσá CommanΣ ì
  1227.   Leve∞ │ facility¼ thi≤ prograφ MUS╘ d∩ thσ following:
  1228.  
  1229.             1«  Locatσ thσ ZCPR«  Sincσ thσ ZCP╥ i≤ ALWAY╙ 2╦ byte≤ ì
  1230.   iεá sizσ anΣ locateΣ directl∙ unde≥ thσ BDOS¼á thσ transien⌠á caε ì
  1231.   locatσá thσá ZCP╥á b∙ examininτ thσ BDO╙ entr∙á pagσá addres≤á a⌠ ì
  1232.   locatioεá ╖á anΣá subtractinτ ╕ froφ thi≤ numbe≥ (╕á page≤á ╜á 2╦ ì
  1233.   bytes)«  Thσ resultinτ numbe≥ i≤ thσ basσ pagσ addres≤ oµ ZCPR.
  1234.  
  1235.             2«á  Storσ thσ commanΣ linσ iε CIBUF╞ anΣ thσ characte≥ ì
  1236.   coun⌠á iεá CBUFF«á  Knowinτ thσ basσ pagσ addres≤á oµá ZCPR¼á thσ ì
  1237.   following information is useful in doing this:
  1238.  
  1239.  
  1240.  
  1241.  
  1242.  
  1243.  
  1244.  
  1245.                                                 Page 19
  1246.  
  1247.  
  1248.  
  1249.  
  1250.  
  1251.              ZCPR - A Z80 Replacement for the CP/M CCP
  1252.  
  1253.  
  1254.  
  1255.  
  1256.                  ORG  CPRLOC    ;Base Address of ZCPR
  1257.                  JMP  CPR       ;Enter ZCPR and Execute Default Cmd
  1258.                  JMP  CPR1      ;Enter ZCPR and Don't Execute
  1259.        MBUFF:    DB   BUFLEN    ;Size of CIBUFF in bytes
  1260.        CBUFF:    DS   1         ;Number of Bytes in Command Line
  1261.        CIBUFF:   DS   BUFLEN    ;Buffer for Command Line
  1262.                  DS   1         ;Buffer for Ending 0 (set by ZCPR)
  1263.        CIBPTR:   DS   2         ;Address of CIBUFF (set by ZCPR)
  1264.  
  1265.  
  1266.             3«á  Obtaiεá thσ User/Disδ Flag«á  Locatioε ┤á contain≤ ì
  1267.   thi≤ number¼á bu⌠ thσ use≥ ma∙ selec⌠ ß flaτ oµ hi≤ choice«  Thi≤ ì
  1268.   flaτá i≤á onσá bytσá long¼á anΣ thσ high-orde≥á nybblσá (┤á bits⌐ ì
  1269.   contain≤á thσ use≥ numbe≥ anΣ thσ low-orde≥ nybblσá contain≤á thσ ì
  1270.   disδá numbe≥ t∩ proces≤ thσ commanΣ from«á  Thσ User/Disδ Flaτ i≤ ì
  1271.   to be passed to ZCPR in the C Register.
  1272.  
  1273.             4«  Wheε ready¼ transfe≥ contro∞ t∩ ZCPR t∩ proces≤ thσ ì
  1274.   commanΣ b∙ JMPinτ t∩ thσ basσ addres≤ oµ ZCPR«á  Thσ firs⌠ JM╨ iε ì
  1275.   thσ JM╨ Tablσ giveε abovσ i≤ a⌠ thi≤ address«  A⌠ thi≤ time¼ ZCPR ì
  1276.   wil∞á loτ iε thσ use≥ anΣ disδ iε thσ User/Disδ Flaτ anΣá proces≤ ì
  1277.   the Command Level 3 Command Line.
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288.  
  1289.  
  1290.  
  1291.  
  1292.  
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.  
  1299.  
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.                                                 Page 20
  1312.  
  1313.  
  1314.  
  1315.  
  1316.  
  1317.              ZCPR - A Z80 Replacement for the CP/M CCP
  1318.  
  1319.  
  1320.  
  1321.  
  1322.        Thσá followinτá i≤ ß samplσ prograφá whicΦá illustrate≤á thσ ì
  1323.   steps outlined above:
  1324.  
  1325.   ;
  1326.   ;  Demonstration of Command Level 3 Facility by RLC
  1327.   ;
  1328.   udflag  equ     4       ;Address of User/Disk Flag
  1329.   bdos    equ     5       ;Address of BDOS Entry Point
  1330.  
  1331.           org     100h
  1332.  
  1333.           lxi     d,prmpt ;Print User Prompt
  1334.           mvi     c,9     ;PRINT function
  1335.           call    bdos
  1336.  
  1337.           lhld    bdos+1  ;Get address of BDOS
  1338.           mov     a,h     ;High-Order Address in A
  1339.           sui     8       ;A=High-Order Address of CPR
  1340.           mov     h,a     ;HL=Address of CPR
  1341.           mvi     l,0
  1342.           shld    cpr     ;Save address in buffer
  1343.  
  1344.           lxi     d,6     ;Point to command line buffer
  1345.           dad     d       ;HL points to command line buffer
  1346.           xchg            ;DE points to command line buffer
  1347.           mvi     c,10    ;READLN into this buffer
  1348.           call    bdos
  1349.  
  1350.           lhld    cpr     ;Get Address of CPR
  1351.           lda     udflag  ;Get User/Disk Flag
  1352.           mov     c,a     ; ... in C
  1353.           pchl            ;Run Command Line
  1354.  
  1355.   cpr:    ds      2       ;CPR Address buffer
  1356.   prmpt:  db      'User Command? $'
  1357.  
  1358.  
  1359.  
  1360.  
  1361.  
  1362.  
  1363.        Enjoy using ZCPR!
  1364.                                 -- RLC
  1365.  
  1366.  
  1367.  
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.  
  1374.  
  1375.  
  1376.  
  1377.                                                 Page 21
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.