home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / enterprs / cpm / sigm / sigmv801.ark / CPM3LIB.LBR / CPM3LIB.DQC / CPM3LIB.DOC
Encoding:
Text File  |  1986-02-01  |  8.5 KB  |  293 lines

  1.  
  2.  
  3.                         October 17, 1983
  4.  
  5.                          Jim Lopushinsky
  6.  
  7.                         Edmonton, Alberta
  8.  
  9.  
  10. CPM3LIB.RE╠á i≤á ß librar∙ oµ subroutine≤ tha⌠ makσ usσá oµá CP/═ ì
  11. Plu≤á features«á  IncludeΣá arσ routine≤ t∩ acces≤ thσá timσá anΣ ì
  12. date¼á se⌠á anΣá interogatσ elapseΣ time¼á inspec⌠á physica∞á anΣ ì
  13. logica∞ characte≥ I/╧ devices¼á anΣ set/ge⌠ bauΣ rate≤ fo≥ seria∞ ì
  14. I/╧ devices.
  15.  
  16. Thi≤ i≤ jus⌠ ß start«á  Iε thσ future¼ ╔ hopσ thσ librar∙ wil∞ bσ ì
  17. increased to include other CP/M Plus features.
  18.  
  19. Al∞á routine≤á (excep⌠á BIOS⌐ adherσ t∩ thσá Microsof⌠á paramete≥ ì
  20. passinτá convention≤ s∩ tha⌠ the∙ ma∙ bσ calleΣ directl∙á b∙á an∙ ì
  21. Microsoft language compiler (FORTRAN-80, COBOL-80, BASIC-80).
  22.  
  23. T∩á includσ an∙ requireΣ modules¼á searcΦ CPM3LI┬ durinτ thσ linδ ì
  24. step.
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32. BIOS      Direct bios call thru the BDOS using function 50.
  33.  
  34.      Input:    Register D - Bios entry number (0-32).
  35.                Al∞á othe≥á register≤á - A≤ expecteΣ b∙á thσá BIO╙ ì
  36. ááááááááááááááároutine.
  37.  
  38.      Output:   Al∞ register≤ returneΣ a≤ appropriatσ fo≥ thσ BIO╙ ì
  39. ááááááááááááááároutine.
  40.  
  41.  
  42.  
  43.  
  44.  
  45. TIMERS    Initiate time counter
  46.  
  47.      Input:    none.
  48.  
  49.      Output:   none«á  Al∞ register≤ arσ preserved«  Thσ interna∞ ì
  50. ááááááááááááááátimσá counte≥ i≤ initializeΣ t∩ ░ anΣá incrementeΣ ì
  51. áááááááááááááááevery second.
  52.  
  53. áááááFortran calling convention:
  54.  
  55.                CALL TIMERS
  56. è
  57.  
  58.  
  59.  
  60. ITIMER    Returε numbe≥ oµ second≤ elapseΣ sincσ thσ las⌠ cal∞ t∩ ì
  61. ááááááááááTIMERS.
  62.  
  63.      Input:    none.
  64.  
  65.      Output:   Register HL - Number of seconds elapsed.
  66. áááááááááááááááRegister A  - Copy of Register L.
  67. áááááááááááááááZ flag set - TIMERS not yet called.
  68. áááááááááááááááAll other registers are preserved.
  69.  
  70.      Fortran calling convention:
  71.  
  72.                ITIME=ITIMER(0)
  73.  
  74.      Where:    ITIME is either I*2 or I*1 variable.
  75.                ░á i≤á ß dumm∙ paramete≥ s∩ tha⌠á FORTRAN-8░á wil∞ 
  76. ááááááááááááááákno≈ tha⌠ thi≤ i≤ ß functioε call.
  77.  
  78.  
  79.  
  80.  
  81. TIME      Return date and time as 3 character strings.
  82.  
  83.      Input:    Register HL points to 3 byte Day of Week field.
  84. áááááááááááááááRegister DE points to 8 byte date field.
  85. áááááááááááááááRegister BC points to 8 byte time field.
  86.  
  87.      Output:   Thσ │ field≤ arσ se⌠ t∩ thσ curren⌠ timσ anΣ date«  ì
  88. áááááááááááááááDay of Week - Abbreviation of Weekday.
  89. áááááááááááááááDate field - MM/DD/YY.
  90. áááááááááááááááTime field - HH:MM:SS.
  91. áááááááááááááááAll registers are destroyed.
  92.  
  93.      Fortran calling convention:
  94.  
  95.                CALL TIME(WKDAY,DATE,TIMEX)
  96.  
  97. áááááWhere:ááááWKDAY is a 3 byte array.
  98.                DATE and TIMEX are 8 byte arrays.
  99.  
  100.  
  101.  
  102.  
  103. TIMEB     Return date and time in binary format.
  104.  
  105.      Input:    Register HL points to Day of Week word.
  106. áááááááááááááááRegister DE points to 3 words for date.
  107. áááááááááááááááRegister BC points to 3 words for time.
  108.  
  109.      Output:   The 3 fields are set to current date and time.
  110. áááááááááááááááWeekday is in the range 0-6 (0=Monday).
  111. èáááááááááááááááDate is in the order Month,Day,Year.
  112. áááááááááááááááTime is in the order Hour,Minute,Second.
  113. áááááááááááááááAll registers are destroyed.
  114.  
  115.      Fortran calling convention:
  116.  
  117.                CALL TIMEB(IWKDAY,IDATE,ITIME)
  118.  
  119.      Where:    IWKDAY is I*2 variable for Weekday.
  120.                IDATE and ITIME are I*2 arrays of 3 for date and time.
  121.  
  122.  
  123.  
  124.  
  125. IFNDEV    Return≤á thσ pysica∞ devicσ numbe≥ associateΣ witΦá thσ ì
  126. áááááááááádevicσ name.
  127.  
  128.      Input:    Registe≥á H╠á point≤ t∩ ╢ characte≥á strinτá whicΦ ì
  129. ááááááááááááááácontain≤ thσ devicσ name.
  130.  
  131.  
  132.      Output:   Register HL contains the device number.
  133.                Register A  - copy of register L.
  134.                All other registers are preserved.
  135.  
  136.      Error condition║á    Iµ registe≥ H╠ ╜ 0FFFF╚ (-1⌐á theεá thσ ì
  137. ááááááááááááááánamed device does not exist.
  138.  
  139.      Fortran calling convention:
  140.  
  141.                IDEV=IFNDEV(DEVNM)
  142.  
  143.      Where:    IDEV is I*2 or I*1 variable for device number.
  144.                DEVNM is 6 byte string containing the device name.
  145.  
  146.      Example:  IDEV=IFNDEV('MODEM ')
  147.  
  148.                IDE╓áá wil∞á contaiεá thσá pysica∞á devicσá numbe≥ ì
  149. áááááááááááááááassociateΣá witΦ thσ namσ MODEM¼á o≥ -▒á iµá MODE═ ì
  150. ááááááááááááááácould not be found.
  151.  
  152.  
  153.  
  154.  
  155. IBAUD     Get or Set the baud rate for a pysical device.
  156.  
  157.      Input:    Register HL points to the Baud rate word.
  158.                If baud rate=0 then return current baud rate.
  159. áááááááááááááááOtherwise set the device to value at baud rate.
  160. áááááááááááááááRegister DE points to device number byte.
  161.  
  162.      Output:   Registe≥á H╠ contain≤ thσ curren⌠ bauΣ ratσ oµ thσ ì
  163. ááááááááááááááárequested device.
  164.  
  165.      Error condition║á    H╠ ╜ ░ - InvaliΣ bauΣ ratσá o≥á invaliΣ ìèááááááááááááááádevicσ numbe≥ o≥ devicσ doe≤ no⌠ suppor⌠ requesteΣ ì
  166. ááááááááááááááábaud rate.
  167.  
  168.      Fortran calling convention:
  169.  
  170.                IBD=IBAUD(IRATE,IDEVNO)
  171.  
  172. áááááWhere:ááááIBD is I*2 variable containing returned baud rate.
  173.                IRAT┼á i≤ I*▓ variablσ whicΦ contain≤ ░ fo≥ ge⌠ o≥ ì
  174. áááááááááááááááa baud rate for set.
  175. áááááááááááááááIDEVN╧á i≤á I*▓á o≥ I*▒á variablσá containinτá thσ ì
  176. ááááááááááááááádevice number.
  177.  
  178.      Examples:
  179.                
  180.                IBD=IBAUD(0,1)
  181.  
  182.                Returns the current baud rate of device 1
  183.  
  184.                IBD=IBAUD(1200,2)
  185.  
  186.                Sets the baud rate of device 2 to 1200 baud.
  187.  
  188.  
  189.  
  190.  
  191.  
  192. IMXDEV    Returns the maximum physical device number.
  193.  
  194.      Input:    none.
  195.  
  196.      Output:   Register L - Maximum device number.
  197. áááááááááááááááRegister A - Copy of Register L.
  198. áááááááááááááááRegister H - 0
  199. áááááááááááááááAll other registers are preserved.
  200.  
  201.      Fortran calling convention:
  202.  
  203.                MAXDEV=IMXDEV(0)
  204.  
  205.      Where:    MAXDE╓á i≤á I*▓ o≥ I*▒ variablσ tha⌠ wil∞á contaiε ì
  206. áááááááááááááááthe maximum physical device number.
  207.  
  208.  
  209.  
  210.  
  211. IGTMOD    Returns a physical device Mode byte.
  212.  
  213.      Input:    Register HL points to physical device number
  214.  
  215.      Output:   Register L - Mode byte
  216.                Register A - Copy of Register L.
  217.                Register H - 0
  218.                All other registers are preserved.
  219.  
  220. è     Fortran calling convention:
  221.  
  222.                MODE=IGTMOD(IDEVNO)
  223.  
  224.      Where:    IDEVNO is I*2 or I*1 physical device number.
  225. áááááááááááááááMOD┼ i≤ I*▓ o≥ I*▒ variablσ tha⌠ wil∞ contaiεá thσ ì
  226. ááááááááááááááámode byte.
  227.  
  228. áááááááááááááááThσá bit≤á iεá thσ modσ bytσá havσá thσá followinτ ì
  229. ááááááááááááááámeanings:
  230.  
  231. áááááááááááááááBit
  232.  
  233. ááááááááááááááá0    Device may do input
  234. ááááááááááááááá1    Device may do output
  235. ááááááááááááááá2    Software selectable baud rates
  236. ááááááááááááááá3    Device may use XON/XOFF protocol
  237. ááááááááááááááá4    XON/XOFF protocol enabled
  238. ááááááááááááááá5-7  Reserved for future use
  239.  
  240.  
  241.  
  242.  
  243. IGTDEV    Returεá curren⌠á logica∞ t∩ physica∞ devicσá assignmen⌠ ì
  244. áááááááááávector.
  245.  
  246.      Input:    Register HL points to logical device number.
  247.  
  248.                CP/M 3 has five logical devices:
  249.  
  250.                0    CONIN     Console input
  251. ááááááááááááááá1    CONOUT    Console output
  252. ááááááááááááááá2    AUXIN     Auxiliary input
  253. ááááááááááááááá3    AUXOUT    Auxiliary output
  254. ááááááááááááááá4    LSTOUT    List output
  255.  
  256.      Output:  áRegiste≥á H╠ - curren⌠ physica∞ assignmen⌠á vecto≥ ì
  257. áááááááááááááááfo≥á thσ requesteΣ logica∞ device«á  Bit≤ arσá se⌠ ì
  258. ááááááááááááááácorrespondinτá t∩á physica∞ device≤ froφá lef⌠á t∩ ì
  259. áááááááááááááááright (bit 15 = device 0, bit 0 = device 15).
  260. áááááááááááááááAll other registers (except PSW) are preserved.
  261.  
  262.      Error condition:
  263. áááááááááááááááRegiste≥ H╠ ╜ 0FFFF╚ (-1⌐ - InvaliΣ logica∞ devicσ ì
  264. ááááááááááááááánumber.
  265.  
  266.      Fortran calling convention:
  267.  
  268.                IVEC=IGTDEV(DEVNO)
  269.  
  270.      Where:    DEVNO is I*2 or I*1 logical device number.
  271.                IVEC is I*2 variable for assignment vector.
  272.  
  273.  
  274.  
  275. è
  276. ISTDEV    Set logical to physical device assignment vector.
  277.  
  278.      Input:    Register HL points to logical device number.
  279.                Registe≥á D┼á point≤ t∩á ne≈á physica∞á assignmen⌠ ì
  280. ááááááááááááááávector.
  281.  
  282.      Output:   none«áá  Al∞á register≤á excep⌠á PS╫á anΣá H╠á arσ ì
  283. ááááááááááááááápreserved.
  284.  
  285.      Error condition:
  286.                Registe≥á H╠ ╜ 0FFFF╚ (1-⌐ InvaliΣ logica∞á devicσ ì
  287. ááááááááááááááánumber.
  288.  
  289.      Fortran calling convention:
  290.  
  291.                IERR=ISTDEV(DEVNO,IVEC)
  292.  
  293.      Where:    DEVNO is I*2 or I*1 logical device number.
  294. áááááááááááááááIVEC is I*2 assignment vector.
  295. áááááááááááááááIERR is I*2 or I*1 error return code.
  296.  
  297.