home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / n / newsflash / !FileBase / !NewsFlash / Docs / Developers / NFSWI's < prev    next >
Encoding:
Text File  |  1996-07-17  |  8.4 KB  |  416 lines

  1. Last update: 17/7/96
  2.  
  3. NewsFlash SWI's
  4.  
  5. NewsFlash_Version
  6. ===================================================================
  7.  
  8. On exit:
  9.  
  10.    R0 = Version string
  11.    R1 = Version (&RRRRHHLL)
  12.  
  13. ===================================================================
  14.  
  15. NewsFlash_Acknowledge
  16.  
  17. On entry:
  18.  
  19.    R0 = Line number
  20.    R1 = Acknowledge word (0 for read time)
  21.    
  22. On exit:
  23.  
  24.    R0 = Time remaining to acknowledge (centiseconds)
  25.  
  26. ===================================================================
  27.  
  28. NewsFlash_HangUp
  29.  
  30. On entry:
  31.  
  32.    R0 = Line number
  33.  
  34. Use:
  35.  
  36. This will disconnect a user from the given line and close all files
  37. that were open for that line, ready for the line to be logged onto
  38. again via 'NewsFlash_Logon'
  39.  
  40. ===================================================================
  41.  
  42. NewsFlash_LineInfo
  43.  
  44. On entry:
  45.  
  46.    R0 = Line number (from 0)
  47.    
  48. On exit:
  49.  
  50.    R0 preserved
  51.    R1 = Baud rate
  52.    R2 = User number
  53.    R3 = Pointer to user name
  54.    R4 = Pointer to current area
  55.  
  56. Use:
  57.  
  58. This call provides information on any one of the lines, suitable
  59. for doing an online userlist (which NewsFlash itself uses it for) or
  60. perhaps a chat conference.
  61.  
  62. ===================================================================
  63.  
  64. NewsFlash_LineStatus
  65.  
  66. On entry:
  67.  
  68.    R0 = Line number (from 0)
  69.    
  70. On exit:
  71.  
  72. R0 = Flags:
  73.  
  74.      bit 0  - Busy
  75.      bit 1  - File xfer
  76.      bit 2  - claimed
  77.      bit 3  - chatting
  78.      bit 4  - line is 'safe'
  79.      bit 5  - more enabled
  80.      bit 6  - file base opened
  81.      bit 7  - file area is loaded
  82.      bit 8  - file is loaded
  83.      bit 9  - Grab screen/redraw screen
  84.      bit 10 - Release line when buffer has emptied (door)
  85.      bit 11 - Release line when buffer has emptied (chat)
  86.      bit 12 - Screen is grabbed (low)
  87.      bit 13 - message base opened
  88.      bit 14 - message area is loaded
  89.      bit 15 - message is loaded
  90.      bit 16 - local logon
  91.      bit 17 - terminal mode
  92.      bit 18 - file base loaded
  93.      bit 19 - message base loaded
  94.  
  95. R1 = Task handle of claimer (0 if not claimed)
  96.  
  97. R2 = Pointer to door tx buffer details:
  98.  
  99. R2+0 = Size of tx buffer
  100. R2+4 = # of bytes in tx buffer
  101.  
  102. R3 = Pointer to door rx buffer details:
  103.  
  104. R3+0 = Size of rx buffer
  105. R3+4 = # of bytes in rx buffer
  106.  
  107. Use:
  108.  
  109. This call provides information on any one of the lines, suitable
  110. for doing an online userlist (which NewsFlash itself uses it for) or
  111. perhaps a chat conference.
  112.  
  113. ===================================================================
  114.  
  115. NewsFlash_GenerateError
  116.  
  117. On entry:
  118.  
  119. R0 = Line number
  120. R1 = Pointer to error string
  121.  
  122. This call is not used at mo.
  123.  
  124. ===================================================================
  125.  
  126. NewsFlash_ClaimLine
  127.  
  128. On entry:
  129.  
  130. R0 = Line number
  131. R1 = Non-zero to grab screen (to allow a redraw)
  132. R2 = Pointer to buffer details (0 for default buffer)
  133. R3 = Your task handle
  134.  
  135. R2+0  = Pointer to tx buffer
  136. R2+4  = Size of tx buffer
  137. R2+8  = Pointer to rx buffer
  138. R2+12 = Size of rx buffer
  139.  
  140. On exit:
  141.  
  142. R0 =  0 if succesfully claimed
  143. R0 = -1 if unable to claim
  144. R0 = -2 if already claimed (you may use the line but must not
  145.         release it)
  146. R1 = Pointer to serial driver (0 if unavailable)
  147.  
  148. Use:
  149.  
  150. This call is used by doors to pause all action on a line and allow data to be
  151. sent by the door.
  152.  
  153. Buffers must be used as data has to be stored until the next time NewsFlash
  154. gets a Wimp_Poll when the data can be sent. This is because the serial driver
  155. may be stored in user memory. Also, the data must pass through the snoop
  156. window.
  157.  
  158. If you wish to provide your own buffers (in R2) then the buffers must be in
  159. RMA (non user memory) so that they will always be accessable. The default
  160. buffers are 512 bytes in each direction.
  161.  
  162. ===================================================================
  163.  
  164. NewsFlash_ReleaseLine
  165.  
  166. On entry:
  167.  
  168. R0 = Line number
  169. R1 = Non zero to redraw (screen must have been grabbed)
  170.  
  171. On exit:
  172.  
  173. R0 =  0 if succesfully released
  174. R0 = -1 if unable to release
  175.  
  176. Use:
  177.  
  178. This call will release a claimed line and close the data transfer
  179. buffers.
  180.  
  181. ===================================================================
  182.  
  183. NewsFlash_SendByte
  184.  
  185. On entry:
  186.  
  187.    R0 = Line number (line must be claimed)
  188.    R1 = Byte to send
  189.  
  190. On exit:
  191.  
  192.    R1 = -1 if byte could not be sent
  193.  
  194. Use:
  195.    
  196. This call will add a single byte to the tx buffer of any claimed
  197. line.
  198.  
  199. ===================================================================
  200.  
  201. NewsFlash_SendMany
  202.  
  203. On entry:
  204.  
  205.    R0 = Line number (line must be claimed)
  206.    R1 = Pointer to bytes to send
  207.    R2 = Number of bytes to send
  208.    
  209. On exit:
  210.  
  211.    R0 preserved
  212.    R1 = Updated pointer
  213.    R2 = Number of bytes remaining
  214.    
  215. Use:
  216.  
  217. This call will add any number of bytes to the tx buffer of any
  218. claimed line.
  219.  
  220. Not all the data may be sent on one call if the buffer has filled.
  221. So the call should be used as follows:
  222.  
  223. line%  = Any claimed line
  224. pos%   = Pointer to data to be sent
  225. left%  = Amount of data to send
  226.  
  227. REPEAT
  228. SYS "NewsFlash_SendMany",line%,pos%,left% TO ,pos%,left%
  229. IF left%>0 PROCwimppoll
  230. UNTIL left%=0
  231.                       
  232. ===================================================================
  233.  
  234. NewsFlash_GetByte
  235.  
  236. On entry:
  237.  
  238.    R0 = Line number (line must be claimed)
  239.    
  240. On exit:
  241.  
  242.    R0 preserved
  243.    R1 = Byte received (-1 for none)
  244.  
  245. Use:
  246.  
  247. This call will take a byte from the rx buffer of any claimed line.
  248.  
  249. ===================================================================
  250.  
  251. NewsFlash_GetMany
  252.  
  253. On entry:
  254.  
  255.    R0 = Line number (line must be claimed)
  256.    R1 = Pointer to buffer
  257.    R2 = Max number of bytes to put in buffer
  258.    
  259. On exit:
  260.  
  261.    R0 preserved
  262.    R1 = Updated pointer
  263.    R2 = Number of bytes put into buffer
  264.  
  265. Use:
  266.    
  267. This call will take any number of bytes from the rx buffer of any
  268. claimed line.
  269.  
  270. ===================================================================
  271.  
  272. NewsFlash_StartChat
  273.  
  274. On entry:
  275.  
  276.    R0 = Line number
  277.    R1 = Chat type
  278.         0 - Normal
  279.         1 - Split screen
  280.    R2 = Pointer to string to send
  281.  
  282. On exit:
  283.  
  284.    R0 = 0 if request granted or -1 if denied
  285.    
  286. ===================================================================
  287.  
  288. NewsFlash_FinishChat
  289.  
  290. On entry:
  291.  
  292.    R0 = Line number
  293.    R1 = Pointer to string to send
  294.    
  295. ===================================================================
  296.  
  297. NewsFlash_ChatSend
  298.  
  299. On entry:
  300.  
  301.    R0 = Line number
  302.    R1 = Byte to send
  303.  
  304. On exit:
  305.  
  306.    R0 = 0 if byte sent or -1 if could not be sent
  307.  
  308. ===================================================================
  309.  
  310. NewsFlash_ChatRead
  311.  
  312. On entry:
  313.  
  314.    R0 = Line number
  315.  
  316. On exit:
  317.  
  318.    R1 = byte read (-1 for none)
  319.  
  320. ===================================================================
  321.  
  322. NewsFlash_VDU
  323.  
  324. On entry:
  325.  
  326.    R0 = Line number
  327.    R1 = VDU code
  328.    R2 and above depend on VDU code
  329.    
  330. On exit:
  331.  
  332.    R0 = -1 if not enough space in buffer
  333.    R0 = 0 if sent
  334.  
  335. Use:
  336.  
  337. This call can be used to perform (non-standard) VDU operations. NewsFlash will
  338. send the appropriate terminal string, depending on what terminal the user has
  339. chosen.
  340.  
  341. ===================================================================
  342.  
  343. NewsFlash_StartFileTransfer
  344.  
  345. On entry:
  346.  
  347. R0 = Line number (must be claimed)
  348. R1 = File handle of file to send
  349.  
  350. -1 : Skip current file (if any), R2 ignored
  351.  0 : Abort current transfer (if any), R2 ignored
  352.  
  353. R2 = Protocol:
  354.  
  355.  0 : X-Modem
  356.  1 : X-Modem CRC
  357.  2 : X-Modem 1K
  358.  3 : Y Modem
  359.  4 : Y Modem batch
  360.  5 : Z Modem
  361.  
  362. bit 30 - Do not initialise transfer (ie. continuation of batch)
  363. bit 31 - Do not finalise transfer (ie. allow continuation of batch)
  364.  
  365. R3 = Pointer to alternative filename (0 for none)
  366. R4 = reserved..must be set to 0
  367.  
  368. On exit:
  369.  
  370. R0 = 0 if started succesfully, otherwise points to error string
  371.  
  372. ===================================================================
  373.  
  374. NewsFlash_FileTransferStatus
  375.  
  376. On entry:
  377.  
  378. R0 = Line number
  379.  
  380. On exit:
  381.  
  382. R0 = Protocol (-1 for no transfer in progress, -2 for unknown)
  383. R1 = Pointer to filename (must not be overwritten, 0 for unknown)
  384. R2 = File area (0 for unknown)
  385. R3 = Size of file
  386. R4 = Bytes transferred
  387. R5 = OS_ReadMonotonicTime value xfer was started at
  388. R6 = Number of errors
  389. R7 = Direction (0 for send (download), 1 for receive (upload) )
  390.  
  391. ===================================================================
  392.  
  393. NewsFlash_CLIAccess
  394.  
  395. On entry:
  396.  
  397. R0 = Pointer to CLI command
  398. R1 = New access (or -1 to read)
  399.  
  400. On exit:
  401.  
  402. R1 = Old access 
  403.  
  404. The access words are of the form &KKLLLLLL where K is the key number needed
  405. (from 1) and L is the user level required.
  406.  
  407. An access word of 0 will mean anyone can use the command. A user must have
  408. both key K and user level L.
  409.  
  410. ===================================================================
  411.  
  412. by Chris Davis
  413.  
  414. e-mail : Fidonet # 2:253/417.6
  415.          Internet  chris@armadilo.demon.co.uk
  416.