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