home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / simtel / sigm / vols000 / vol014 / cpm2.hlp < prev    next >
Encoding:
Text File  |  1985-02-10  |  36.4 KB  |  803 lines

  1. General Information on CP/M
  2. CP/M File References
  3. CP/M Line Editing and Output Control
  4. CP/M Built-In Commands
  5. CP/M Transient Commands
  6. Physical Device Assignments for ARIES-1
  7. CP/M STAT Command
  8. CP/M PIP Command
  9. CP/M ED Command
  10. CP/M ASM Command
  11. CP/M LOAD Command
  12. The UNLOAD Command
  13. CP/M DDT Command
  14. The ZDT Command
  15. CP/M SYSGEN Command
  16. CP/M SUBMIT and XSUB Commands
  17. CP/M BDOS -- Basic I/O Operations
  18. CP/M BDOS -- Basic Disk Operations
  19. CP/M File Types
  20. CP/M BIOS Jump Vector
  21. :General Information on CP/M
  22.      CP/═áá i≤á ßá monito≥á contro∞á prograφá fo≥á microcompute≥áá softwarσ ì
  23. developmen⌠á whicΦá use≤ IBM-compatiblσ flexiblσ disk≤ (flopp∙á disks⌐á fo≥ ì
  24. mas≤á storage«á  Usinτ ß microcompute≥ mainframσ baseΣ oε Intel'≤á 808░á o≥ ì
  25. Zilog'≤ Z8░ microprocessor¼ CP/═ provide≤ ß genera∞ environmen⌠ fo≥ prograφ ì
  26. construction¼á storage¼á anΣ editing¼ alonτ witΦ assembl∙ anΣ prograφ debuτ ì
  27. facilities«á  Aε importan⌠ featurσ oµ CP/═ i≤ tha⌠ i⌠ caε bσ easil∙ altereΣ ì
  28. t∩á executσá witΦá an∙ compute≥ configuratioε whicΦ use≤ aε Inte∞á 808░á o≥ ì
  29. Ziloτ Z8░ Microprocesso≥ anΣ ha≤ a⌠ leas⌠ 20╦ byte≤ oµ maiε memor∙ witΦá u≡ ì
  30. t∩ eight IBM-compatablσ diskettσ drives.
  31.      Thσá CP/═ monito≥ provide≤ acces≤ t∩ program≤ througΦ ßá comprehensivσ ì
  32. filσá managemen⌠á system«áá  Thσá filσá subsysteφá support≤á ßá nameΣá filσ ì
  33. structure¼á allowinτ dynamiπ allocatioε oµ filσ spacσ a≤ wel∞ a≤ sequentia∞ ì
  34. anΣá randoφá filσá access«á  Usinτ thi≤ filσ system¼á u≡á t∩á 12╕á distinc⌠ ì
  35. program≤ caε bσ storeΣ iε botΦ sourcσ anΣ machine-executablσ form.
  36.      Digita∞á Research¼á thσ designe≥ oµ CP/M¼á ha≤ provideΣ ß se⌠ oµá ninσ ì
  37. manual≤ whicΦ describσ thσ usσ anΣ operatioε oµ CP/═ iε detail.
  38.  
  39.      These manuals are:
  40.           1«  Aε Introductioε t∩ CP/═ Feature≤ anΣ Facilitiesì
  41.           2.  ED:  A Context Editor for the CP/M Disk System
  42.           3.  ASM:  CP/M Assembler User's Manual
  43.           4«  DDT║  CP/═ Dynamiπ Debugginτ Too∞ User'≤ Manual
  44.           5.  CP/M 1.4 Interface Guide
  45.           6.  CP/M 1.4 System Alteration Guide
  46.           7.  CP/M 2.0 User's Guide
  47.           8.  CP/M 2.0 Interface Guide
  48.           9.  CP/M 2.0 System Alteration Guide
  49.      A≤ thσ reade≥ caε see¼á CP/═ support≤ ß contex⌠ editor¼á aεá assemble≥ ì
  50. (Intel-compatable)¼á anΣá ßá debugge≥ system«á  Thesσ arσ availablσ iεá thσ ì
  51. basiπ CP/═ package«á  Therσ i≤ ß largσ variet∙ oµ othe≥ softwarσá availablσ ì
  52. whicΦá caεá ruε unde≥ CP/═ witΦ littlσ o≥ n∩ modification«á  SucΦá softwarσ ì
  53. include≤á severa∞á assembler≤ (botΦ 808░ anΣá Z80)¼á ßá symboliπá debugger¼ ì
  54. severa∞á high-leve∞á language≤ (includinτ FORTRA╬á I╓á {compiler}¼á BASIC-┼ ì
  55. {translator}¼á CBASI├ {translator}¼ man∙ interpretivσ BASICs¼ ALGOL¼ FOCAL¼ ì
  56. anΣá C)¼á anΣá severa∞ special-purposσ application≤ program≤ (sucΦ a≤á tex⌠ ì
  57. formattinτ system≤ anΣ accountinτ systems).
  58.      Thi≤ HEL╨ Filσ addresse≤ itselµ specificall∙ t∩ thσ CP/═ 2.° Operatinτ ì
  59. Systems.
  60. :CP/M File References
  61.  
  62.      ┴á filσ referencσ identifie≤ ß particula≥ filσ o≥ grou≡ oµ file≤ oεá ß ì
  63. particula≥á disδá attacheΣ t∩ CP/M«á  Thesσ filσ reference≤ caεá bσá eithe≥ ì
  64. unambiguou≤á (ufn⌐á o≥á ambiguou≤ (afn)«á  Aεá unambiguou≤á filσá referencσ ì
  65. uniquel∙ identifie≤ ß singlσ file¼ whilσ aε ambiguou≤ filσ referencσ ma∙ bσ ì
  66. satisfied by a number of different files.
  67.  
  68.      Aεá unambiguou≤ filσ referencσ i≤ aε exac⌠ namσ oµ thσ specifieΣ file«  ì
  69. I⌠ consist≤ oµ u≡ t∩ eigh⌠ character≤ iε thσ filσ namσ anΣ threσ character≤ ì
  70. in the file type.  An unambiguous file reference is of the form --
  71.  
  72.                pppppppp.sss
  73.  
  74.      Thσá character≤ useΣ iε specifyinτ aε unambiguou≤ filσá referencσá ma∙ ì
  75. not contain any of --
  76.  
  77.                < > . , ; : = ? * [ ]
  78.  
  79.      Aεá ambiguou≤ filσ referencσ i≤ useΣ fo≥ director∙ searcΦ anΣá patterε ì
  80. matching«á  Thσá forφá oµá aεá ambiguou≤ filσ referencσ i≤á simila≥á t∩á aε ì
  81. unambiguou≤ reference¼ excep⌠ thσ symbo∞ '?º ma∙ bσ intersperseΣ throughou⌠ ì
  82. thσ filσ reference«á  Iε variou≤ command≤ throughou⌠ CP/M¼á thσ '?ºá symbo∞ ì
  83. matche≤á an∙á characte≥ oµ ß filσ namσ iε thσ '?º position«á  Fo≥á example¼ ì
  84. X?Y.C?═á wil∞ matcΦ XZY.CO═ anΣ X3Y.CEM«á  Thσ '*º symbo∞ i≤ useΣ t∩á matcΦ ì
  85. al∞ character≤ oµ ß filσ namσ o≥ filσ type«á  Fo≥ example¼ *.CO═ wil∞ matcΦ ì
  86. XZY.COM and HELP.COM, while HELP.* will match HELP.COM and HELP.HLP.
  87. :CP/M Line Editing and Output Control
  88.  
  89.      The following are the line editing functions supported by CP/M --
  90.  
  91.           rubout    Delete and echo the last character typed at the
  92.                     console.
  93.           Ctrl-╚áá  Deletσá  thσá  las⌠á characte≥á typed╗áá Backspacσá onσ ì
  94.                     character; CRT-oriented
  95.           Ctrl-U    Delete the entire line typed at the console.
  96.           Ctrl-╪    Deletσ thσ entirσ linσ typeΣ a⌠ thσ console╗á Backspacσ ì
  97.                     t∩ thσ beginninτ oµ thσ curren⌠ line; CRT-oriented.
  98.           Ctrl-R    Retype current command line:  types a "clean line"
  99.                     following character deletion with rubouts.
  100.           Ctrl-E    Physical end of line:  carriage is returned, but
  101.                     line is not sent until the carriage return key is
  102.                     depressed.
  103.           Ctrl-M    Terminates input (carriage return).
  104.           Ctrl-J    Terminates current input (line feed); CRT-oriented
  105.           Ctrl-C    CP/M system reboot (warm start).
  106.           Ctrl-Z    End input from the console (used in PIP and ED).
  107.  
  108.      Other control functions affect console output --
  109.  
  110.           Ctrl-P    Copy all subsequent console output to the currently-
  111.                     assigned list device (LST:).  Output is sent to both
  112.                     the list device and the console device until the next
  113.                     Ctrl-P is typed.
  114.           Ctrl-S    Stop the console output temporarily.  Program execution
  115.                     and output continue when the next character is typed
  116.                     at the console.  Typing Ctrl-C returns control to CP/M.
  117.  
  118.      Inpu⌠ line≤ caε generall∙ bσ u≡ t∩ 25╡ character≤ iε length«  The∙ arσ ì
  119. not acted upon until the carriage return key is typed.
  120. :CP/M Built-In Commands
  121.           ER┴á afεá -- Thσá ER┴á (erase⌐ commanΣá remove≤á file≤á froφá thσ ì
  122.                currently logged-in disk.
  123.           DI╥á afε -- Thσ DI╥ (directory⌐ commanΣ cause≤ thσ name≤á oµá al∞ ì
  124.                file≤ whicΦ satisf∙ thσ ambiguou≤ filσ namσ afε t∩ bσ listeΣ ì
  125.                oεá thσ consolσ device«á  Al∞ file≤ arσ listeΣ iµ n∩ afεá i≤ ì
  126.                given.
  127.           RE╬á ufn1=ufn▓á -- Thσá RE╬ (rename⌐ commanΣ allow≤ thσá use≥á t∩ ì
  128.                changσ thσ name≤ oµ file≤ oε disk«  Thσ filσ satisfyinτ ufn▓ ì
  129.                is changed to ufn1.
  130.           SAV┼á ε ufε -- Thσ SAV┼ commanΣ place≤ ε page≤ (256-bytσá blocks⌐ ì
  131.                onto disk from the TPA and names this file ufn.
  132.           TYP┼á ufε -- Thσ TYP┼ commanΣ display≤ thσ content≤ oµ thσá ASCI╔ ì
  133.                sourcσá filσá ufεá oε thσ currentl∙ logged-iεá disδá a⌠á thσ ì
  134.                console device.
  135.           USE╥ ε -- Upoε colΣ boot¼á thσ use≥ i≤ automaticall∙ loggeΣ iε t∩ ì
  136.                Use≥ Areß 0¼á whicΦ i≤ compatablσ witΦ CP/═ 1.┤ directories«  ì
  137.                Thσ USE╥ commanΣ allow≤ thσ use≥ t∩ movσ t∩ anothe≥á logica∞ ì
  138.                areßá withiεá thσ samσ directory╗á area≤ arσ numbereΣá 0-15«  ì
  139.                Thσ ERA¼á DIR¼á REN¼á SAVE¼á anΣ TYP┼ command≤ appl∙ t∩á thσ ì
  140.                current User Area.
  141. :CP/M Transient Commands
  142.  
  143.      The CP/M standard transient commands are --
  144.  
  145.           STA╘á     Lis⌠ thσ numbe≥ oµ  byte≤  oµ storagσ  and data oεá thσ ì
  146.                     currentl∙ááá logged-iεáá disk¼ááá providσáá statistica∞ ì
  147.                     informatioεá abou⌠á particula≥ files¼á anΣá displa∙á o≥ ì
  148.                     alter device assignment.
  149.           PI╨       LoaΣ thσ Periphera∞ Interchangσ Prograφ fo≥á subsequen⌠ ì
  150.                     disk file and peripheral transfer operations.
  151.           ED        Load and execute the CP/M text editor program.
  152.           SUBMIT    Submit a file of commands for batch processing.
  153.           XSU┬      UseΣ iε conjunctioε witΦ SUBMIT¼ transfer≤ al∞ buffereΣ ì
  154.                     console input from CON: to the SUBMIT File.
  155.  
  156.           AS═á      LoaΣá thσá CP/═ assemble≥ anΣ  assemblσá thσá specifieΣ ì
  157.                     program from disk.
  158.           LOA─á     LoaΣ  thσ filσ iε Inte∞ "hexó machinσ codσá forma⌠á anΣ ì
  159.                     producσá ß filσ iε machinσ executablσ forφ whicΦ caε bσ ì
  160.                     loadeΣ int∩ thσ TP┴ (thi≤ loadeΣ prograφ become≤ ßá ne≈ ì
  161.                     command under the CCP).è
  162.           DDT       Load the CP/M debugger into the TPA and execute it.
  163.           DUMP      Dump the contents of a file in hex.
  164.  
  165.           SYSGEN    Create a new CP/M system diskette.
  166.           MOVCP═á   Regeneratσá thσá CP/═ systeφ  fo≥ ßá particula≥á memor∙ ì
  167.                     size.
  168. :Physical Device Assignments for ARIES-1
  169.  
  170.      Logical Device           Physical Device
  171.  
  172.           CON:                TTY: Model 43 Teletype
  173.                               CRT: Hazeltine 1500 CRT
  174.                               BAT: CRT and Modem
  175.                               UC1: In=CRT, Out=CRT and Modem
  176.           RDR:                TTY: Model 43 Teletype
  177.                               PTR: Modem
  178.                               UR1: CRT and Modem w/CRT Output
  179.                               UR2: CRT and Modem
  180.           PUN:                TTY: Model 43 Teletype
  181.                               PTP: Modem
  182.                               UP1: CRT and Modem
  183.                               UP2: CRT and Modem
  184.           LST:                TTY: Model 43 Teletype
  185.                               CRT: Hazeltine 1500 CRT
  186.                               LPT: Modem
  187.                               UL1: CRT and Modem
  188.  
  189. :CP/M STAT Command
  190.  
  191.      The STAT Command takes any of the following forms --
  192.  
  193. STA╘      Calculatσ thσ storagσ remaininτ oε al∞ activσ drive≤ anΣ prin⌠á ß ì
  194.           message like
  195.                x: R/W, SPACE: nnnK  -- if disk is Read/Write
  196.                x: R/O, SPACE: nnnK  -- if disk is Read Only
  197. STAT x:   Calculate the storage remaining on the specified drive and print
  198.                BYTES REMAINING ON x: nnnK
  199.  
  200. STAT x:afn [$S]
  201.           Scaε thσ specifieΣ file≤ oε thσ specifieΣ drivσ (x║ i≤ optional)¼ ì
  202.           anΣá lis⌠á al∞ file≤ whicΦ satisf∙ thσ unambiguou≤á referencσá iε ì
  203.           alphabetica∞á orde≥ witΦ storagσ requirements«á  ┴ tablσ likσ thσ ì
  204.           following is generated --
  205.  
  206.                Size Recs Bytes Ext Acc
  207.               sssss rrrr  nnnk  ee a/b d:pppppppp.sss
  208.  
  209.           where
  210.                sssss -- number of virtual 128-byte records in file
  211.                     This field is display if the optional $S is given
  212.                rrrr -- number of 128-byte records in each extent of the file
  213.                nnnK -- number of bytes (in K, K=1024) allocated to the file
  214.                ee -- number of 16K extensions
  215.                a/b -- access mode of file; R/O or R/W
  216.                d:pppppppp.sss -- drive name (d may be A, B, C, D) and file
  217.                          name
  218.  
  219. STAT x:=R/O
  220.           Se⌠ thσ specifieΣ drivσ t∩ ReaΣ Only«á  Thi≤ i≤ cleareΣ b∙ ß warφ ì
  221.           boot.  When a disk is Read Only, the message
  222.                BDOS ERR ON x: READ ONLY
  223.           will appear if there is an attempt to write to it.
  224. STAT VAL:
  225.           Summarize the status commands.  STAT VAL: will print the list --
  226.  
  227.                Temp R/O Disk:  d:=R/O
  228.                Set Indicator:  d:filename.typ $R/O $R/W $SYS $DIR
  229.                Disk Status  :  DSK: d:DSK:
  230.                User Status  :  USR:
  231.                Iobyte Assign:
  232.                CON: = TTY:  CRT:  BAT:  UC1:
  233.                RDR: = TTY:  PTR:  UR1:  UR2:
  234.                PUN: = TTY:  PTP:  UP1:  UP2:
  235.                LST: = TTY:  CRT:  LPT:  UL1:
  236.  
  237. STAT DEV:
  238.           Displa∙á thσá curren⌠ logica∞ t∩ physica∞á devicσá mapping«á  Fo≥ ì
  239.           example, the list may appear as --
  240.  
  241.                CON: = CRT:         PUN: = PTP:
  242.                RDR: = UR1:         LST: = TTY:
  243.  
  244. STAT d:afn [$R/O or $R/W or $SYS or $DIR]
  245.           Se⌠á thσá variou≤á permanen⌠á filσá indicators«áá  R/O=Read/Only¼ ì
  246.           R/W=Read/Write, SYS=System, DIR=Non-System
  247.  
  248. STAT ld1=pd1, ld2=pd2, ...
  249.           Changσá thσá logica∞á t∩ physica∞á devicσá assignments«á  Logica∞ ì
  250.           devicσ ld▒ i≤ assigneΣ t∩ physica∞ devicσ pd1¼á etc«á  Thσá valiΣ ì
  251.           logical device names are --
  252.  
  253.                CON:      The system console device
  254.                RDR:      The paper tape reader device
  255.                PUN:      The paper tape punch device
  256.                LST:      The output list device
  257.  
  258.           The valid physical device names are --
  259.  
  260.                TTY:      Slow speed output device (teletype)
  261.                CRT:      High speed output device (cathode ray tube)
  262.                BAT║      BatcΦ processinτ (CON║ inpu⌠ i≤ RDR:¼á CON║ outpu⌠ ì
  263.                          is LST:)
  264.                UC1:      User-defined console
  265.                PTR:      Paper tape reader
  266.                PTP:      Paper tape punch
  267.                UR1:      User-defined reader #1
  268.                UR2:      User-defined reader #2
  269.                UP1:      User-defined punch #1
  270.                UP2:      User-defined punch #2
  271.                LPT:      Line printer
  272.                UL1:      User-defined list device #1
  273.  
  274.  
  275. STAT d:DSK:
  276.           Lis⌠á thσ characteristic≤ oµ thσ disδ nameΣ "d:"╗á iµ "d:ó i≤ no⌠ ì
  277. specified, list the characteristics of all active disks.  A sample listing:
  278.  
  279.                d: Drive Characteristics
  280.            65536: 128 Byte Record Capacity
  281.             8192: Kilobyte Drive Capacity
  282.              128: 32  Byte Directory Entries
  283.                0: Checked  Directory Entries
  284.             1024: Records/ Extent
  285.              128: Records/ Block
  286.               58: Sectors/ Track
  287.                2: Reserved Tracks
  288.  
  289. STAT USR:
  290.           Lis⌠á thσá Use≥á Numbe≥ thσ use≥ i≤ currentl∙á iεá anΣá thσá Use≥ ì
  291. Number≤á whicΦá havσá file≤á oε thσ currentl∙á addresseΣá disk«á  ┴á samplσ ì
  292. listing:
  293.                Active User : 0
  294.                Active Files: 0 1 3
  295. :CP/M PIP Command
  296.  
  297.      PI╨á (Periphera∞á Interchangσá Program⌐ i≤ thσá CP/═á transien⌠á whicΦ ì
  298. implement≤ thσ basiπ mediß conversioε operation≤ necessar∙ t∩ load¼á print¼ ì
  299. punch¼á copy¼á anΣá combinσá disδ files«á  PI╨ i≤ initiateΣ b∙ onσá oµá thσ ì
  300. following forms --
  301.  
  302.           PI╨á           Engagσ  PIP¼á promp⌠ thσ use≥ witΦ '*'¼á anΣá reaΣ ì
  303.                          commanΣ line≤ directl∙ froφ thσ console«  PI╨ useΣ ì
  304.                          iεá thi≤á wa∙ i≤ exiteΣ b∙ eithe≥ typinτ aεá empt∙ ì
  305.                          commanΣ linσ (jus⌠ ß carriagσ return⌐ o≥ ßá Ctrl-├ ì
  306.                          as the first character of the line.
  307.           PI╨á cmnΣ      Engagσ PIP¼á executσ  thσ specifieΣá command¼á anΣ ì
  308.                          return to CP/M.
  309.  
  310.      The form of each command line in PIP is --
  311.  
  312.           destination = source#1, source#2, source#3, ..., source#n
  313.  
  314.  
  315.      The general forms of PIP command lines are --
  316.  
  317.           x:=y:afεá      Cop∙á al∞á file≤  satisfyinτ afε froφ drivσá ∙á t∩ ì
  318.                          drivσ x«á  'yº ma∙ bσ omitted¼á and¼á iµá so¼á thσ ì
  319.                          currently logged-in drive is selected.
  320.           x:ufn=y║á      Cop∙  thσ filσ giveε b∙ ufε froφ ∙ t∩ x«á  'xº ma∙ ì
  321.                          bσ omitted¼á and¼á iµ so¼á thσ currentl∙ logged-iε ì
  322.                          drive is selected.
  323.           x:afn=y:afε    Likσ thσ above¼ bu⌠ ° and/o≥ ∙ ma∙ bσ omitted╗ thσ ì
  324.                          defaul⌠áá drivσá i≤á selecteΣá fo≥áá thσáá omitteΣ ì
  325.                          drive(s).
  326.           ld=pΣá         Cop∙á froφ  thσ specifieΣ physica∞ devicσá t∩á thσ ì
  327.                          specifieΣá logica∞ device«á  ValiΣ logica∞ device≤ ì
  328.                          are --
  329.                               CON:, RDR:, PUN:, LST:
  330.                          Valid physical devices are --
  331.                               TTY:, CRT:, UC1:, PTR:, PTP:, UR1:, UR2:,
  332.                               UP1:, UP2:, LPT:, UL1:
  333.  
  334.  
  335.      Additional device names which may be used in PIP commands are --
  336.  
  337.           NUL:      Send 40 Nulls (ASCII 0) to the device.
  338.           EOF:      Send a CP/M End of File character (ASCII Ctrl-Z).
  339.           INP:      Special PIP input source to be patched (see manual).
  340.           OUT║á     Specia∞á PI╨á outpu⌠  destinatioε t∩á bσá patcheΣá (seσ ì
  341.                     manual).
  342.           PRN║á     Samσ a≤ LST:¼á bu⌠  tab≤ arσ expandeΣ a⌠á ever∙á eightΦ ì
  343.                     characte≥ position¼ line≤ arσ numbered¼ anΣ pagσ eject≤ ì
  344.                     are inserted every 60 lines with an initial eject.
  345.  
  346.  
  347.      Thσá use≥á caεá als∩ specif∙ onσ o≥ morσ PI╨á parameter≤á encloseΣá iε ì
  348. square brackets separated by zero or more blanks.  These parameters are --
  349.  
  350.      ┬á   Blocδ modσ  transfer«á  Datß i≤ buffereΣ b∙ PI╨ unti∞ aε ASCI╔ X-ì
  351.           Off character (Ctrl-S) is received from the source device.
  352.      Dεá  Deletσ character≤  whicΦ extenΣ pas⌠ columε ε iε thσ transfe≥á oµ ì
  353.           data to the destination from the character source.
  354.      E    Echo all transfer operations to the console.
  355.      F    Filter (remove) form feeds from the file.
  356.      Gn   Get File from User Number n (n in the range 0 - 15)
  357.      ╚    He° datß transfer«  Al∞ datß i≤ checkeΣ fo≥ prope≥ Inte∞ he° filσ ì
  358.           format.
  359.      I    Ignore ':00' records in the transfer of Intel hex format file.
  360.      L    Translate upper case to lower case alphabetics.
  361.      N    Add line numbers to each line transferred to the destination.
  362.      O    Object file (non-ASCII) transfer.  Ignore End of File.
  363.  
  364.      Pn   Include page ejects at every n lines.
  365.      Qs^┌áQui⌠á copyinτ  froφ thσ sourcσ devicσ o≥ filσ wheε thσá strinτá ≤ ì
  366.           (terminated by Ctrl-Z) is encountered.
  367.      R    Read system files
  368.      Ss^Z Start copying from the source file when the string s is seen.
  369.      Tn   Expand tabs to every nth column.
  370.      U    Translate lower case to upper case alphabetics.
  371.      V    Verify that data has been copied correctly.
  372.      W    Write over R/O files without console interrogation
  373.      Z    Zero the parity bit on input for each ASCII character.
  374. :CP/M ED Command
  375.  
  376.      Thσá E─á Prograφá i≤ thσ CP/═á systeφá contex⌠á editor¼á whicΦá allow≤ ì
  377. creatioε anΣ alteratioε oµ ASCI╔ files«á  Completσ detail≤ arσ giveε iε thσ ì
  378. user's manual.
  379.  
  380.      The following are the error indicators given by ED --
  381.  
  382.           ?    Unrecognized Command
  383.           >    Memory buffer full
  384.           #    Cannot apply command the number of times specified
  385.           O    Cannot open LIB file in R command
  386.  
  387.  
  388.      The following are the control characters recognized by ED --
  389.  
  390.           ^C        System reboot
  391.           ^E        Physical <CR> <LF> (not entered in command)
  392.           ^H        Character delete (backspace)
  393.           ^I        Logical tab
  394.           ^J        New line (line feed)
  395.           ^L        Logical <CR> <LF> in search and substitute strings
  396.           ^M        New line (carriage return)
  397.           ^U        Line delete
  398.           ^X        Line delete and backspace
  399.           ^Z        String terminator
  400.           Rubout    Character delete
  401.           Break     Discontinue command
  402.  
  403.  
  404.      The following are the commands recognized by ED --
  405.  
  406.           nA        Append lines
  407.           +/- B     Beginning/Bottom of buffer
  408.           +/- nC    Move character positions
  409.           +/- nD    Delete characters
  410.           E         Exit
  411.           nFs^Z     Find string
  412.           H         End edit, close and reopen files
  413.           Is^Z      Insert characters
  414.           nJ        Place strings in juxtaposition
  415.           +/- nK    Kill (delete) lines
  416.           +/- nL    Move down/up lines
  417.           nM        Macro definition
  418.           O         Return to original file
  419.           +/- nP    Move and print pages
  420.           Q         Quit with no file changes
  421.           R         Read library file
  422.  
  423.           nSs1^Zs2^Z
  424.                     Substitute s2 for s1
  425.           +/- nT    Type lines
  426.           +/- U     Translate lower to upper case if U; none if -U
  427.           +/- V     Engage/disengage line numbers (verify)
  428.           0V        Print memory buffer info (free/total usage)
  429.           nW        Write lines
  430.           nX        Transfer n lines to X$$$$$$$.LIB
  431.           0X        Empty X$$$$$$$.LIB
  432.           nZ        Sleep
  433.           +/- n     Move and type (+/- nLT)
  434.           n:        Move to absolute line (V engaged)
  435.           :n        Process from current line to specified line (V engaged)
  436. :CP/M ASM Command
  437.  
  438.      Thσ AS═ CommanΣ load≤ anΣ execute≤ thσ CP/═ 808░ assembler«á  I⌠ i≤ oµ ì
  439. the form --
  440.  
  441.           ASM filename.xyz
  442.  
  443. where
  444.  
  445.           filename  ... is the name of the file 'filename.ASM' to assemble
  446.           x         ... designates the disk name which contains the source
  447.           y         ... designates the disk name to contain the hex file
  448.                          (y=Z suppresses generation of the hex file)
  449.           z         ... designates the disk name to contain the print file
  450.                          (y=X lists on CON:, y=Z suppresses listing)
  451.  
  452.      Refer to the ASM Manual for further details.
  453. :CP/M LOAD Command
  454.  
  455.      Thσ LOA─ CommanΣ read≤ thσ filσ specified¼ whicΦ i≤ assumeΣ t∩ contaiε ì
  456. Inte∞ he° forma⌠ machinσ codσ anΣ produce≤ ß memor∙ imagσ filσ whicΦ caε bσ ì
  457. subsequently executed (converts .HEX to .COM files).  It is of the form --
  458.  
  459.           LOAD filename
  460.  
  461. where filename is the name of the file 'filename.HEX'.
  462. :The UNLOAD Command
  463.  
  464.      Thσ UNLOA─ CommanΣ doe≤ thσ reversσ oµ thσ LOA─ CommanΣ -- i⌠ convert≤ ì
  465. COM files to HEX files.  It is of the form --
  466.  
  467.           UNLOAD filename
  468.  
  469. where filename is the name of the file 'filename.COM'.
  470. :CP/M DDT Command
  471.  
  472.      Thσá DD╘á Prograφ allow≤ dynamiπ interactivσ testinτ anΣ debugginτá oµ ì
  473. programs generated in the CP/M environment.  It is invoked by --
  474.  
  475.           DDT
  476.           DDT filename.HEXè          DDT filename.COM
  477.  
  478. where 'filename' is the name of the program to be loaded or tested.
  479.  
  480.      DDT responds to the normal CP/M input line editing characters.
  481.  
  482.  
  483.    DDT responds to the following commands --
  484.  
  485.      As   Perform inline assembly starting at the specified address s.
  486.      D    Display memory from the current address for 16 display lines.
  487.      Ds   Display memory from address s for 16 display lines.
  488.      Ds,f Display memory from address s to address f.
  489.      Fs,f,c
  490.           Fill memory from start address s to final address f with byte c.
  491.  
  492.      G    Start execution at the current value of the PC.
  493.      Gs   Start execution at the specified address s.
  494.      Gs,ΓáStar⌠ executioε  a⌠ thσ specifieΣ addres≤ ≤ anΣ se⌠ ßá breakpoin⌠ ì
  495.           at the address b.
  496.      Gs,b,c
  497.           Same as above with breakpoints at b and c.
  498.      G,b  Start execution at the current value of the PC with breakpoint b.
  499.      G,b,c
  500.           Same as above with breakpoints at b and c.
  501.  
  502.  
  503.      If   Insert a file name f into the default FCB.
  504.  
  505.      L    List 12 lines of disassembled code from the current address.
  506.      Ls   List 12 lines from the specified address s.
  507.      Ls,f List lines of disassembled code from s to f.
  508.  
  509.      Ms,f,d
  510.           Move the block from address s to f to destination at address d.
  511.  
  512.      R    Read file in FCB into memory at 100H.
  513.      Rb   Read file in FCB into memory with offset b from 100H.
  514.  
  515.      Ss   Set (examine and alter) memory starting at address s.
  516.  
  517.  
  518.      T    Trace the next instruction.
  519.      Tn   Trace the next n instructions.
  520.  
  521.      U    Untrace -- like Trace, but intermediate steps are not displayed.
  522.  
  523.      X    Examine all registers and flags.
  524.      Xr   Examine specified registers or flag, where r may be --
  525.                C    Carry flag
  526.                Z    Zero flag
  527.                M    Minus (sign) flag
  528.                I    Interdigit Carry flag
  529.                A    Accumulator
  530.                B    BC Reg pair
  531.                D    DE Reg pair
  532.                H    HL Reg pair
  533.                S    Stack pointer
  534.                P    PC
  535. :The ZDT Command
  536.  
  537.      ZDT is a Z80 version of DDT.  It is invoked by typing --
  538.  
  539.           ZDT
  540.  
  541.      Thσá command≤á recognizeΣ b∙ ZD╘ arσ inpu⌠ iεá single-characte≥á inpu⌠ ì
  542. mode«á  N∩á inpu⌠ linσ editinτ i≤ done¼á anΣ eacΦ commanΣ expect≤ aεá exac⌠ ì
  543. input«á  Al∞ bytσ value≤ arσ exactl∙ tw∩ characters¼á anΣ al∞ addresse≤ arσ ì
  544. exactly four characters.
  545.  
  546.  
  547.      The commands recognized by ZDT are --
  548.  
  549.           A bbbb
  550.                Ente≥ ASCI╔ character≤ int∩ memor∙ froφ keyboarΣ startinτ a⌠ ì
  551.                address bbbb.
  552.           B
  553.                Warm Boot -- Return to CP/M.
  554.           C bbbb eeee nnnn
  555.                Comparσá memor∙ froφ addres≤ bbbΓ t∩ addres≤ eeeσá t∩á blocδ ì
  556.                starting at nnnn.
  557.           D bbbb eeee
  558.                Dump memory from bbbb to eeee.
  559.           E bbbb eeee <ASCII string>
  560.                SearcΦá fo≥á ASCI╔ strinτ froφ bbbΓ t∩ eeee«á  Strinτ i≤á a⌠ ì
  561.                most 16 characters.  String is terminated by <CR>.
  562.           F bbbb eeee <hex string>
  563.                SearcΦá fo≥á he°á strinτá froφá bbbΓá t∩á eeee«á  Strinτá i≤ ì
  564.                terminated by <CR>.
  565.  
  566.           G
  567.                Go to next breakpoint.
  568.           H aaaa nnnn
  569.                Hex add and subtract.  Computes aaaa+nnnn and aaaa-nnnn.
  570.           I nn
  571.                Input.  Prints value at port nn.
  572.           J nnnn
  573.                Jump to and execute at location nnnn.
  574.           K
  575.                Keyboard echo.
  576.           L filename.typ nnnn
  577.                Loads specified disk file into location nnnn.
  578.           M bbbb eeee nnnn
  579.                Move block from bbbb to eeee-1 to nnnn.
  580.           N aaaa
  581.                Enter offset aaaa for loading.
  582.           O nn dd
  583.                Output byte dd to port nn.
  584.  
  585.           P bbbb
  586.                Inpu⌠ he° int∩ memor∙ froφ keyboarΣ startinτ a⌠ bbbb«á  <sp╛ ì
  587.                advances pointer, <rub> or <del> backs pointer.
  588.           Q bbbb eeee
  589.                Dumps from bbbb to eeee in ASCII.
  590.           R n ll tt ss bbbb
  591.                ReaΣ blocδ oµ datß froφ disδ ε oµ lengtΦ l∞ (256-bytσ pages⌐ ì
  592.                starting at track tt and sector ss placing the data at bbbb.
  593.           S bbbb eeee
  594.                Disassembly (symbolic dump) from bbbb to eeee.
  595.           T bbbb eeee
  596.                Destructive memory test from bbbb to eeee-1.
  597.           U bbbb
  598.                Set breakpoint at bbbb.
  599.           V
  600.                Display all currently-set breakpoints.
  601.  
  602.           W n ll tt ss bbbb
  603.                Writσ oε disδ ε thσ datß a⌠ bbbΓ fo≥ ß lengtΦ oµ l∞ startinτ ì
  604.                at track tt, sector ss.  ll is in 256-byte pages.
  605.           X
  606.                Display registers.
  607.           Z bbbb eeee dd
  608.                Zero or set memory from bbbb to eeee-1 with byte dd.
  609. :CP/M SYSGEN Command
  610.  
  611.      Thσá SYSGE╬ transien⌠ commanΣ allow≤ generatioε oµ aε initializeΣ disδ ì
  612. containing the CP/M Operating System.
  613.  
  614.      It is invoked by typing
  615.  
  616.           SYSGEN
  617.  
  618.      Oncσ invoked¼á thσ use≥ i≤ prompteΣ througΦ thσ session«  Refe≥ t∩ thσ ì
  619. CP/M Manual for further details.
  620. :CP/M SUBMIT and XSUB Commands
  621.  
  622.      Thσá SUBMI╘á commanΣ allow≤ CP/═ command≤ t∩ bσ batcheΣá togethe≥á fo≥ ì
  623. automatic processing.  The form of this command is
  624.  
  625.           SUBMIT ufn parm1 parm2 ... parmn
  626.  
  627.      Thσ ufε giveε iε thσ SUBMI╘ commanΣ mus⌠ bσ thσ filenamσ (no⌠ type⌐ oµ ì
  628. ßá filσ whicΦ exist≤ oε thσ currentl∙ logged-iε disδ witΦ aεá assumeΣá filσ ì
  629. type of '.SUB'.  Refer to the CP/M Manual for further details.
  630.      Thσá XSU┬á commanΣ extend≤ thσ powe≥ oµá thσá SUBMI╘á facility«á  Wheε ì
  631. specifieΣá a≤ thσ firs⌠ linσ oµ ß SUBMI╘ File¼á i⌠ self-relocate≤á directl∙ ì
  632. belo≈ thσ CCP«á  Al∞ subsequen⌠ SUBMI╘ commanΣ line≤ arσ processeΣ b∙ XSUB¼ ì
  633. s∩á tha⌠á program≤á whicΦ reaΣ buffereΣ consolσ inpu⌠á (BDO╙á Functioεá 10⌐ ì
  634. receivσ inpu⌠ directl∙ froφ thσ SUBMI╘ File«á  Whilσ XSU┬ i≤ iε memory¼á i⌠ ì
  635. print≤á thσ messagσ "(xsuΓ active)ó oε eacΦ warφ boot«á  Aε examplσ oµá thσ ì
  636. use of XSUB to display memory from 100H to 1FFH is --
  637.                     XSUB
  638.                     DDT
  639.                     D100,1FF
  640.                     G0
  641. :CP/M BDOS -- Basic I/O Operations
  642.      Function and Number      Input Parameters    Output Parameters
  643.  
  644.      System Reset      0      None                None
  645.      Read Console      1      None                ASCII Char in A
  646.      Write Console     2      ASCII Char in E     None
  647.      Read Reader       3      None                ASCII Char in A
  648.      Write Punch       4      ASCII Char in E     None
  649.      Write List        5      ASCII Char in E     None
  650.      Direct Con I/O    6      ASCII Char in E     I/O Status in A if E=0FFH
  651.      Get I/O Status    7      None                I/O Status in A
  652.      Put I/O Status    8      I/O Status in E     None
  653.      Print Buffer      9      Address of string   None
  654.                                terminated by $
  655.                                in DEè     Read Buffer      10      Address of Read     Read Buffer is filled
  656.                                Buffer in DE
  657.      Console Ready    11      None                LSB of A is 1 if char
  658.                                                    ready
  659. *All function numbers are passed in Reg C.
  660.  
  661. I/O Status Byte --
  662.  
  663.      Value     Bits 6&7  Bits 4&5  Bits 2&3  Bits 0&1
  664.  
  665.        00      CON:=TTY: RDR:=TTY: PUN:=TTY: LST:=TTY:
  666.        01           CRT:      PTR:      PTP:      CRT:
  667.        10           BAT:      UR1:      UP1:      LPT:
  668.        11           UC1:      UR2:      UP2:      UL1:
  669.  
  670. Read Buffer --
  671.  
  672.      Byte      Function
  673.  
  674.        1       Maximum Buffer Length
  675.        2       Current Buffer Length (returned value)
  676.      3-n       Data (returned values)
  677.  
  678.  
  679. :CP/M BIOS -- Basic Disk Operations
  680.  
  681.      Function and Number      Input Parameters    Output Parameters
  682.  
  683.      Return Version # 12      None                Version Info in HL
  684.                                                   H=0 CP/M, H=1 MP/M
  685.                                                   L=00 CP/M 1.x, 2x 2.x
  686.      Init BDOS        13      None                None
  687.      Log-In Disk      14      Value in Reg E      None
  688.                                A=0, B=1, C=2,
  689.                                D=3
  690.      Open File        15      Address of FCB      Byte address of FCB
  691.                                in DE               if found or 0FFH if not
  692.      Close File       16      Address of FCB      Byte address of FCB
  693.                                in DE               if found or 0FFH if not
  694.      Search for File  17      Address of FCB      Byte address of FCB (0-3)
  695.                                in DE               if found or 0FFH if not
  696.      Search for Next  18      Address of FCB      Byte address of next FCB
  697.                                in DE               if found or 0FFH if not
  698.      Delete File      19      Address of FCB      Byte address of FCB (0-3)
  699.                                in DE               if found or 0FFH if not
  700.  
  701.      Function and Number      Input Parameters    Output Parameters
  702.  
  703.      Read Next Record 20      Address of FCB      0=successful read
  704.                                in DE              1=read past EOF
  705.                                                   2=reading random data
  706.      Write Next Rec   21      Address of FCB      0=successful write
  707.                                in DE              1=error in extending
  708.                                                   2=end of disk data
  709.                                                   255=no more dir space
  710.      Make File        22      Address of FCB      Byte address of FCB or
  711.                                in DE               255 if no more dir space
  712.      Rename FCB       23      Address of FCB      Byte Address of Dir entry
  713.                                in DE               or 255 if no match
  714.      Return Log Code  24      None                Login vector in HL
  715.      Read Drive No    25      None                Number of logged-in drive
  716.                                                    (A=0, B=1, C=2, D=3)
  717.      Set DMA Address  26      Address of 128      None
  718.                               byte buffer in DE
  719.  
  720.      Function and Number      Input Parameters    Output Parameters
  721.  
  722.      Ge⌠áAlloπ Vec⌠   2╖      Nonσ                Allocatioε  Vec⌠ Add≥á iε ì
  723.                                                    HL
  724.      Write Prot Disk  28      None                None
  725.      Get R/O Vect     29      None                HL=R/O Vect Val
  726.      Set File Attrib  30      Ptr to FCB in DE    Dir code in A
  727.      Get Disk Parms   31      None                HL=DPB Address
  728.      Set/Get Usr Code 32      E=0FFH (get)/Code   A=Current code (get)/no
  729.                                (set)               value (set)
  730.      Read Random      33      DE=FCB addr         A=return code
  731.                                                   1=reading unwritten data
  732.                                                   2=(not used)
  733.                                                   3=can't close curr ext
  734.                                                   4=seek to unwritten ext
  735.                                                   5=(not used)
  736.                                                   6=seek past end of disk
  737.  
  738.      Function and Number      Input Parameters    Output Parameters
  739.  
  740.      Write Random     34      DE=FCB addr         A=return code
  741.                                                   1=reading unwritten data
  742.                                                   2=(not used)
  743.                                                   3=can't close curr ext
  744.                                                   4=seek to unwritten ext
  745.                                                   5=dir overflow
  746.                                                   6=seek past end of disk
  747.      Compute File Siz 35      DE=FCB addr         Random Rec Field set
  748.                                                    to file size
  749.      Set Random Rec   36      DE=FCB addr         Random Rec Field set
  750.  
  751.  
  752. *All function numbers are passed in Reg C
  753.  
  754. :CP/M File Types
  755.      AIN   ALGOL 60 Intermediate   ALG   ALGOL 60 Source File
  756.      ASM   Assembler Source File   BAK   Backup File
  757.      BAS   BASIC Source File       C     C Source File
  758.      COB   COBOL Source File       COM   "Command" File
  759.      FOR   FORTRAN IV Source File  HEX   Intel "hex" code file
  760.      HLP   HELP File               INT   BASIC Intermediate File
  761.      LST   Listing File            MAC   MACRO-80 Source File
  762.      PAS   PASCAL Source File      PRN   Assembler Listing File
  763.      REL   Relocatable Module      SRC   PASCAL/MT Source File
  764.      SUB   SUBMIT File             SYM   Symbol File
  765.      TC    Tiny-C Source File      TFS   TFS Source File
  766.      TXT   Text File               $$$   Temporary File
  767. :CP/M BIOS Jump Vector
  768.  
  769.      Thσá followinτ i≤ ß tablσ representinτ thσ entr∙ point≤ int∩ thσá CP/═ ì
  770. BIOS of the major routines accessable to the user --
  771.  
  772.  
  773.      Routine   Relative Offset     Comment
  774.  
  775.      BOOT           00H            Cold Start
  776.      WBOOT          03H            Warm Start
  777.      CONST          06H            Console Status
  778.                                     Reg A = 00 if no char ready
  779.                                     Reg A = FF if char ready
  780.      CONIN          09H            Console char in (Reg A)
  781.      CONOUT         0CH            Console char out (Reg C)
  782.      LIST           0FH            List out (Reg C)
  783.      PUNCH          12H            Punch out (Reg C)
  784.      READER         15H            Reader in (Reg A)
  785.  
  786.      Routine   Relative Offset     Comment
  787.  
  788.      HOME           18H            Move to track 00
  789.      SELDSK         1BH            Select disk given by Reg C (A=0,B=1,...)
  790.      SETTR╦á        1E╚á           Se⌠á tracδá addres≤á giveεá b∙á Reτá ├ 
  791.                                       (0...76)
  792.      SETSE├á        21╚á           Se⌠á secto≥á addres≤ giveεá b∙á Reτá ├ 
  793.                                       (1...26)
  794.      SETDMA         24H            Set subsequent DMA address (RP B&C)
  795.      READ           27H            Read track/sector (block)
  796.      WRITE          2AH            Write track/sector (block)
  797.      LISTST         2DH            List Device Status
  798.                                     Reg A = 00 if no char ready
  799.                                     Reg A = FF if char ready
  800.      SECTRA╬á       30╚            Translatσ  secto≥ numbe≥ iε Reτ ├á usinτ ì
  801.                                     tablσ pointeΣ t∩ b∙ DE╗ physica∞ secto≥ ì
  802.                                     number returned in Reg L
  803.