home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / CPM3 / CPM3LIB.DQC / CPM3LIB.DOC
Text File  |  2000-06-30  |  9KB  |  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. ITIMER    Returε numbe≥ oµ second≤ elapseΣ sincσ thσ las⌠ cal∞ t∩ ì
  60. ááááááááááTIMERS.
  61.  
  62.      Input:    none.
  63.  
  64.      Output:   Register HL - Number of seconds elapsed.
  65. áááááááááááááááRegister A  - Copy of Register L.
  66. áááááááááááááááZ flag set - TIMERS not yet called.
  67. áááááááááááááááAll other registers are preserved.
  68.  
  69.      Fortran calling convention:
  70.  
  71.                ITIME=ITIMER(0)
  72.  
  73.      Where:    ITIME is either I*2 or I*1 variable.
  74.                ░á i≤á ß dumm∙ paramete≥ s∩ tha⌠á FORTRAN-8░á wil∞ 
  75. ááááááááááááááákno≈ tha⌠ thi≤ i≤ ß functioε call.
  76.  
  77.  
  78.  
  79.  
  80. TIME      Return date and time as 3 character strings.
  81.  
  82.      Input:    Register HL points to 3 byte Day of Week field.
  83. áááááááááááááááRegister DE points to 8 byte date field.
  84. áááááááááááááááRegister BC points to 8 byte time field.
  85.  
  86.      Output:   Thσ │ field≤ arσ se⌠ t∩ thσ curren⌠ timσ anΣ date«  ì
  87. áááááááááááááááDay of Week - Abbreviation of Weekday.
  88. áááááááááááááááDate field - MM/DD/YY.
  89. áááááááááááááááTime field - HH:MM:SS.
  90. áááááááááááááááAll registers are destroyed.
  91.  
  92.      Fortran calling convention:
  93.  
  94.                CALL TIME(WKDAY,DATE,TIMEX)
  95.  
  96. áááááWhere:ááááWKDAY is a 3 byte array.
  97.                DATE and TIMEX are 8 byte arrays.
  98.  
  99.  
  100.  
  101.  
  102. TIMEB     Return date and time in binary format.
  103.  
  104.      Input:    Register HL points to Day of Week word.
  105. áááááááááááááááRegister DE points to 3 words for date.
  106. áááááááááááááááRegister BC points to 3 words for time.
  107.  
  108.      Output:   The 3 fields are set to current date and time.
  109. áááááááááááááááWeekday is in the range 0-6 (0=Monday).èáááááááááááááááDate is in the order Month,Day,Year.
  110. áááááááááááááááTime is in the order Hour,Minute,Second.
  111. áááááááááááááááAll registers are destroyed.
  112.  
  113.      Fortran calling convention:
  114.  
  115.                CALL TIMEB(IWKDAY,IDATE,ITIME)
  116.  
  117.      Where:    IWKDAY is I*2 variable for Weekday.
  118.                IDATE and ITIME are I*2 arrays of 3 for date and time.
  119.  
  120.  
  121.  
  122.  
  123. IFNDEV    Return≤á thσ pysica∞ devicσ numbe≥ associateΣ witΦá thσ ì
  124. áááááááááádevicσ name.
  125.  
  126.      Input:    Registe≥á H╠á point≤ t∩ ╢ characte≥á strinτá whicΦ ì
  127. ááááááááááááááácontain≤ thσ devicσ name.
  128.  
  129.  
  130.      Output:   Register HL contains the device number.
  131.                Register A  - copy of register L.
  132.                All other registers are preserved.
  133.  
  134.      Error condition║á    Iµ registe≥ H╠ ╜ 0FFFF╚ (-1⌐á theεá thσ ì
  135. ááááááááááááááánamed device does not exist.
  136.  
  137.      Fortran calling convention:
  138.  
  139.                IDEV=IFNDEV(DEVNM)
  140.  
  141.      Where:    IDEV is I*2 or I*1 variable for device number.
  142.                DEVNM is 6 byte string containing the device name.
  143.  
  144.      Example:  IDEV=IFNDEV('MODEM ')
  145.  
  146.                IDE╓áá wil∞á contaiεá thσá pysica∞á devicσá numbe≥ ì
  147. áááááááááááááááassociateΣá witΦ thσ namσ MODEM¼á o≥ -▒á iµá MODE═ ì
  148. ááááááááááááááácould not be found.
  149.  
  150.  
  151.  
  152.  
  153. IBAUD     Get or Set the baud rate for a pysical device.
  154.  
  155.      Input:    Register HL points to the Baud rate word.
  156.                If baud rate=0 then return current baud rate.
  157. áááááááááááááááOtherwise set the device to value at baud rate.
  158. áááááááááááááááRegister DE points to device number byte.
  159.  
  160.      Output:   Registe≥á H╠ contain≤ thσ curren⌠ bauΣ ratσ oµ thσ ì
  161. ááááááááááááááárequested device.
  162.  
  163.      Error condition║á    H╠ ╜ ░ - InvaliΣ bauΣ ratσá o≥á invaliΣ ìèááááááááááááááádevicσ numbe≥ o≥ devicσ doe≤ no⌠ suppor⌠ requesteΣ ì
  164. ááááááááááááááábaud rate.
  165.  
  166.      Fortran calling convention:
  167.  
  168.                IBD=IBAUD(IRATE,IDEVNO)
  169.  
  170. áááááWhere:ááááIBD is I*2 variable containing returned baud rate.
  171.                IRAT┼á i≤ I*▓ variablσ whicΦ contain≤ ░ fo≥ ge⌠ o≥ ì
  172. áááááááááááááááa baud rate for set.
  173. áááááááááááááááIDEVN╧á i≤á I*▓á o≥ I*▒á variablσá containinτá thσ ì
  174. ááááááááááááááádevice number.
  175.  
  176.      Examples:
  177.                
  178.                IBD=IBAUD(0,1)
  179.  
  180.                Returns the current baud rate of device 1
  181.  
  182.                IBD=IBAUD(1200,2)
  183.  
  184.                Sets the baud rate of device 2 to 1200 baud.
  185.  
  186.  
  187.  
  188.  
  189.  
  190. IMXDEV    Returns the maximum physical device number.
  191.  
  192.      Input:    none.
  193.  
  194.      Output:   Register L - Maximum device number.
  195. áááááááááááááááRegister A - Copy of Register L.
  196. áááááááááááááááRegister H - 0
  197. áááááááááááááááAll other registers are preserved.
  198.  
  199.      Fortran calling convention:
  200.  
  201.                MAXDEV=IMXDEV(0)
  202.  
  203.      Where:    MAXDE╓á i≤á I*▓ o≥ I*▒ variablσ tha⌠ wil∞á contaiε ì
  204. áááááááááááááááthe maximum physical device number.
  205.  
  206.  
  207.  
  208.  
  209. IGTMOD    Returns a physical device Mode byte.
  210.  
  211.      Input:    Register HL points to physical device number
  212.  
  213.      Output:   Register L - Mode byte
  214.                Register A - Copy of Register L.
  215.                Register H - 0
  216.                All other registers are preserved.
  217. è     Fortran calling convention:
  218.  
  219.                MODE=IGTMOD(IDEVNO)
  220.  
  221.      Where:    IDEVNO is I*2 or I*1 physical device number.
  222. áááááááááááááááMOD┼ i≤ I*▓ o≥ I*▒ variablσ tha⌠ wil∞ contaiεá thσ ì
  223. ááááááááááááááámode byte.
  224.  
  225. áááááááááááááááThσá bit≤á iεá thσ modσ bytσá havσá thσá followinτ ì
  226. ááááááááááááááámeanings:
  227.  
  228. áááááááááááááááBit
  229.  
  230. ááááááááááááááá0    Device may do input
  231. ááááááááááááááá1    Device may do output
  232. ááááááááááááááá2    Software selectable baud rates
  233. ááááááááááááááá3    Device may use XON/XOFF protocol
  234. ááááááááááááááá4    XON/XOFF protocol enabled
  235. ááááááááááááááá5-7  Reserved for future use
  236.  
  237.  
  238.  
  239.  
  240. IGTDEV    Returεá curren⌠á logica∞ t∩ physica∞ devicσá assignmen⌠ ì
  241. áááááááááávector.
  242.  
  243.      Input:    Register HL points to logical device number.
  244.  
  245.                CP/M 3 has five logical devices:
  246.  
  247.                0    CONIN     Console input
  248. ááááááááááááááá1    CONOUT    Console output
  249. ááááááááááááááá2    AUXIN     Auxiliary input
  250. ááááááááááááááá3    AUXOUT    Auxiliary output
  251. ááááááááááááááá4    LSTOUT    List output
  252.  
  253.      Output:  áRegiste≥á H╠ - curren⌠ physica∞ assignmen⌠á vecto≥ ì
  254. áááááááááááááááfo≥á thσ requesteΣ logica∞ device«á  Bit≤ arσá se⌠ ì
  255. ááááááááááááááácorrespondinτá t∩á physica∞ device≤ froφá lef⌠á t∩ ì
  256. áááááááááááááááright (bit 15 = device 0, bit 0 = device 15).
  257. áááááááááááááááAll other registers (except PSW) are preserved.
  258.  
  259.      Error condition:
  260. áááááááááááááááRegiste≥ H╠ ╜ 0FFFF╚ (-1⌐ - InvaliΣ logica∞ devicσ ì
  261. ááááááááááááááánumber.
  262.  
  263.      Fortran calling convention:
  264.  
  265.                IVEC=IGTDEV(DEVNO)
  266.  
  267.      Where:    DEVNO is I*2 or I*1 logical device number.
  268.                IVEC is I*2 variable for assignment vector.
  269.  
  270.  
  271. è
  272. ISTDEV    Set logical to physical device assignment vector.
  273.  
  274.      Input:    Register HL points to logical device number.
  275.                Registe≥á D┼á point≤ t∩á ne≈á physica∞á assignmen⌠ ì
  276. ááááááááááááááávector.
  277.  
  278.      Output:   none«áá  Al∞á register≤á excep⌠á PS╫á anΣá H╠á arσ ì
  279. ááááááááááááááápreserved.
  280.  
  281.      Error condition:
  282.                Registe≥á H╠ ╜ 0FFFF╚ (1-⌐ InvaliΣ logica∞á devicσ ì
  283. ááááááááááááááánumber.
  284.  
  285.      Fortran calling convention:
  286.  
  287.                IERR=ISTDEV(DEVNO,IVEC)
  288.  
  289.      Where:    DEVNO is I*2 or I*1 logical device number.
  290. áááááááááááááááIVEC is I*2 assignment vector.
  291. áááááááááááááááIERR is I*2 or I*1 error return code.
  292.  
  293.