home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / zsys / znode-12 / a / cpm.lbr / CPM2.HZP / CPM2.HLP
Encoding:
Text File  |  1993-06-12  |  32.6 KB  |  709 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. CP/M STAT Command
  7. CP/M PIP Command
  8. CP/M ED Command
  9. CP/M ASM Command
  10. CP/M LOAD Command
  11. The UNLOAD Command
  12. CP/M DDT Command
  13. CP/M SYSGEN Command
  14. CP/M SUBMIT and XSUB Commands
  15. CP/M BDOS -- Basic I/O Operations
  16. CP/M BDOS -- Basic Disk Operations
  17. CP/M File Types
  18. CP/M BIOS Jump Vector
  19. :General Information on CP/M
  20.      CP/M   is  a  monitor  control  program  for  microcomputer   software 
  21. development  which  uses IBM-compatible flexible disks (floppy  disks)  for 
  22. mass  storage.   Using a microcomputer mainframe based on Intel's  8080  or 
  23. Zilog's Z80 microprocessor, CP/M provides a general environment for program 
  24. construction,  storage,  and editing, along with assembly and program debug 
  25. facilities.   An important feature of CP/M is that it can be easily altered 
  26. to  execute  with  any computer configuration which uses an Intel  8080  or 
  27. Zilog Z80 Microprocessor and has at least 20K bytes of main memory with  up 
  28. to eight IBM-compatable diskette drives.
  29.      The  CP/M monitor provides access to programs through a  comprehensive 
  30. file  management  system.    The  file  subsystem  supports  a  named  file 
  31. structure,  allowing dynamic allocation of file space as well as sequential 
  32. and  random  file  access.   Using this file system,  up  to  128  distinct 
  33. programs can be stored in both source and machine-executable form.
  34.      Digital  Research,  the designer of CP/M,  has provided a set of  nine 
  35. manuals which describe the use and operation of CP/M in detail.
  36.  
  37.      These manuals are:
  38.           1.  An Introduction to CP/M Features and Facilities
  39.           2.  ED:  A Context Editor for the CP/M Disk System
  40.           3.  ASM:  CP/M Assembler User's Manual
  41.           4.  DDT:  CP/M Dynamic Debugging Tool User's Manual
  42.           5.  CP/M 1.4 Interface Guide
  43.           6.  CP/M 1.4 System Alteration Guide
  44.           7.  CP/M 2.0 User's Guide
  45.           8.  CP/M 2.0 Interface Guide
  46.           9.  CP/M 2.0 System Alteration Guide
  47.      As the reader can see,  CP/M supports a context editor,  an  assembler 
  48. (Intel-compatable),  and  a  debugger system.   These are available in  the 
  49. basic CP/M package.   There is a large variety of other software  available 
  50. which  can  run under CP/M with little or no modification.   Such  software 
  51. includes  several  assemblers (both 8080 and  Z80),  a  symbolic  debugger, 
  52. several  high-level  languages (including FORTRAN  IV  {compiler},  BASIC-E 
  53. {translator},  CBASIC {translator}, many interpretive BASICs, ALGOL, FOCAL, 
  54. and  C),  and  several special-purpose applications programs (such as  text 
  55. formatting systems and accounting systems).
  56.      This HELP File addresses itself specifically to the CP/M 2.x Operating 
  57. Systems.
  58. :CP/M File References
  59.  
  60.      A  file reference identifies a particular file or group of files on  a 
  61. particular  disk  attached to CP/M.   These file references can  be  either 
  62. unambiguous  (ufn)  or  ambiguous (afn).   An  unambiguous  file  reference 
  63. uniquely identifies a single file, while an ambiguous file reference may be 
  64. satisfied by a number of different files.
  65.  
  66.      An  unambiguous file reference is an exact name of the specified file.  
  67. It consists of up to eight characters in the file name and three characters 
  68. in the file type.  An unambiguous file reference is of the form --
  69.  
  70.                pppppppp.sss
  71.  
  72.      The  characters used in specifying an unambiguous file  reference  may 
  73. not contain any of --
  74.  
  75.                < > . , ; : = ? * [ ]
  76.  
  77.      An  ambiguous file reference is used for directory search and  pattern 
  78. matching.   The  form  of  an  ambiguous file reference is  similar  to  an 
  79. unambiguous reference, except the symbol '?' may be interspersed throughout 
  80. the file reference.   In various commands throughout CP/M,  the '?'  symbol 
  81. matches  any  character of a file name in the '?' position.   For  example, 
  82. X?Y.C?M  will match XZY.COM and X3Y.CEM.   The '*' symbol is used to  match 
  83. all characters of a file name or file type.   For example, *.COM will match 
  84. XZY.COM and HELP.COM, while HELP.* will match HELP.COM and HELP.HLP.
  85. :CP/M Line Editing and Output Control
  86.  
  87.      The following are the line editing functions supported by CP/M --
  88.  
  89.           rubout    Delete and echo the last character typed at the
  90.                     console.
  91.           Ctrl-H    Delete   the   last  character  typed;   Backspace  one 
  92.                     character; CRT-oriented
  93.           Ctrl-U    Delete the entire line typed at the console.
  94.           Ctrl-X    Delete the entire line typed at the console;  Backspace 
  95.                     to the beginning of the current line; CRT-oriented.
  96.           Ctrl-R    Retype current command line:  types a "clean line"
  97.                     following character deletion with rubouts.
  98.           Ctrl-E    Physical end of line:  carriage is returned, but
  99.                     line is not sent until the carriage return key is
  100.                     depressed.
  101.           Ctrl-M    Terminates input (carriage return).
  102.           Ctrl-J    Terminates current input (line feed); CRT-oriented
  103.           Ctrl-C    CP/M system reboot (warm start).
  104.           Ctrl-Z    End input from the console (used in PIP and ED).
  105.  
  106.      Other control functions affect console output --
  107.  
  108.           Ctrl-P    Copy all subsequent console output to the currently-
  109.                     assigned list device (LST:).  Output is sent to both
  110.                     the list device and the console device until the next
  111.                     Ctrl-P is typed.
  112.           Ctrl-S    Stop the console output temporarily.  Program execution
  113.                     and output continue when the next character is typed
  114.                     at the console.  Typing Ctrl-C returns control to CP/M.
  115.  
  116.      Input lines can generally be up to 255 characters in length.  They are 
  117. not acted upon until the carriage return key is typed.
  118. :CP/M Built-In Commands
  119.           ERA  afn  -- The  ERA  (erase) command  removes  files  from  the 
  120.                currently logged-in disk.
  121.           DIR  afn -- The DIR (directory) command causes the names  of  all 
  122.                files which satisfy the ambiguous file name afn to be listed 
  123.                on  the console device.   All files are listed if no afn  is 
  124.                given.
  125.           REN  ufn1=ufn2  -- The  REN (rename) command allows the  user  to 
  126.                change the names of files on disk.  The file satisfying ufn2 
  127.                is changed to ufn1.
  128.           SAVE  n ufn -- The SAVE command places n pages (256-byte  blocks) 
  129.                onto disk from the TPA and names this file ufn.
  130.           TYPE  ufn -- The TYPE command displays the contents of the  ASCII 
  131.                source  file  ufn  on the currently logged-in  disk  at  the 
  132.                console device.
  133.           USER n -- Upon cold boot,  the user is automatically logged in to 
  134.                User Area 0,  which is compatable with CP/M 1.4 directories.  
  135.                The USER command allows the user to move to another  logical 
  136.                area  within  the same directory;  areas are numbered  0-15.  
  137.                The ERA,  DIR,  REN,  SAVE,  and TYPE commands apply to  the 
  138.                current User Area.
  139. :CP/M Transient Commands
  140.  
  141.      The CP/M standard transient commands are --
  142.  
  143.           STAT      List the number of  bytes  of storage  and data on  the 
  144.                     currently    logged-in   disk,    provide   statistical 
  145.                     information  about  particular files,  and  display  or 
  146.                     alter device assignment.
  147.           PIP       Load the Peripheral Interchange Program for  subsequent 
  148.                     disk file and peripheral transfer operations.
  149.           ED        Load and execute the CP/M text editor program.
  150.           SUBMIT    Submit a file of commands for batch processing.
  151.           XSUB      Used in conjunction with SUBMIT, transfers all buffered 
  152.                     console input from CON: to the SUBMIT File.
  153.  
  154.           ASM       Load  the  CP/M assembler and  assemble  the  specified 
  155.                     program from disk.
  156.           LOAD      Load  the file in Intel "hex" machine code  format  and 
  157.                     produce  a file in machine executable form which can be 
  158.                     loaded into the TPA (this loaded program becomes a  new 
  159.                     command under the CCP).
  160.  
  161.           DDT       Load the CP/M debugger into the TPA and execute it.
  162.           DUMP      Dump the contents of a file in hex.
  163.  
  164.           SYSGEN    Create a new CP/M system diskette.
  165.           MOVCPM    Regenerate  the  CP/M system  for a  particular  memory 
  166.                     size.
  167. :CP/M STAT Command
  168.  
  169.      The STAT Command takes any of the following forms --
  170.  
  171. STAT      Calculate the storage remaining on all active drives and print  a 
  172.           message like
  173.                x: R/W, SPACE: nnnK  -- if disk is Read/Write
  174.                x: R/O, SPACE: nnnK  -- if disk is Read Only
  175. STAT x:   Calculate the storage remaining on the specified drive and print
  176.                BYTES REMAINING ON x: nnnK
  177.  
  178. STAT x:afn [$S]
  179.           Scan the specified files on the specified drive (x: is optional), 
  180.           and  list  all files which satisfy the unambiguous  reference  in 
  181.           alphabetical  order with storage requirements.   A table like the 
  182.           following is generated --
  183.  
  184.                Size Recs Bytes Ext Acc
  185.               sssss rrrr  nnnk  ee a/b d:pppppppp.sss
  186.  
  187.           where
  188.                sssss -- number of virtual 128-byte records in file
  189.                     This field is display if the optional $S is given
  190.                rrrr -- number of 128-byte records in each extent of the file
  191.                nnnK -- number of bytes (in K, K=1024) allocated to the file
  192.                ee -- number of 16K extensions
  193.                a/b -- access mode of file; R/O or R/W
  194.                d:pppppppp.sss -- drive name (d may be A, B, C, D) and file
  195.                          name
  196.  
  197. STAT x:=R/O
  198.           Set the specified drive to Read Only.   This is cleared by a warm 
  199.           boot.  When a disk is Read Only, the message
  200.                BDOS ERR ON x: READ ONLY
  201.           will appear if there is an attempt to write to it.
  202. STAT VAL:
  203.           Summarize the status commands.  STAT VAL: will print the list --
  204.  
  205.                Temp R/O Disk:  d:=R/O
  206.                Set Indicator:  d:filename.typ $R/O $R/W $SYS $DIR
  207.                Disk Status  :  DSK: d:DSK:
  208.                User Status  :  USR:
  209.                Iobyte Assign:
  210.                CON: = TTY:  CRT:  BAT:  UC1:
  211.                RDR: = TTY:  PTR:  UR1:  UR2:
  212.                PUN: = TTY:  PTP:  UP1:  UP2:
  213.                LST: = TTY:  CRT:  LPT:  UL1:
  214.  
  215. STAT DEV:
  216.           Display  the  current logical to physical  device  mapping.   For 
  217.           example, the list may appear as --
  218.  
  219.                CON: = CRT:         PUN: = PTP:
  220.                RDR: = UR1:         LST: = TTY:
  221.  
  222. STAT d:afn [$R/O or $R/W or $SYS or $DIR]
  223.           Set  the  various  permanent  file  indicators.    R/O=Read/Only, 
  224.           R/W=Read/Write, SYS=System, DIR=Non-System
  225.  
  226. STAT ld1=pd1, ld2=pd2, ...
  227.           Change  the  logical  to physical  device  assignments.   Logical 
  228.           device ld1 is assigned to physical device pd1,  etc.   The  valid 
  229.           logical device names are --
  230.  
  231.                CON:      The system console device
  232.                RDR:      The paper tape reader device
  233.                PUN:      The paper tape punch device
  234.                LST:      The output list device
  235.  
  236.           The valid physical device names are --
  237.  
  238.                TTY:      Slow speed output device (teletype)
  239.                CRT:      High speed output device (cathode ray tube)
  240.                BAT:      Batch processing (CON: input is RDR:,  CON: output 
  241.                          is LST:)
  242.                UC1:      User-defined console
  243.                PTR:      Paper tape reader
  244.                PTP:      Paper tape punch
  245.                UR1:      User-defined reader #1
  246.                UR2:      User-defined reader #2
  247.                UP1:      User-defined punch #1
  248.                UP2:      User-defined punch #2
  249.                LPT:      Line printer
  250.                UL1:      User-defined list device #1
  251.  
  252.  
  253. STAT d:DSK:
  254.           List  the characteristics of the disk named "d:";  if "d:" is not 
  255. specified, list the characteristics of all active disks.  A sample listing:
  256.  
  257.                d: Drive Characteristics
  258.            65536: 128 Byte Record Capacity
  259.             8192: Kilobyte Drive Capacity
  260.              128: 32  Byte Directory Entries
  261.                0: Checked  Directory Entries
  262.             1024: Records/ Extent
  263.              128: Records/ Block
  264.               58: Sectors/ Track
  265.                2: Reserved Tracks
  266.  
  267. STAT USR:
  268.           List  the  User  Number the user is currently  in  and  the  User 
  269. Numbers  which  have  files  on the currently  addressed  disk.   A  sample 
  270. listing:
  271.                Active User : 0
  272.                Active Files: 0 1 3
  273. :CP/M PIP Command
  274.  
  275.      PIP  (Peripheral  Interchange  Program) is the  CP/M  transient  which 
  276. implements the basic media conversion operations necessary to load,  print, 
  277. punch,  copy,  and  combine  disk files.   PIP is initiated by one  of  the 
  278. following forms --
  279.  
  280.           PIP            Engage  PIP,  prompt the user with '*',  and  read 
  281.                          command lines directly from the console.  PIP used 
  282.                          in  this  way is exited by either typing an  empty 
  283.                          command line (just a carriage return) or a  Ctrl-C 
  284.                          as the first character of the line.
  285.           PIP  cmnd      Engage PIP,  execute  the specified  command,  and 
  286.                          return to CP/M.
  287.  
  288.      The form of each command line in PIP is --
  289.  
  290.           destination = source#1, source#2, source#3, ..., source#n
  291.  
  292.  
  293.      The general forms of PIP command lines are --
  294.  
  295.           x:=y:afn       Copy  all  files  satisfying afn from drive  y  to 
  296.                          drive x.   'y' may be omitted,  and,  if  so,  the 
  297.                          currently logged-in drive is selected.
  298.           x:ufn=y:       Copy  the file given by ufn from y to x.   'x' may 
  299.                          be omitted,  and,  if so,  the currently logged-in 
  300.                          drive is selected.
  301.           x:afn=y:afn    Like the above, but x and/or y may be omitted; the 
  302.                          default   drive  is  selected  for   the   omitted 
  303.                          drive(s).
  304.           ld=pd          Copy  from  the specified physical device  to  the 
  305.                          specified  logical device.   Valid logical devices 
  306.                          are --
  307.                               CON:, RDR:, PUN:, LST:
  308.                          Valid physical devices are --
  309.                               TTY:, CRT:, UC1:, PTR:, PTP:, UR1:, UR2:,
  310.                               UP1:, UP2:, LPT:, UL1:
  311.  
  312.  
  313.      Additional device names which may be used in PIP commands are --
  314.  
  315.           NUL:      Send 40 Nulls (ASCII 0) to the device.
  316.           EOF:      Send a CP/M End of File character (ASCII Ctrl-Z).
  317.           INP:      Special PIP input source to be patched (see manual).
  318.           OUT:      Special  PIP  output  destination to  be  patched  (see 
  319.                     manual).
  320.           PRN:      Same as LST:,  but  tabs are expanded at  every  eighth 
  321.                     character position, lines are numbered, and page ejects 
  322.                     are inserted every 60 lines with an initial eject.
  323.  
  324.  
  325.      The  user  can  also specify one or more PIP  parameters  enclosed  in 
  326. square brackets separated by zero or more blanks.  These parameters are --
  327.  
  328.      B    Block mode  transfer.   Data is buffered by PIP until an ASCII X-
  329.           Off character (Ctrl-S) is received from the source device.
  330.      Dn   Delete characters  which extend past column n in the transfer  of 
  331.           data to the destination from the character source.
  332.      E    Echo all transfer operations to the console.
  333.      F    Filter (remove) form feeds from the file.
  334.      Gn   Get File from User Number n (n in the range 0 - 15)
  335.      H    Hex data transfer.  All data is checked for proper Intel hex file 
  336.           format.
  337.      I    Ignore ':00' records in the transfer of Intel hex format file.
  338.      L    Translate upper case to lower case alphabetics.
  339.      N    Add line numbers to each line transferred to the destination.
  340.      O    Object file (non-ASCII) transfer.  Ignore End of File.
  341.  
  342.      Pn   Include page ejects at every n lines.
  343.      Qs^Z Quit  copying  from the source device or file when the  string  s 
  344.           (terminated by Ctrl-Z) is encountered.
  345.      R    Read system files
  346.      Ss^Z Start copying from the source file when the string s is seen.
  347.      Tn   Expand tabs to every nth column.
  348.      U    Translate lower case to upper case alphabetics.
  349.      V    Verify that data has been copied correctly.
  350.      W    Write over R/O files without console interrogation
  351.      Z    Zero the parity bit on input for each ASCII character.
  352. :CP/M ED Command
  353.  
  354.      The  ED  Program  is the CP/M  system  context  editor,  which  allows 
  355. creation and alteration of ASCII files.   Complete details are given in the 
  356. user's manual.
  357.  
  358.      The following are the error indicators given by ED --
  359.  
  360.           ?    Unrecognized Command
  361.           >    Memory buffer full
  362.           #    Cannot apply command the number of times specified
  363.           O    Cannot open LIB file in R command
  364.  
  365.  
  366.      The following are the control characters recognized by ED --
  367.  
  368.           ^C        System reboot
  369.           ^E        Physical <CR> <LF> (not entered in command)
  370.           ^H        Character delete (backspace)
  371.           ^I        Logical tab
  372.           ^J        New line (line feed)
  373.           ^L        Logical <CR> <LF> in search and substitute strings
  374.           ^M        New line (carriage return)
  375.           ^U        Line delete
  376.           ^X        Line delete and backspace
  377.           ^Z        String terminator
  378.           Rubout    Character delete
  379.           Break     Discontinue command
  380.  
  381.  
  382.      The following are the commands recognized by ED --
  383.  
  384.           nA        Append lines
  385.           +/- B     Beginning/Bottom of buffer
  386.           +/- nC    Move character positions
  387.           +/- nD    Delete characters
  388.           E         Exit
  389.           nFs^Z     Find string
  390.           H         End edit, close and reopen files
  391.           Is^Z      Insert characters
  392.           nJ        Place strings in juxtaposition
  393.           +/- nK    Kill (delete) lines
  394.           +/- nL    Move down/up lines
  395.           nM        Macro definition
  396.           O         Return to original file
  397.           +/- nP    Move and print pages
  398.           Q         Quit with no file changes
  399.           R         Read library file
  400.  
  401.           nSs1^Zs2^Z
  402.                     Substitute s2 for s1
  403.           +/- nT    Type lines
  404.           +/- U     Translate lower to upper case if U; none if -U
  405.           +/- V     Engage/disengage line numbers (verify)
  406.           0V        Print memory buffer info (free/total usage)
  407.           nW        Write lines
  408.           nX        Transfer n lines to X$$$$$$$.LIB
  409.           0X        Empty X$$$$$$$.LIB
  410.           nZ        Sleep
  411.           +/- n     Move and type (+/- nLT)
  412.           n:        Move to absolute line (V engaged)
  413.           :n        Process from current line to specified line (V engaged)
  414. :CP/M ASM Command
  415.  
  416.      The ASM Command loads and executes the CP/M 8080 assembler.   It is of 
  417. the form --
  418.  
  419.           ASM filename.xyz
  420.  
  421. where
  422.  
  423.           filename  ... is the name of the file 'filename.ASM' to assemble
  424.           x         ... designates the disk name which contains the source
  425.           y         ... designates the disk name to contain the hex file
  426.                          (y=Z suppresses generation of the hex file)
  427.           z         ... designates the disk name to contain the print file
  428.                          (y=X lists on CON:, y=Z suppresses listing)
  429.  
  430.      Refer to the ASM Manual for further details.
  431. :CP/M LOAD Command
  432.  
  433.      The LOAD Command reads the file specified, which is assumed to contain 
  434. Intel hex format machine code and produces a memory image file which can be 
  435. subsequently executed (converts .HEX to .COM files).  It is of the form --
  436.  
  437.           LOAD filename
  438.  
  439. where filename is the name of the file 'filename.HEX'.
  440. :The UNLOAD Command
  441.  
  442.      The UNLOAD Command does the reverse of the LOAD Command -- it converts 
  443. COM files to HEX files.  It is of the form --
  444.  
  445.           UNLOAD filename
  446.  
  447. where filename is the name of the file 'filename.COM'.
  448. :CP/M DDT Command
  449.  
  450.      The  DDT  Program allows dynamic interactive testing and debugging  of 
  451. programs generated in the CP/M environment.  It is invoked by --
  452.  
  453.           DDT
  454.           DDT filename.HEX
  455.           DDT filename.COM
  456.  
  457. where 'filename' is the name of the program to be loaded or tested.
  458.  
  459.      DDT responds to the normal CP/M input line editing characters.
  460.  
  461.  
  462.    DDT responds to the following commands --
  463.  
  464.      As   Perform inline assembly starting at the specified address s.
  465.      D    Display memory from the current address for 16 display lines.
  466.      Ds   Display memory from address s for 16 display lines.
  467.      Ds,f Display memory from address s to address f.
  468.      Fs,f,c
  469.           Fill memory from start address s to final address f with byte c.
  470.  
  471.      G    Start execution at the current value of the PC.
  472.      Gs   Start execution at the specified address s.
  473.      Gs,b Start execution  at the specified address s and set a  breakpoint 
  474.           at the address b.
  475.      Gs,b,c
  476.           Same as above with breakpoints at b and c.
  477.      G,b  Start execution at the current value of the PC with breakpoint b.
  478.      G,b,c
  479.           Same as above with breakpoints at b and c.
  480.  
  481.  
  482.      If   Insert a file name f into the default FCB.
  483.  
  484.      L    List 12 lines of disassembled code from the current address.
  485.      Ls   List 12 lines from the specified address s.
  486.      Ls,f List lines of disassembled code from s to f.
  487.  
  488.      Ms,f,d
  489.           Move the block from address s to f to destination at address d.
  490.  
  491.      R    Read file in FCB into memory at 100H.
  492.      Rb   Read file in FCB into memory with offset b from 100H.
  493.  
  494.      Ss   Set (examine and alter) memory starting at address s.
  495.  
  496.  
  497.      T    Trace the next instruction.
  498.      Tn   Trace the next n instructions.
  499.  
  500.      U    Untrace -- like Trace, but intermediate steps are not displayed.
  501.  
  502.      X    Examine all registers and flags.
  503.      Xr   Examine specified registers or flag, where r may be --
  504.                C    Carry flag
  505.                Z    Zero flag
  506.                M    Minus (sign) flag
  507.                I    Interdigit Carry flag
  508.                A    Accumulator
  509.                B    BC Reg pair
  510.                D    DE Reg pair
  511.                H    HL Reg pair
  512.                S    Stack pointer
  513.                P    PC
  514. :CP/M SYSGEN Command
  515.  
  516.      The  SYSGEN transient command allows generation of an initialized disk 
  517. containing the CP/M Operating System.
  518.  
  519.      It is invoked by typing
  520.  
  521.           SYSGEN
  522.  
  523.      Once invoked,  the user is prompted through the session.  Refer to the 
  524. CP/M Manual for further details.
  525. :CP/M SUBMIT and XSUB Commands
  526.  
  527.      The  SUBMIT  command allows CP/M commands to be batched  together  for 
  528. automatic processing.  The form of this command is
  529.  
  530.           SUBMIT ufn parm1 parm2 ... parmn
  531.  
  532.      The ufn given in the SUBMIT command must be the filename (not type) of 
  533. a  file which exists on the currently logged-in disk with an  assumed  file 
  534. type of '.SUB'.  Refer to the CP/M Manual for further details.
  535.      The  XSUB  command extends the power of  the  SUBMIT  facility.   When 
  536. specified  as the first line of a SUBMIT File,  it self-relocates  directly 
  537. below the CCP.   All subsequent SUBMIT command lines are processed by XSUB, 
  538. so  that  programs  which read buffered console input  (BDOS  Function  10) 
  539. receive input directly from the SUBMIT File.   While XSUB is in memory,  it 
  540. prints  the message "(xsub active)" on each warm boot.   An example of  the 
  541. use of XSUB to display memory from 100H to 1FFH is --
  542.                     XSUB
  543.                     DDT
  544.                     D100,1FF
  545.                     G0
  546. :CP/M BDOS -- Basic I/O Operations
  547.      Function and Number      Input Parameters    Output Parameters
  548.  
  549.      System Reset      0      None                None
  550.      Read Console      1      None                ASCII Char in A
  551.      Write Console     2      ASCII Char in E     None
  552.      Read Reader       3      None                ASCII Char in A
  553.      Write Punch       4      ASCII Char in E     None
  554.      Write List        5      ASCII Char in E     None
  555.      Direct Con I/O    6      ASCII Char in E     I/O Status in A if E=0FFH
  556.      Get I/O Status    7      None                I/O Status in A
  557.      Put I/O Status    8      I/O Status in E     None
  558.      Print Buffer      9      Address of string   None
  559.                                terminated by $
  560.                                in DE
  561.      Read Buffer      10      Address of Read     Read Buffer is filled
  562.                                Buffer in DE
  563.      Console Ready    11      None                LSB of A is 1 if char
  564.                                                    ready
  565. *All function numbers are passed in Reg C.
  566.  
  567. I/O Status Byte --
  568.  
  569.      Value     Bits 6&7  Bits 4&5  Bits 2&3  Bits 0&1
  570.  
  571.        00      CON:=TTY: RDR:=TTY: PUN:=TTY: LST:=TTY:
  572.        01           CRT:      PTR:      PTP:      CRT:
  573.        10           BAT:      UR1:      UP1:      LPT:
  574.        11           UC1:      UR2:      UP2:      UL1:
  575.  
  576. Read Buffer --
  577.  
  578.      Byte      Function
  579.  
  580.        1       Maximum Buffer Length
  581.        2       Current Buffer Length (returned value)
  582.      3-n       Data (returned values)
  583.  
  584.  
  585. :CP/M BIOS -- Basic Disk Operations
  586.  
  587.      Function and Number      Input Parameters    Output Parameters
  588.  
  589.      Return Version # 12      None                Version Info in HL
  590.                                                   H=0 CP/M, H=1 MP/M
  591.                                                   L=00 CP/M 1.x, 2x 2.x
  592.      Init BDOS        13      None                None
  593.      Log-In Disk      14      Value in Reg E      None
  594.                                A=0, B=1, C=2,
  595.                                D=3
  596.      Open File        15      Address of FCB      Byte address of FCB
  597.                                in DE               if found or 0FFH if not
  598.      Close File       16      Address of FCB      Byte address of FCB
  599.                                in DE               if found or 0FFH if not
  600.      Search for File  17      Address of FCB      Byte address of FCB (0-3)
  601.                                in DE               if found or 0FFH if not
  602.      Search for Next  18      Address of FCB      Byte address of next FCB
  603.                                in DE               if found or 0FFH if not
  604.      Delete File      19      Address of FCB      Byte address of FCB (0-3)
  605.                                in DE               if found or 0FFH if not
  606.  
  607.      Function and Number      Input Parameters    Output Parameters
  608.  
  609.      Read Next Record 20      Address of FCB      0=successful read
  610.                                in DE              1=read past EOF
  611.                                                   2=reading random data
  612.      Write Next Rec   21      Address of FCB      0=successful write
  613.                                in DE              1=error in extending
  614.                                                   2=end of disk data
  615.                                                   255=no more dir space
  616.      Make File        22      Address of FCB      Byte address of FCB or
  617.                                in DE               255 if no more dir space
  618.      Rename FCB       23      Address of FCB      Byte Address of Dir entry
  619.                                in DE               or 255 if no match
  620.      Return Log Code  24      None                Login vector in HL
  621.      Read Drive No    25      None                Number of logged-in drive
  622.                                                    (A=0, B=1, C=2, D=3)
  623.      Set DMA Address  26      Address of 128      None
  624.                               byte buffer in DE
  625.  
  626.      Function and Number      Input Parameters    Output Parameters
  627.  
  628.      Get Alloc Vect   27      None                Allocation  Vect Addr  in 
  629.                                                    HL
  630.      Write Prot Disk  28      None                None
  631.      Get R/O Vect     29      None                HL=R/O Vect Val
  632.      Set File Attrib  30      Ptr to FCB in DE    Dir code in A
  633.      Get Disk Parms   31      None                HL=DPB Address
  634.      Set/Get Usr Code 32      E=0FFH (get)/Code   A=Current code (get)/no
  635.                                (set)               value (set)
  636.      Read Random      33      DE=FCB addr         A=return code
  637.                                                   1=reading unwritten data
  638.                                                   2=(not used)
  639.                                                   3=can't close curr ext
  640.                                                   4=seek to unwritten ext
  641.                                                   5=(not used)
  642.                                                   6=seek past end of disk
  643.  
  644.      Function and Number      Input Parameters    Output Parameters
  645.  
  646.      Write Random     34      DE=FCB addr         A=return code
  647.                                                   1=reading unwritten data
  648.                                                   2=(not used)
  649.                                                   3=can't close curr ext
  650.                                                   4=seek to unwritten ext
  651.                                                   5=dir overflow
  652.                                                   6=seek past end of disk
  653.      Compute File Siz 35      DE=FCB addr         Random Rec Field set
  654.                                                    to file size
  655.      Set Random Rec   36      DE=FCB addr         Random Rec Field set
  656.  
  657.  
  658. *All function numbers are passed in Reg C
  659.  
  660. :CP/M File Types
  661.      AIN   ALGOL 60 Intermediate   ALG   ALGOL 60 Source File
  662.      ASM   Assembler Source File   BAK   Backup File
  663.      BAS   BASIC Source File       C     C Source File
  664.      COB   COBOL Source File       COM   "Command" File
  665.      FOR   FORTRAN IV Source File  HEX   Intel "hex" code file
  666.      HLP   HELP File               INT   BASIC Intermediate File
  667.      LST   Listing File            MAC   MACRO-80 Source File
  668.      PAS   PASCAL Source File      PRN   Assembler Listing File
  669.      REL   Relocatable Module      SRC   PASCAL/MT Source File
  670.      SUB   SUBMIT File             SYM   Symbol File
  671.      TC    Tiny-C Source File      TFS   TFS Source File
  672.      TXT   Text File               $$$   Temporary File
  673. :CP/M BIOS Jump Vector
  674.  
  675.      The  following is a table representing the entry points into the  CP/M 
  676. BIOS of the major routines accessable to the user --
  677.  
  678.  
  679.      Routine   Relative Offset     Comment
  680.  
  681.      BOOT           00H            Cold Start
  682.      WBOOT          03H            Warm Start
  683.      CONST          06H            Console Status
  684.                                     Reg A = 00 if no char ready
  685.                                     Reg A = FF if char ready
  686.      CONIN          09H            Console char in (Reg A)
  687.      CONOUT         0CH            Console char out (Reg C)
  688.      LIST           0FH            List out (Reg C)
  689.      PUNCH          12H            Punch out (Reg C)
  690.      READER         15H            Reader in (Reg A)
  691.  
  692.      Routine   Relative Offset     Comment
  693.  
  694.      HOME           18H            Move to track 00
  695.      SELDSK         1BH            Select disk given by Reg C (A=0,B=1,...)
  696.      SETTRK         1EH            Set  track  address  given  by  Reg  C 
  697.                                       (0...76)
  698.      SETSEC         21H            Set  sector  address given  by  Reg  C 
  699.                                       (1...26)
  700.      SETDMA         24H            Set subsequent DMA address (RP B&C)
  701.      READ           27H            Read track/sector (block)
  702.      WRITE          2AH            Write track/sector (block)
  703.      LISTST         2DH            List Device Status
  704.                                     Reg A = 00 if no char ready
  705.                                     Reg A = FF if char ready
  706.      SECTRAN        30H            Translate  sector number in Reg C  using 
  707.                                     table pointed to by DE; physical sector 
  708.                                     number returned in Reg L
  709.