home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / pocketbk / utilsm / psionics / SysCalls.2 < prev    next >
Text File  |  1994-10-25  |  34KB  |  1,064 lines

  1. PSIONICS FILE - SYSCALLS.2
  2. ==========================
  3. System calls (part 2)
  4. Last modified 1994-09-06
  5. ========================
  6.  
  7. See part 1 for general notes and explanations.
  8.  
  9.  
  10. Fn $88 Sub $00
  11. ProcId
  12.     AX: -> process ID of the current process
  13. Gets the process ID of the current process.
  14.  
  15.  
  16. Fn $88 Sub $01
  17. ProcIdByName fails
  18.     AX: -> process ID
  19.     BX: (cstr) pattern
  20. Gets the process ID of a process whose name matches the pattern (usual
  21. wildcards apply, and case is ignored).
  22.  
  23.  
  24. Fn $88 Sub $02
  25. ProcGetPriority fails
  26.     AL: -> priority
  27.     BX: process ID
  28. Gets the priority of the specified process.
  29.  
  30.  
  31. Fn $88 Sub $03
  32. ProcSetPriority fails
  33.     AL: new priority
  34.     BX: process ID
  35. Sets the priority of the specified process.
  36.  
  37.  
  38. Fn $88 Sub $04 should not be used.
  39.  
  40.  
  41. Fn $88 Sub $05
  42. ProcCreateTask
  43. Tasks are processes which share the data segment of another process. They
  44. cannot be conveniently handled in OPL.
  45.  
  46.  
  47. Fn $88 Sub $06
  48. ProcResume fails
  49.     BX: process ID
  50. Take a process out of the suspended state and start it executing.
  51.  
  52.  
  53. Fn $88 Sub $07
  54. ProcSuspend fails
  55.     BX: process ID
  56. Place a process in the suspended state. If the process is waiting for a system
  57. service (e.g. a semaphore), then it will be suspended when the service has
  58. been carried out.
  59.  
  60.  
  61. Fn $88 Sub $08
  62. ProcKill fails
  63.     AL: reason code
  64.     BX: process ID
  65. Kills the specified process, without allowing it to execute any cleanup code.
  66. Only use this on the current process or in emergencies.
  67.  
  68.  
  69. Fn $88 Sub $09
  70. ProcPanicById fails
  71.     AL: panic code
  72.     BX: process ID
  73. Simulate the specified panic on the specified process.
  74.  
  75.  
  76. Fn $88 Sub $0A
  77. ProcNameById fails
  78.     BX: process ID
  79.     DI: 13 byte buffer
  80. Places the name (a cstr) of the specified process in the buffer.
  81.  
  82.  
  83. Fn $88 Sub $0B
  84. ProcFind fails
  85.     AX: -> process ID
  86.     BX: 0 or process ID
  87.     SI: 14 byte buffer
  88.     DI: (cstr) pattern
  89. Obtains process IDs for processes whose name matches the pattern ("?" and "*"
  90. wildcards have their Unix meaning, and case is ignored). BX should be zero to
  91. return the first matching process, or the process ID returned by a previous
  92. call to return subsequent matching processes. Process are returned in *task*
  93. ID order. The buffer is filled with a cstr giving the process name.
  94.  
  95.  
  96. Fn $88 Sub $0C
  97. ProcRename fails
  98.     BX: process ID
  99.     DI: (cstr) new name
  100. Rename the specified process; the new name must be between 1 and 8 characters.
  101.  
  102.  
  103. Fn $88 Sub $0D
  104. ProcTerminate fails
  105.     BX: process ID
  106. Terminates the indicated process. The process will be sent a termination
  107. message if it has so requested, and will be killed otherwise.
  108.  
  109.  
  110. Fn $88 Sub $0E
  111. ProcOnTerminate
  112.     BX: message type
  113. When the current process is terminated, it will be sent a message of the
  114. specified type; type 0 cancels the request. After receiving the message and
  115. executing any clean-up code, the process should use ProcKill to kill itself.
  116.  
  117.  
  118. Fn $88 Sub $0F is reserved for the Shell process.
  119.  
  120.  
  121. Fn $88 Sub $10
  122. ProcGetOwner fails
  123.     AX: -> owning process ID
  124.     BX: process ID
  125. Gets the ID of the process owning the specified process (normally the
  126. creator of that process).
  127.  
  128.  
  129. Fn $89 Sub $00
  130. TimSleepForTenths fails
  131.     CX: high half of delay
  132.     DX: low half of delay
  133. Sleep for the specified delay (in units of 0.1 seconds). Changing the system
  134. clock does not affect the call. Only time when the machine is switched on is
  135. measured; any time when the machine is switched off will be in addition to
  136. the requested delay.
  137.  
  138.  
  139. Fn $89 Sub $01
  140. TimSleepForTicks fails
  141.     CX: high half of delay
  142.     DX: low half of delay
  143. Sleep for the specified delay (in system ticks; there are 32 ticks per second
  144. on the Series 3 and 18.2 on the PC emulation). Changing the system clock does
  145. not affect the call. Only time when the machine is switched on is measured;
  146. any time when the machine is switched off will be in addition to the requested
  147. delay.
  148.  
  149.  
  150. Fn $89 Sub $02
  151. TimGetSystemTime
  152.     AX: -> high half of system clock
  153.     BX: -> low half of system clock
  154. Reads the system clock (an abstime).
  155.  
  156.  
  157. Fn $89 Sub $03
  158. TimSetSystemTime
  159.     CX: high half of new system clock
  160.     DX: low half of new system clock
  161. Sets the system clock to the given abstime.
  162.  
  163.  
  164. Fn $89 Sub $04
  165. TimSystemTimeToDaySeconds
  166.     CX: high half of abstime
  167.     DX: low half of abstime
  168.     DI: 8 byte buffer
  169. Splits an abstime into a day number and an interval, placed in the buffer as
  170. follows:
  171.   Offset  0 (long): day number
  172.   Offset  4 (long): interval
  173.  
  174.  
  175. Fn $89 Sub $05
  176. TimDaySecondsToSystemTime fails
  177.     AX: -> high half of abstime
  178.     BX: -> low half of abstime
  179.     DI: 8 byte buffer
  180. Converts a day number and an interval to an abstime. The former are in the
  181. buffer, in the same format as TimSystemTimeToDaySeconds.
  182.  
  183.  
  184. Fn $89 Sub $06
  185. TimDaySecondsToDate fails
  186.     SI: 8 byte buffer (day number and interval)
  187.     DI: 8 byte buffer (broken down time)
  188. Converts a day number and an interval to broken-down time information. The
  189. former is in the same format as TimSystemTimeToDaySeconds. The latter is in
  190. the format:
  191.   Offset  0 (byte): year - 1900
  192.   Offset  1 (byte): month (0 = January, 11 = December)
  193.   Offset  2 (byte): day - 1
  194.   Offset  3 (byte): hours
  195.   Offset  4 (byte): minutes
  196.   Offset  5 (byte): seconds
  197.   Offset  6 (word): day number in year (0 to 364 or to 365)
  198.  
  199.  
  200. Fn $89 Sub $07
  201. TimDateToDaySeconds fails
  202.     SI: 8 byte buffer (broken down time)
  203.     DI: 8 byte buffer (day number and interval)
  204. Converts broken-down time to a day number and an interval.
  205.  
  206.  
  207. Fn $89 Sub $08
  208. TimDaysInMonth fails
  209.     AX: -> number of days in month
  210.     CX: month * 256 + year - 1900
  211. Gets the number of days in the specified month (0 = January, 11 = December).
  212.  
  213.  
  214. Fn $89 Sub $09
  215. TimDayOfWeek
  216.     AX: -> day of week (0 = Monday, 6 = Sunday)
  217.     CX: high half of day number
  218.     DX: low half of day number
  219. Gets the day of the week of the given date.
  220.  
  221.  
  222. Fn $89 Sub $0A
  223. TimNameOfDay fails
  224.     AL: day of week (0 = Monday, 6 = Sunday)
  225.     BX: 33 byte buffer
  226. The buffer is filled with a cstr giving the name of that day of the week.
  227.  
  228.  
  229. Fn $89 Sub $0B
  230. TimNameOfMonth fails
  231.     AL: month (0 = January, 11 = December)
  232.     BX: 33 byte buffer
  233. The buffer is filled with a cstr giving the name of that month.
  234.  
  235.  
  236. Fn $89 Sub $0C
  237. TimWaitAbsolute fails
  238.     CX: high half of abstime
  239.     DX: low half of abstime
  240. Sleep this process until the specified abstime. If the machine is turned off
  241. at that time, it will turn back on. Changing the system clock will affect
  242. when the call returns.
  243.  
  244.  
  245. Fn $89 Sub $0D
  246. TimWeekNumber fails
  247.     AX: -> week number (1 to 53)
  248.     CX: high half of day number
  249.     DX: low half of day number
  250. Gets the week number of the specified day.
  251.  
  252.  
  253. Fn $89 Sub $0E
  254. TimNameOfDayAbb v3 fails
  255.     AL: day of week (0 = Monday, 6 = Sunday)
  256.     BX: 4 byte buffer
  257. The buffer is filled with a cstr giving the abbreviated name of that day of
  258. the week.
  259.  
  260.  
  261. Fn $89 Sub $0F
  262. TimNameOfMonthAbb v3 fails
  263.     AL: month (0 = January, 11 = December)
  264.     BX: 4 byte buffer
  265. The buffer is filled with a cstr giving the abbreviated name of that month.
  266.  
  267.  
  268. Fn $8A Sub $00
  269. ConvUnsignedIntToBuffer
  270.     AX: -> length of converted value
  271.     BX: value to be converted
  272.     CX: radix
  273.     DI: buffer to hold converted value
  274. The value is converted to a string in the specified radix and written to the
  275. buffer. No trailing zero byte is written; instead, the length of the string
  276. is returned. The radix can be any value from 2 to 200. If the radix is 11 or
  277. greater, digits greater than 9 are written as "A", "B", etc; characters other
  278. than digits and uppercase letters are used when the radix is 37 or more.
  279.  
  280.  
  281. Fn $8A Sub $01
  282. ConvUnsignedLongIntToBuffer
  283.     AX: -> length of converted value
  284.     BX: low half of value to be converted
  285.     CX: radix
  286.     DX: high half of value to be converted
  287.     DI: buffer to hold converted value
  288. The value is converted to a string, in the same way as ConvUnsignedIntToBuffer.
  289.  
  290.  
  291. Fn $8A Sub $02
  292. ConvIntToBuffer
  293.     AX: -> length of converted value
  294.     BX: value to be converted
  295.     DI: buffer to hold converted value
  296. The value is converted to a string in radix 10 and written to the buffer. If
  297. the value is negative, a leading "-" will be included. No trailing zero byte
  298. is written; instead, the length of the string is returned.
  299.  
  300.  
  301. Fn $8A Sub $03
  302. ConvLongIntToBuffer
  303.