home *** CD-ROM | disk | FTP | other *** search
/ Oakland CPM Archive / oakcpm.iso / sigm / vol107 / syslibhd.ws < prev    next >
Encoding:
Text File  |  1985-02-10  |  11.8 KB  |  383 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.       SYSLIB -- An Integrated Library of Assembly Language
  10.   Utility Subroutines for use with the Microsoft M80 Assembler
  11.  
  12.  
  13.                 SYSLIB User and Reference Manual
  14.                                for
  15.                        SYSLIB Version 2.4
  16.  
  17.  
  18.  
  19.                                by
  20.                           Richard Conn
  21.  
  22.  
  23.  
  24.  
  25.                          4 February 1983
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  The SYSLIB Library is Copyright (c) 1982, 1983 by Richard Conn
  35.                        All Rights Reserved
  36.  
  37.  
  38.  
  39.  
  40.                 SYSLIB Version 2.4 Identification
  41.  
  42.      SYSLI┬á Versioε 2.4 caε bσ identifieΣ b∙ callinτ thσ routinσ ì
  43. nameΣá VERSIO╬á iε thσ library«á  I⌠ return≤á thσá majo≥á versioε ì
  44. numbe≥á iεá ╚ anΣ thσ mino≥ versioε numbe≥ iε ╠ (Versioεá 2.4á i≤ ì
  45. identifieΣ b∙ ╚ ╜ ▓ anΣ ╠ ╜ 4).
  46.  
  47. .he                 SYSLIB User and Reference Manual
  48. .fo Table of Contents                                  TOC - #
  49. .pn 1
  50.  
  51.       SYSLIB -- An Integrated Library of Assembly Language
  52.   Utility Subroutines for use with the Microsoft M80 Assembler
  53.  
  54.                 SYSLIB User and Reference Manual
  55.                                for
  56.                        SYSLIB Version 2.4
  57.  
  58.  
  59.                         Table of Contents
  60.  
  61.      Alphabetical Listing of SYSLIB Routines
  62.      Functional Listing of SYSLIB Routines
  63.      Distribution Statement and Listings of SYSLIB Files
  64.  
  65.  
  66.  1.0 Introduction                                       1
  67.      1.01 What is SYSLIB?
  68.      1.02 What is Needed to Use SYSLIB?
  69.      1.03 What Does SYSLIB Buy Me?
  70.      1.04 How Do I Assemble with SYSLIB?
  71.      1.05 How Do I Learn to Use SYSLIB Effectively?
  72.      1.06 Who May Use SYSLIB?
  73.  
  74.  2.0 Directory Manipulation Routines                    6
  75.      2.01 Introduction
  76.      2.02 Generalized Routines -- DIRF and DIRFS
  77.      2.03 Buffer Allocation Routine -- DBUFFER
  78.      2.04 Disk Parameter Extraction Routine -- DPARAMS
  79.      2.05 Free Space Computation Routine -- DFREE
  80.      2.06 File Size Computation Routine -- FSIZE
  81.      2.07 Directory Load Routines -- DIRLOAD and DIRSLOAD
  82.      2.08 Directory Alphabetization Routine -- DIRALPHA
  83.      2.09 Directory Entry Selection Routine -- DIRSEL
  84.      2.10 Directory Pack Routine -- DIRPACK
  85.      2.11 Negative Directory Pack Routine -- DIRNPACK
  86.  
  87.  3.0 Numeric String Evaluation Routines                15
  88.      3.01 Evaluation of String in All Bases -- EVAL
  89.      3.02 Evaluation of String in Base 16 -- EVAL16
  90.      3.03 Evaluation of String in Base 10 -- EVAL10
  91.      3.04 Evaluation of String in Base  8 -- EVAL8
  92.      3.05 Evaluation of String in Base  2 -- EVAL2
  93.  
  94.  4.0 Byte-Oriented File Input/Output Routines          18
  95.      4.01 Intro to Byte-Oriented File I/O Routines
  96.      4.02 Byte-Oriented Input and Output File Open
  97.      4.03 Byte-Oriented Input and Output File Close
  98.      4.04 Byte-Oriented Input and Output
  99.      4.05 Error Return Codes
  100.  
  101.  
  102.  
  103.  
  104.             Table of Contents Continued on Next Page
  105. è
  106.       SYSLIB -- An Integrated Library of Assembly Language
  107.   Utility Subroutines for use with the Microsoft M80 Assembler
  108.  
  109.                   Table of Contents, Continued
  110.  
  111.  5.0 CP/M File Input/Output Routines                   23
  112.      5.01 Introduction
  113.      5.02 Open a File - F$OPEN and F$MOPEN
  114.      5.03 Close a File - F$CLOSE
  115.      5.04 Create a File - F$MAKE
  116.      5.05 Delete a File - F$DELETE
  117.      5.06 Rename a File - F$RENAME
  118.      5.07 Test for the Existance of a File - F$EXIST
  119.      5.08 Read a Block from a File - F$READ
  120.      5.09 Write a Block to a File - F$WRITE
  121.  
  122.  6.0 File Name String Parser and FCB Init              28
  123.  
  124.  7.0 Input Line Editors                                30
  125.  
  126.  8.0 String Output Routines                            34
  127.  
  128.  9.0 NumeriπáOutpu⌠ Routine≤                           35
  129.       9.01 Output HL as 4 Hexadecimal Characters
  130.       9.02 Output HL as 5 Decimal Characters
  131.       9.03 Output HL as Up to 5 Decimal Characters
  132.                with Leading Spaces
  133.       9.04 Output A as 2 Hexadecimal Characters
  134.       9.05 Output A as 3 Decimal Characters
  135.       9.06 Output A as Up to 3 Decimal Characters
  136.                with Leading Spaces
  137.  
  138. 10.0 String and Value Comparison Routines              40
  139.  
  140. 11.0 Character-Oriented Input/Output Routines          42
  141.      11.01 <CR> <LF> Output
  142.      11.02 Conditional Input
  143.      11.03 General Input Routines
  144.      11.04 General Output Routines
  145.  
  146. 12.0 Math Routines                                     45
  147.      12.01 Introduction
  148.      12.02 Arithmetic Operations
  149.      12.03 Complement Operations
  150.      12.04 Rotate and Shift Operations
  151.      12.05 Logical Operations
  152.  
  153. 13.0 CRC Routines                                      49
  154.  
  155. 14.0 Random Number Generator Routines                  52
  156.  
  157. 15.0 User/Disk Manipulation Routines                   54
  158.  
  159.             Table of Contents Continued on Next Page
  160. è
  161.       SYSLIB -- An Integrated Library of Assembly Language
  162.   Utility Subroutines for use with the Microsoft M80 Assembler
  163.  
  164.                   Table of Contents, Continued
  165.  
  166.  
  167. 16.0 Sort Routines                                     56
  168.  
  169. 17.0 ZCPR2 Feature-Specific Routines                   58
  170.  
  171. 18.0 ZCPR2-Specific Named Directory Routines           63
  172.  
  173. 19.0 Misπellaneous Routines                            66
  174.  
  175. 20.0 Cross-Reference Listing of SYSLIB Routines        72
  176.  
  177. 21.0 Sample Programs Using SYSLIB                      76
  178.      21.01 The Classic File Dump Program
  179.      21.02 Byte-Oriented File Input Demonstration
  180.      21.03 Directory Access Demonstration
  181.      21.04 Math Demonstration
  182.      21.05 Sort Demonstration
  183.      21.06 Random Number Generator Demonstration
  184.      21.07 ZCPR2-Specific Function Demonstration
  185.  
  186.  
  187. .pn 1
  188. .fo Alphabetical Listing of SYSLIB Routines            AList - #
  189.  
  190.  
  191.       SYSLIB -- An Integrated Library of Assembly Language
  192.   Utility Subroutines for use with the Microsoft M80 Assembler
  193.  
  194.              Alphabetical Listing of SYSLIB Routines
  195.  
  196.  
  197. A    ADDHD     45   |    ANDHD     48
  198.  
  199. B    BBLINE    31   |    BIOS      67
  200.      BDOS      67   |    BLINE     31
  201.  
  202.  
  203. C    CAPS      68   |    COMPB     40   |    CRC2CLR   50
  204.      CAPSTR    68   |    COMPBC    40   |    CRC2DONE  50
  205.      CATH      69   |    COMPHD    40   |    CRC2UPD   50
  206.      CCOUT     44   |    CONDIN    42   |    CRCCLR    50
  207.      CIN       43   |    COUT      43   |    CRCDONE   50
  208.      CLINE     69   |    CPOUT     44   |    CRCUPD    50
  209.      CLOUT     44   |    CRC1CLR   50   |    CRLF      42
  210.      CMPH      46   |    CRC1DONE  50   |    CST       43
  211.      CODEND    69   |    CRC1UPD   50
  212.  
  213. D    DBUFFER    8   |    DIRFS      7   |    DIRSEL    12
  214.      DFREE      9   |    DIRLOAD   11   |    DIRSLOAD  11
  215.      DIRALPHA  12   |    DIRNPACK  14   |    DIVHD     46
  216.      DIRF       7   |    DIRPACK   13   |    DPARAMS    9
  217.  
  218. E    EN        70   |    EVAL16    16
  219.      EVAL      15   |    EVAL2     17
  220.      EVAL10    16   |    EVAL8     17
  221.  
  222. F    F$CLOSE   24   |    F$OPEN    23
  223.      F$DELETE  25   |    F$READ    27
  224.      F$EXIST   26   |    F$RENAME  26
  225.      F$MAKE    25   |    F$WRITE   27
  226.      F$MOPEN   24
  227.  
  228.      Fn$GET    21   |    FILLBC    70
  229.      Fn$PUT    21   |    FNAME     28
  230.      FIn$CLOSE 20   |    FOn$CLOSE 20
  231.      FIn$OPEN  19   |    FOn$OPEN  20
  232.      FILLB     70   |    FSIZE     10
  233.  
  234. G    GETUD     55
  235.  
  236. H    HFILB     70   |    HMOVB     71
  237.      HFILBC    70   |    HMOVBC    71
  238.  
  239. I    INITFCB   29   |    INSTR     41
  240.      INLINE    32
  241.  
  242.                  Listing Continued on Next Page
  243.  
  244.          Alphabetical Listing of SYSLIB Routines, Con't
  245.  
  246. L    LA2HC     37   |    LHLDC     36
  247.      LA3DC     38   |    LOGUD     55
  248.      LADC      38   |    LOUT      43
  249.      LCRLF     42   |    LPRINT    34
  250.      LHL4HC    35   |    LPSTR     34
  251.      LHL5DC    36
  252.  
  253. M    MA2HC     37   |    MHLDC     37
  254.      MA3DC     38   |    MOVEB     71
  255.      MADC      39   |    MOVEBC    71
  256.      MHL4HC    35   |    MULHD     46
  257.      MHL5DC    36
  258.  
  259. N    NEGH      46
  260.  
  261. O    ORHD      48
  262.  
  263. P    PA2HC     37   |    PHLDC     36
  264.      PA3DC     38   |    POUT      43
  265.      PADC      38   |    PRINT     34
  266.      PAUSE     71   |    PSTR      34
  267.      PHL4HC    35   |    PUTUD     54
  268.      PHL5DC    36
  269.  
  270. R    RETUD     55   |    RND       53
  271.      RIN       43   |    RNDINIT   52
  272.      ROTLH     47   |    RNDSEED   52
  273.      ROTRH     47
  274.  
  275. S    SCANNER   40   |    SORT      57
  276.      SHFTLH    47   |    SSBINIT   57
  277.      SHFTRH    48   |    SUBHD     45
  278.  
  279. V    VERSION   71
  280.  
  281. X    XORHD     48
  282.  
  283. Z    ZCPRQ     60   |    ZGPINS    60
  284.      ZCPRQ2    63   |    ZINICI    59
  285.      ZDNAME    64   |    ZINIDMA   59
  286.      ZDNFIND   64   |    ZINIEXT   59
  287.      ZFNAME    65   |    ZINIMC    58
  288.      ZFNINIT   63   |    ZMCPTR    61
  289.      ZFSTAT    62   |    ZPFIND    61
  290.  
  291. .pn 1
  292. .fo Functional Listing of SYSLIB Routines              FList - #
  293.  
  294.  
  295.       SYSLIB -- An Integrated Library of Assembly Language
  296.   Utility Subroutines for use with the Microsoft M80 Assembler
  297.  
  298.               Functional Listing of SYSLIB Routines
  299.  
  300.  2.0 Directory Manipulation Routines -  6
  301.      DIRF, DIRFS: 7  DBUFFER: 8  DPARAMS: 9
  302.      DFREE: 9        FSIZE: 10   DIRLOAD, DIRSLOAD: 11
  303.      DIRALPHA: 12    DIRSEL: 12  DIRPACK: 13  DIRNPACK: 14
  304.  
  305.  3.0 Numeric String Evaluation Routines - 15
  306.      EVAL: 15  EVAL16: 16  EVAL10: 16  EVAL8: 17  EVAL2: 17
  307.  
  308.  4.0 Byte-Oriented File Input/Output Routines (0-n-3) - 18
  309.      FIn$OPEN: 19   FOn$OPEN: 20   FIn$CLOSE: 20
  310.      FOn$CLOSE: 20  Fn$GET: 21     Fn$PUT: 21
  311.  
  312.  5.0 CP/M File Input/Output Routines - 23
  313.      F$OPEN: 23     F$MOPEN: 24    F$CLOSE: 24    F$MAKE: 25
  314.      F$DELETE: 25   F$RENAME: 26   F$EXIST: 26    F$READ: 27
  315.      F$WRITE: 27
  316.  
  317.  6.0 File Name String Parser and FCB Init - 28
  318.      FNAME: 28      INITFCB: 29
  319.  
  320.  7.0 Input Line Editors - 30
  321.      BBLINE: 31     BLINE: 31      INLINE: 32
  322.  
  323.  8.0 String Output Routines - 34
  324.      PRINT, LPRINT: 34        PSTR, LPSTR: 34
  325.  
  326.  9.0 NumeriπáOutpu⌠ Routine≤ - 35
  327.      PHL4HC¼ LHL4HC║ 35  MHL4HC║ 35  PHL5DC¼ LHL5DC║ 36
  328.      MHL5DC║ 36     PHLDC, LHLDC: 36    MHLDC: 37
  329.      PA2HC, LA2HC: 37    MA2HC: 37      PA3DC, LA3DC: 38
  330.      MA3DC: 38   PADC, LADC: 38      MADC: 39
  331.  
  332. 10.0 String and Value Comparison Routines - 40
  333.      COMPHD: 40   COMPB, COMPBC: 40  SCANNER: 40  INSTR: 41
  334.  
  335. 11.0 Character-Oriented Input/Output Routines - 42
  336.      CRLF, LCRLF: 42     CONDIN: 42     CST: 43
  337.      CIN, RIN: 43        COUT, LOUT, POUT: 43
  338.      CCOUT, CLOUT, CPOUT: 44
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.                  Listing Continued on Next Page
  346.  
  347.  
  348.           Functional Listing of SYSLIB Routines, Con't
  349.  
  350. 12.0 Math Routines - 45
  351.      ADDHD: 45      SUBHD: 45      MULHD: 46      DIVHD: 46
  352.      NEGH: 46       CMPH: 46       ROTLH: 47      ROTRH: 47
  353.      SHFTLH: 47     SHFTRH: 48     ANDHD: 48      ORHD: 48
  354.      XORHD: 48
  355.  
  356. 13.0 CRC Routines - 49
  357.      CRCCLR, CRC1CLR, CRC2CLR: 50  CRCUPD, CRC1UPD, CRC2UPD: 50
  358.      CRCDONE, CRC1DONE, CRC2DONE: 50
  359.  
  360. 14.0 Random Number Generator Routines - 52
  361.      RNDINIT: 52    RNDSEED: 52    RND: 53
  362.  
  363. 15.0 User/Disk Manipulation Routines - 54
  364.      PUTUD: 54      GETUD: 55      LOGUD: 55      RETUD: 55
  365.  
  366. 16.0 Sort Routines - 56
  367.      SSBINIT: 57    SORT: 57
  368.  
  369. 17.0 ZCPR2 Feature-Specific Routines - 58
  370.      ZINIMC: 58     ZINIEXT: 59    ZINICI: 59     ZINIDMA: 59
  371.      ZGPINS: 60     ZCPRQ: 60      ZMCPTR: 61     ZPFIND: 61
  372.      ZFSTAT: 62
  373.  
  374. 18.0 ZCPR2-Specific Named Directory Routines - 63
  375.      ZCPTQ2: 63     ZFNINIT: 63    ZDNAME: 64     ZDNFIND: 64
  376.      ZFNAME: 65
  377.  
  378. 19.0 Misπellaneous Routines - 66
  379.      BDOS: 67       BIOS: 67       CAPS: 68
  380.      CAPSTR: 68     CATH: 69       CLINE: 69      CODEND: 69
  381.      EN: 70         FILLB, FILLBC, HFILB, HFILBC: 70
  382.      MOVEB, MOVEBC, HMOVB, HMOVBC: 71   PAUSE: 71
  383.      VERSION: 71
  384.  
  385.