home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / simtel / sigm / vols000 / vol089 / syslibc.hlp < prev    next >
Text File  |  1985-02-09  |  9KB  |  236 lines

  1. Miscellaneous Routines -- Introduction
  2. BDOS and BIOS Routines
  3. Capitalization Routines
  4. Convert ASCII to Hexadecimal
  5. End of Code
  6. Exchange Nybbles
  7. Memory Fill Routines
  8. Memory Move Routines
  9. Delay Routine
  10. Version Number of SYSLIB
  11. :Miscellaneou≤ Routine≤ -- Introduction
  12.  
  13.      Thi≤á sectioεá oµá thσá Hel≡ Filσá describe≤á thσá followinτ ì
  14. Miscellaneous Routines --
  15.           BDOS      For Direct BDOS Interface
  16.           BIOS      For Direct BIOS Interface
  17.           CAPS      For Character Capitalization
  18.           CAPSTR    For String Capitalization
  19.           CATH      Convert ASCII Character to Hexadecimal
  20.           CODEND    Provide End of Code/Data Area
  21.           EN        Exchange Nybbles in A
  22.           FILLB     Fill Memory (up to 255 bytes)
  23.            FILLBC   Fill Memory (up to 65,535 bytes)
  24.            HFILB    Fill Memory (up to 255 bytes)
  25.            HFILBC   Fill Memory (up to 65,535 bytes)
  26.           MOVEB     Move Memory (up to 255 bytes)
  27.            MOVEBC   Move Memory (up to 65,535 bytes)
  28.            HMOVB    Move Memory (up to 255 bytes)
  29.            HMOVBC   Move Memory (up to 65,535 bytes)
  30.           PAUSE     Delay N 10th of a Second
  31.           VERSION   Return Version Number of SYSLIB
  32. :BDOS and BIOS Routines
  33.  
  34.      Routine Name:  BDOS
  35.      Function║
  36.           Cal∞á CP/═á Entr∙á Poin⌠á a⌠ locatioεá ╡á anΣá preservσ ì
  37. Register≤ DE anΣ BC.
  38.      Inputs:  C and DE provide input parameters
  39.      Outputs:  A and HL provide output parameters
  40.      Registers Affected:  PSW, HL
  41.      SYSLIB Routines Called:  -None-
  42.      Special Error Conditions:  -Determined by Routines Called-
  43.      Routine Name:  BIOS
  44.      Function║
  45.           BIO╙ provide≤ thσ use≥ witΦ ß direc⌠ interfacσ int∩ thσ ì
  46. CP/═á BIOS«á  I⌠á i≤ calleΣ witΦ thσ ┴ Reτ containinτá thσá inde° ì
  47. offse⌠á int∩ thσ BIO╙ JM╨ table«á  N∩ register≤ arσ preserveΣá b∙ ì
  48. thi≤ routine«á  Thσ content≤ oµ HL¼á DE¼ anΣ B├ arσ passeΣ t∩ thσ ì
  49. BIOS unchanged.
  50.  
  51.      The following table summarizes the BIOS JMP Table Entries --
  52.  
  53.    Offset Function
  54.       0   Cold Start
  55.       1   Warm Start
  56.       2   Console Status; Returns A=0FFH if char ready, A=0 if
  57.                not
  58.       3   Console Input; Returns char in A
  59.       4   Console Output; Char passed in C
  60.       5   List Output; Char passed in C
  61.       6   Punch Output; Char passed in C
  62.       7   Reader Input; Returns char in A
  63.  
  64. BIOS, Con't
  65.    Offset Function 
  66.       8   Home Disk Head (Return Version Number); Returns
  67.                Version Number in HL
  68.       9   Select Disk; Disk Number (A=0, etc) passed in C
  69.      10   Set Track Number; Track Number passed in C
  70.      11   Set Sector Number; Sector Number passed in C
  71.      12   Set DMA Address; DMA Address passed in BC
  72.      13   Read Block from Disk; Returns A=0 if OK, A=1 if Error
  73.      14   Write Block to Disk; Returns A=0 if OK, A=1 if Error
  74.  
  75.      15   List Status; Returns A=0FFH if ready to output, A=0
  76.                if not
  77.      16   Sector Translation; Logical-to-Physical Sector
  78.                Translation; Logical Sector Number passed in BC
  79.                and Translate Table Address passed in DE; Returns
  80.                Physical Sector Number in HL
  81.  
  82.  
  83. BIOS, Con't
  84.      Inputs:  A = Offset (as per Table Above)
  85.               BC = Input Parameters
  86.      Outputs:  A, HL = Output Parameters
  87.      Registers Affected:  All
  88.      SYSLIB Routines Called:  -None-
  89.      Special Error Conditions:  -None-
  90.  
  91. :Capitalization Routines
  92.  
  93.      Routine Name:  CAPS
  94.      Function║
  95.           Capitalizσá ASCI╔á characte≥á iε Registe≥ ┴á iµá i⌠á i≤ ì
  96. lower-casσá alphabetiπá (a-z)╗á otherwise¼á returε ┴á unaffected«  ì
  97. Onl∙á thσ lowe≥ seveε bit≤ oµ thσ bytσ arσá considered¼á anΣá thσ ì
  98. Mos⌠ Significan⌠ Bi⌠ i≤ maskeΣ ou⌠ t∩ zero.
  99.      Inputs:  A = character to capitalize
  100.      Outputs:  A = capitalized character
  101.      Registers Affected:  PSW
  102.      SYSLIB Routins Called:  -None-
  103.      Special Error Conditions:  -None-
  104.  
  105.  
  106.      Routine Name:  CAPSTR
  107.      Function:
  108.           CAPST╥ capitalize≤ thσ <NULL>-terminateΣ strinτ pointeΣ ì
  109. to by HL.  No Registers are affected.
  110.      Inputs:  HL pts to first byte of string
  111.      Outputs:  None (String is Capitalized)
  112.      Registers Affected:  None
  113.      SYSLIB Routines Called:  CAPS
  114.      Special Error Conditions:  None
  115.  
  116. :Convert ASCII to Hexadecimal
  117.  
  118.      Routine Name:  CATH
  119.      Function║
  120.           Conver⌠á thσá ASCI╔á Hexadecima∞á characte≥á iεá thσá ┴ ì
  121. Registe≥ t∩ binar∙ iε thσ ┴ Register«á  Iµ invaliΣ characte≥ (no⌠ ì
  122. 0-9¼ A-F)¼ returε <SP╛ (2░ Hex⌐ iε ┴ Registe≥ a≤ erro≥ code.
  123.      Input:  A = ASCII Hex Character (0-9, A-F)
  124.      Output:  A = Binary value represented by char
  125.      Registers Affected:  PSW
  126.      SYSLIB Routines Called:  -None-
  127.      Specia∞ Erro≥ Conditions:
  128.           Iµá invaliΣá he°á char¼á <SP╛ (2░ Hex⌐á returneΣá iεá ┴ ì
  129. Register.
  130.  
  131. :End of Code
  132.  
  133.      Routine Name:  CODEND
  134.      Function║
  135.           Returεá thσ addres≤ oµ thσ nex⌠ pagσ followinτ thσ las⌠ ì
  136. bytσá oµ code«á  Thi≤ i≤ usefu∞ iε determininτ wherσ thσá scratcΦ ì
  137. areß begins.
  138.      Inputs:  None
  139.      Output:  HL=Address of next page
  140.      Registers Affected:  HL
  141.      SYSLIB Routines Called:  -None-
  142.      Special Error Conditions:  -None-
  143.  
  144. :Exchange Nybbles
  145.  
  146.      Routine Name:  EN
  147.      Function║
  148.           Exchangσá Nybble≤ iε Registe≥ A╗á High-orde≥ fou≥á bit≤ ì
  149. arσ exchangeΣ witΦ Low-orde≥ fou≥ bit≤ oµ Registe≥ A.
  150.      Inputs:  A = Byte input
  151.      Outputs:  A = Byte output
  152.      Registers Affected:  PSW
  153.      SYSLIB Routines Called:  -None-
  154.      Special Error Conditions:  -None-
  155.  
  156. :Memory Fill Routines
  157.  
  158.      Routine Names:  FILLB, FILLBC, HFILB, HFILBC
  159.      Function║è          Thesσá routine≤ fil∞ aε areß oµ memor∙ witΦ ßá constan⌠ ì
  160. bytσ value«á  FILL┬ caε fil∞ u≡ t∩ ß 256-bytσ buffer¼á anΣ FILLB├ ì
  161. caε fil∞ u≡ t∩ ß 65,536-bytσ (withiε reason⌐ buffer.
  162.      FILL┬á anΣ FILLB├ havσ n∩ effect≤ oε an∙á registers«á  HFIL┬ ì
  163. anΣ HFILB├ botΦ affec⌠ thσ H╠ registe≥ pair¼ anΣ the∙ returε witΦ ì
  164. H╠á pointinτ t∩ thσ bytσ afte≥ thσ las⌠ bytσ filled«á  HFIL┬á anΣ ì
  165. HFILB├á arσá usefu∞ wheε furthe≥ processinτ froφ thσá las⌠á poin⌠ ì
  166. filled is desired.
  167.  
  168.      Inputs:  HL points to the first byte of the buffer to be filled
  169.               B (for FILLB) or BC (for FILLBC) = number of bytes in buffer
  170.               A = byte value to fill buffer with
  171.  
  172.  
  173.      Outputs:  None for FILLB and FILLBC (Buffer is filled)
  174.                H╠ point≤ t∩ nex⌠ bytσ fo≥ HFIL┬ anΣ HFILBC
  175.  
  176.      Registers Affected:  None for FILLB, FILLBC; HL for HFILB,
  177.                               HFILBC
  178.  
  179.      SYSLIB Routines Called:  -None-
  180.  
  181.      Special Error Conditions:  -None-
  182.  
  183. :Memory Move Routines
  184.  
  185.      Routine Names:  MOVEB, MOVEBC, HMOVB, HMOVBC
  186.      Function║
  187.           Movσ thσ blocδ oµ memor∙ pointeΣ t∩ b∙ H╠ t∩ thσ memor∙ ì
  188. locatioεá pointeΣá t∩ b∙ DE«á  MOVE┬ caε movσ u≡á t∩á ßá 256-bytσ ì
  189. buffer¼ anΣ MOVEB├ caε movσ u≡ t∩ ß 65,536-bytσ buffer.
  190.      MOVE┬á anΣ MOVEB├ havσ n∩ effect≤ oε an∙á registers«á  HMOV┬ ì
  191. anΣ HMOVB├ botΦ affec⌠ thσ H╠ registe≥ pair¼ anΣ the∙ returε witΦ ì
  192. H╠ anΣ D┼ pointinτ t∩ thσ bytσ afte≥ thσ las⌠ bytσ moved«á  HMOV┬ ì
  193. anΣ HMOVB├ arσ usefu∞ wheε furthe≥ processinτ froφ thσ las⌠ poin⌠ ì
  194. filleΣ i≤ desired.
  195.  
  196.      Inputs:  HL points to the first byte of the buffer to move
  197.               DE points to the first byte of the buffer to move to
  198.               B (for MOVEB) or BC (for MOVEBC) = number of bytes in buffer
  199.  
  200.  
  201.      Outputs:  None for MOVEB and MOVEBC (Buffer is moved)
  202.                HL and DE pt to byte after last byte moved for
  203.                     HMOVB and HMOVBC
  204.  
  205.      Registers Affected:  None for MOVEB, MOVBC; HL, DE for
  206.                               HMOVB, HMOVBC
  207.  
  208.      SYSLIB Routines Called:  -None-
  209.  
  210.      Special Error Conditions:  -None-
  211.  
  212. :Delay Routine
  213.  
  214.      Routine Name:  PAUSE
  215.      Function:
  216.           Delay N 10ths of a Second.
  217.      Inputs:  HL = N (Number of 10ths of a Second Delay desired)
  218.               B = Processor Speed in MHz (1, 2, 3, 4, ...)
  219.      Outputs:  None (Routine returns N 10ths of a Second later)
  220.      Registers Affected:  None
  221.      SYSLIB Routines Called:  None
  222.      Special Error Conditons:  None
  223.  
  224.  
  225. :Version Number of SYSLIB
  226.  
  227.      Routine Name:  VERSION
  228.      Function:
  229.           Return Version Number of SYSLIB.
  230.      Inputs:  None
  231.      Outputs║  HL=Versioε (H=Major¼ L=Minor╗ H=2¼ L=▒ fo≥ 2.1)
  232.      Registers Affected:  HL
  233.      SYSLIB Routines Called:  None
  234.      Special Error Conditions:  None
  235.  
  236.