home *** CD-ROM | disk | FTP | other *** search
- Last update: 17/7/96
-
- NewsFlash SWI's
-
- NewsFlash_Version
- ===================================================================
-
- On exit:
-
- R0 = Version string
- R1 = Version (&RRRRHHLL)
-
- ===================================================================
-
- NewsFlash_Acknowledge
-
- On entry:
-
- R0 = Line number
- R1 = Acknowledge word (0 for read time)
-
- On exit:
-
- R0 = Time remaining to acknowledge (centiseconds)
-
- ===================================================================
-
- NewsFlash_HangUp
-
- On entry:
-
- R0 = Line number
-
- Use:
-
- This will disconnect a user from the given line and close all files
- that were open for that line, ready for the line to be logged onto
- again via 'NewsFlash_Logon'
-
- ===================================================================
-
- NewsFlash_LineInfo
-
- On entry:
-
- R0 = Line number (from 0)
-
- On exit:
-
- R0 preserved
- R1 = Baud rate
- R2 = User number
- R3 = Pointer to user name
- R4 = Pointer to current area
-
- Use:
-
- This call provides information on any one of the lines, suitable
- for doing an online userlist (which NewsFlash itself uses it for) or
- perhaps a chat conference.
-
- ===================================================================
-
- NewsFlash_LineStatus
-
- On entry:
-
- R0 = Line number (from 0)
-
- On exit:
-
- R0 = Flags:
-
- bit 0 - Busy
- bit 1 - File xfer
- bit 2 - claimed
- bit 3 - chatting
- bit 4 - line is 'safe'
- bit 5 - more enabled
- bit 6 - file base opened
- bit 7 - file area is loaded
- bit 8 - file is loaded
- bit 9 - Grab screen/redraw screen
- bit 10 - Release line when buffer has emptied (door)
- bit 11 - Release line when buffer has emptied (chat)
- bit 12 - Screen is grabbed (low)
- bit 13 - message base opened
- bit 14 - message area is loaded
- bit 15 - message is loaded
- bit 16 - local logon
- bit 17 - terminal mode
- bit 18 - file base loaded
- bit 19 - message base loaded
-
- R1 = Task handle of claimer (0 if not claimed)
-
- R2 = Pointer to door tx buffer details:
-
- R2+0 = Size of tx buffer
- R2+4 = # of bytes in tx buffer
-
- R3 = Pointer to door rx buffer details:
-
- R3+0 = Size of rx buffer
- R3+4 = # of bytes in rx buffer
-
- Use:
-
- This call provides information on any one of the lines, suitable
- for doing an online userlist (which NewsFlash itself uses it for) or
- perhaps a chat conference.
-
- ===================================================================
-
- NewsFlash_GenerateError
-
- On entry:
-
- R0 = Line number
- R1 = Pointer to error string
-
- This call is not used at mo.
-
- ===================================================================
-
- NewsFlash_ClaimLine
-
- On entry:
-
- R0 = Line number
- R1 = Non-zero to grab screen (to allow a redraw)
- R2 = Pointer to buffer details (0 for default buffer)
- R3 = Your task handle
-
- R2+0 = Pointer to tx buffer
- R2+4 = Size of tx buffer
- R2+8 = Pointer to rx buffer
- R2+12 = Size of rx buffer
-
- On exit:
-
- R0 = 0 if succesfully claimed
- R0 = -1 if unable to claim
- R0 = -2 if already claimed (you may use the line but must not
- release it)
- R1 = Pointer to serial driver (0 if unavailable)
-
- Use:
-
- This call is used by doors to pause all action on a line and allow data to be
- sent by the door.
-
- Buffers must be used as data has to be stored until the next time NewsFlash
- gets a Wimp_Poll when the data can be sent. This is because the serial driver
- may be stored in user memory. Also, the data must pass through the snoop
- window.
-
- If you wish to provide your own buffers (in R2) then the buffers must be in
- RMA (non user memory) so that they will always be accessable. The default
- buffers are 512 bytes in each direction.
-
- ===================================================================
-
- NewsFlash_ReleaseLine
-
- On entry:
-
- R0 = Line number
- R1 = Non zero to redraw (screen must have been grabbed)
-
- On exit:
-
- R0 = 0 if succesfully released
- R0 = -1 if unable to release
-
- Use:
-
- This call will release a claimed line and close the data transfer
- buffers.
-
- ===================================================================
-
- NewsFlash_SendByte
-
- On entry:
-
- R0 = Line number (line must be claimed)
- R1 = Byte to send
-
- On exit:
-
- R1 = -1 if byte could not be sent
-
- Use:
-
- This call will add a single byte to the tx buffer of any claimed
- line.
-
- ===================================================================
-
- NewsFlash_SendMany
-
- On entry:
-
- R0 = Line number (line must be claimed)
- R1 = Pointer to bytes to send
- R2 = Number of bytes to send
-
- On exit:
-
- R0 preserved
- R1 = Updated pointer
- R2 = Number of bytes remaining
-
- Use:
-
- This call will add any number of bytes to the tx buffer of any
- claimed line.
-
- Not all the data may be sent on one call if the buffer has filled.
- So the call should be used as follows:
-
- line% = Any claimed line
- pos% = Pointer to data to be sent
- left% = Amount of data to send
-
- REPEAT
- SYS "NewsFlash_SendMany",line%,pos%,left% TO ,pos%,left%
- IF left%>0 PROCwimppoll
- UNTIL left%=0
-
- ===================================================================
-
- NewsFlash_GetByte
-
- On entry:
-
- R0 = Line number (line must be claimed)
-
- On exit:
-
- R0 preserved
- R1 = Byte received (-1 for none)
-
- Use:
-
- This call will take a byte from the rx buffer of any claimed line.
-
- ===================================================================
-
- NewsFlash_GetMany
-
- On entry:
-
- R0 = Line number (line must be claimed)
- R1 = Pointer to buffer
- R2 = Max number of bytes to put in buffer
-
- On exit:
-
- R0 preserved
- R1 = Updated pointer
- R2 = Number of bytes put into buffer
-
- Use:
-
- This call will take any number of bytes from the rx buffer of any
- claimed line.
-
- ===================================================================
-
- NewsFlash_StartChat
-
- On entry:
-
- R0 = Line number
- R1 = Chat type
- 0 - Normal
- 1 - Split screen
- R2 = Pointer to string to send
-
- On exit:
-
- R0 = 0 if request granted or -1 if denied
-
- ===================================================================
-
- NewsFlash_FinishChat
-
- On entry:
-
- R0 = Line number
- R1 = Pointer to string to send
-
- ===================================================================
-
- NewsFlash_ChatSend
-
- On entry:
-
- R0 = Line number
- R1 = Byte to send
-
- On exit:
-
- R0 = 0 if byte sent or -1 if could not be sent
-
- ===================================================================
-
- NewsFlash_ChatRead
-
- On entry:
-
- R0 = Line number
-
- On exit:
-
- R1 = byte read (-1 for none)
-
- ===================================================================
-
- NewsFlash_VDU
-
- On entry:
-
- R0 = Line number
- R1 = VDU code
- R2 and above depend on VDU code
-
- On exit:
-
- R0 = -1 if not enough space in buffer
- R0 = 0 if sent
-
- Use:
-
- This call can be used to perform (non-standard) VDU operations. NewsFlash will
- send the appropriate terminal string, depending on what terminal the user has
- chosen.
-
- ===================================================================
-
- NewsFlash_StartFileTransfer
-
- On entry:
-
- R0 = Line number (must be claimed)
- R1 = File handle of file to send
-
- -1 : Skip current file (if any), R2 ignored
- 0 : Abort current transfer (if any), R2 ignored
-
- R2 = Protocol:
-
- 0 : X-Modem
- 1 : X-Modem CRC
- 2 : X-Modem 1K
- 3 : Y Modem
- 4 : Y Modem batch
- 5 : Z Modem
-
- bit 30 - Do not initialise transfer (ie. continuation of batch)
- bit 31 - Do not finalise transfer (ie. allow continuation of batch)
-
- R3 = Pointer to alternative filename (0 for none)
- R4 = reserved..must be set to 0
-
- On exit:
-
- R0 = 0 if started succesfully, otherwise points to error string
-
- ===================================================================
-
- NewsFlash_FileTransferStatus
-
- On entry:
-
- R0 = Line number
-
- On exit:
-
- R0 = Protocol (-1 for no transfer in progress, -2 for unknown)
- R1 = Pointer to filename (must not be overwritten, 0 for unknown)
- R2 = File area (0 for unknown)
- R3 = Size of file
- R4 = Bytes transferred
- R5 = OS_ReadMonotonicTime value xfer was started at
- R6 = Number of errors
- R7 = Direction (0 for send (download), 1 for receive (upload) )
-
- ===================================================================
-
- NewsFlash_CLIAccess
-
- On entry:
-
- R0 = Pointer to CLI command
- R1 = New access (or -1 to read)
-
- On exit:
-
- R1 = Old access
-
- The access words are of the form &KKLLLLLL where K is the key number needed
- (from 1) and L is the user level required.
-
- An access word of 0 will mean anyone can use the command. A user must have
- both key K and user level L.
-
- ===================================================================
-
- by Chris Davis
-
- e-mail : Fidonet # 2:253/417.6
- Internet chris@armadilo.demon.co.uk
-