BIOS.LST 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. Listing:
  2. 1 (* Release 3.10 *)
  3. 2 (*-------------------------------------------------------------------------*
  4. 3 * *
  5. 4 * BIOS.DEF - Modula-2 interface to BIOS.H *
  6. 5 * *
  7. 6 * COPYRIGHT (C) 1989..1992 Clarion Software Corporation. *
  8. 7 * All Rights Reserved *
  9. 8 * *
  10. 9 *--------------------------------------------------------------------------*)
  11. 10
  12. 11 (*# project("#set tsc='on'") *)
  13. 12 (*# call(o_a_size=>off, o_a_copy=>off, c_conv=>on, result_optional=>on) *)
  14. 13 (*# module(implementation=>off, init_code=>off) *)
  15. 14 (*# name(prefix=>c) *)
  16. 15
  17. 16
  18. 17 DEFINITION MODULE bios;
  19. 18
  20. 19 CONST
  21. 20
  22. 21 (* Serial Port Initializers *)
  23. 22
  24. 23 _COM_INIT = 0; (* init serial port *)
  25. 24 _COM_SEND = 1; (* send character *)
  26. 25 _COM_RECEIVE = 2; (* receive character *)
  27. 26 _COM_STATUS = 3; (* get serial port status *)
  28. 27
  29. 28 (* character size initializers *)
  30. 29 _COM_CHR7 = BITSET(2); (* 7 bits characters *)
  31. ***** ^ undeclared identifier
  32. ***** ^ not supported yet
  33. 30 _COM_CHR8 = BITSET(3); (* 8 bits characters *)
  34. ***** ^ undeclared identifier
  35. ***** ^ not supported yet
  36. 31
  37. 32 (* stop bit values *)
  38. 33 _COM_STOP1 = BITSET(0); (* 1 stop bit *)
  39. ***** ^ undeclared identifier
  40. ***** ^ not supported yet
  41. 34 _COM_STOP2 = BITSET(4); (* 2 stop bits *)
  42. ***** ^ undeclared identifier
  43. ***** ^ not supported yet
  44. 35
  45. 36 (* parity initializers *)
  46. 37 _COM_NOPARITY = BITSET(0); (* no parity *)
  47. ***** ^ undeclared identifier
  48. ***** ^ not supported yet
  49. 38 _COM_ODDPARITY = BITSET(8); (* odd parity *)
  50. ***** ^ undeclared identifier
  51. ***** ^ not supported yet
  52. 39 _COM_EVENPARITY = BITSET(24);(* even parity *)
  53. ***** ^ undeclared identifier
  54. ***** ^ not supported yet
  55. 40
  56. 41 (* baud rate initializers *)
  57. 42 _COM_110 = BITSET(0); (* 110 Baud *)
  58. ***** ^ undeclared identifier
  59. ***** ^ not supported yet
  60. 43 _COM_150 = BITSET(32); (* 150 Baud *)
  61. ***** ^ undeclared identifier
  62. ***** ^ not supported yet
  63. 44 _COM_300 = BITSET(64); (* 300 Baud *)
  64. ***** ^ undeclared identifier
  65. ***** ^ not supported yet
  66. 45 _COM_600 = BITSET(96); (* 600 Baud *)
  67. ***** ^ undeclared identifier
  68. ***** ^ not supported yet
  69. 46 _COM_1200 = BITSET(128); (* 1200 Baud *)
  70. ***** ^ undeclared identifier
  71. ***** ^ not supported yet
  72. 47 _COM_2400 = BITSET(160); (* 2400 Baud *)
  73. ***** ^ undeclared identifier
  74. ***** ^ not supported yet
  75. 48 _COM_4800 = BITSET(192); (* 4800 Baud *)
  76. ***** ^ undeclared identifier
  77. ***** ^ not supported yet
  78. 49 _COM_9600 = BITSET(224); (* 9600 Baud *)
  79. ***** ^ undeclared identifier
  80. ***** ^ not supported yet
  81. 50
  82. 51 (* constants for BIOS disk support *)
  83. 52
  84. 53 (* disk services *)
  85. 54 _DISK_RESET = 0; (* reset disk controller *)
  86. 55 _DISK_STATUS = 1; (* get disk status *)
  87. 56 _DISK_READ = 2; (* read disk sectors *)
  88. 57 _DISK_WRITE = 3; (* write disk sectors *)
  89. 58 _DISK_VERIFY = 4; (* verify disk sectors *)
  90. 59 _DISK_FORMAT = 5; (* format disk track *)
  91. 60
  92. 61 (* constants for BIOS keyboard support *)
  93. 62 _KEYBRD_READ = 0; (* read next character from keyboard *)
  94. 63 _KEYBRD_READY = 1; (* check for keystroke *)
  95. 64 _KEYBRD_SHIFTSTATUS = 2; (* get current shift key status *)
  96. 65
  97. 66 (* constants for BIOS printer support *)
  98. 67 _PRINTER_WRITE = 0; (* write character to printer *)
  99. 68 _PRINTER_INIT = 1; (* initialize printer *)
  100. 69 _PRINTER_STATUS = 2; (* get printer status *)
  101. 70
  102. 71 (* constants for BIOS time of day support *)
  103. 72 _TIME_GETCLOCK = 0; (* get current clock count *)
  104. 73 _TIME_SETCLOCK = 1; (* set current clock count *)
  105. 74
  106. 75 TYPE
  107. 76 diskinfo_t = RECORD
  108. 77 drive : CARDINAL;
  109. 78 head : CARDINAL;
  110. 79 track : CARDINAL;
  111. 80 sector : CARDINAL;
  112. 81 nsectors : CARDINAL;
  113. 82 buffer : ADDRESS;
  114. ***** ^ undeclared identifier
  115. 83 END;
  116. ***** ^ not supported yet
  117. 84
  118. 85 PROCEDURE bioscom(cmd:CARDINAL;byte:BYTE;port:CARDINAL):CARDINAL;
  119. ***** ^ undeclared identifier
  120. 86 PROCEDURE biosdisk(cmd,drive,head,track,sector,nsecs:CARDINAL;buf:ADDRESS):CARDINAL;
  121. ***** ^ undeclared identifier
  122. 87 PROCEDURE biosequip():BITSET;
  123. ***** ^ undeclared identifier
  124. 88 PROCEDURE bioskey(cmd:CARDINAL):CARDINAL;
  125. 89 PROCEDURE biosmemory():CARDINAL;
  126. 90 PROCEDURE biosprint(cmd:CARDINAL;byte:BYTE;port:CARDINAL):CARDINAL;
  127. ***** ^ undeclared identifier
  128. 91 PROCEDURE biostime(cmd:CARDINAL;newtime:LONGCARD);
  129. ***** ^ undeclared identifier
  130. 92
  131. 93 PROCEDURE _bios_equiplist():CARDINAL;
  132. 94 PROCEDURE _bios_keybrd(cmd:CARDINAL):CARDINAL;
  133. 95 PROCEDURE _bios_memsize():CARDINAL;
  134. 96 PROCEDURE _bios_printer(cmd,port,data:CARDINAL):CARDINAL;
  135. 97 PROCEDURE _bios_serialcom(cmd,port,data:CARDINAL):CARDINAL;
  136. 98 PROCEDURE _bios_timeofday(cmd:CARDINAL;VAR time:LONGCARD):CARDINAL;
  137. ***** ^ undeclared identifier
  138. 99 PROCEDURE _bios_disk(cmd:CARDINAL;VAR info:diskinfo_t):CARDINAL;
  139. 100
  140. 101 END bios.
  141. ***** ^ not supported yet
  142. 39 errors