home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Archive Magazine 1995
/
ARCHIVE95.iso
/
discs
/
shareware
/
share_36
/
ice
/
?IceUsage
next >
Wrap
Text File
|
1990-09-23
|
8KB
|
234 lines
_________________________________________________________________
/ \
/ IceManager \
/ \
< --== Improved Communications Enhancer ==-- >
\ /
\ Written by Carl Declerck (c)1990 /
\_________________________________________________________________/
This module is in the Public Domain. It may be used for whatever
non-commercial purposes. Modification of the code is prohibited!
Usage of the Ice SWI's
------------------------
Ice chunk number: &C0900
============================================================================
* SWI "Ice_Initialise"
&C0900
Entry: R0 = Receive baudrate (REAL)
R1 = Transmit baudrate (REAL)
R2 = Number of databits (8,7,6 or 5)
R3 = Number of stopbits (2 or 1)
R4 = Parity (0=none, 1=odd, 2=even)
Exit : - All registers are preserved
This SWI initialises the serial port of the Archimedes. The REAL baudrates
must be passed in R0 and R1 on entry, NOT the 4-bit equivalents that are
used with OS_SerialOp.
This SWI combines three seperate calls to Ice_SetReceiveRate,
Ice_SetTransmitRate and Ice_SetDataFormat respectively.
============================================================================
* SWI "Ice_ReadReceiveRate"
&C0901
Entry: -
Exit : R0 = Receive baudrate (REAL)
This SWI reads the current receive baudrate of the serial port.
============================================================================
* SWI "Ice_SetReceiveRate"
&C0902
Entry: R0 = New receive baudrate (REAL)
Exit : - All registers are preserved
This SWI sets a new receive baudrate for the serial port.
============================================================================
* SWI "Ice_ReadTransmitRate"
&C0903
Entry: -
Exit : R0 = Transmit baudrate (REAL)
This SWI reads the current transmit baudrate of the serial port.
============================================================================
* SWI "Ice_SetTransmitRate"
&C0904
Entry: R0 = New transmit baudrate (REAL)
Exit : - All registers are preserved
This SWI sets a new transmit baudrate for the serial port.
============================================================================
* SWI "Ice_ReadDataFormat"
&C0905
Entry: -
Exit : R0 = Number of databits (8,7,6 or 5)
R1 = Number of stopbits (2 or 1)
R2 = Parity (0=none, 1=odd, 2=even)
This SWI reads the current serial status, returning the dataformat bits
in registers R0-R2.
============================================================================
* SWI "Ice_SetDataFormat"
&C0906
Entry: R0 = Number of databits (8,7,6 or 5)
R1 = Number of stopbits (2 or 1)
R2 = Parity (0=none, 1=odd, 2=even)
Exit : - All registers are preserved
This SWI sets the serial status, taking in R0-R2 the bit-specifications
for the dataformat.
============================================================================
* SWI "Ice_GetByte"
&C0907
Entry: -
Exit : R0 = Byte read from serial input-buffer, or -1 if buffer was
empty.
This SWI reads a byte from the serial input-buffer. If reading was
succesful, R0 contains the byte read, otherwise, if the input-buffer was
empty, R0 contains -1.
============================================================================
* SWI "Ice_SendByte"
&C0908
Entry: R0 = Byte to be sent.
Exit : R0 = Byte put in output-buffer, or -1 if buffer was full.
This SWI puts a byte into the serial output-buffer. If the buffer was
already full, R0 contains -1 on exit, and the byte was not sent.
============================================================================
* SWI "Ice_SendString"
&C0909
Entry: R0 = Pointer to control-character terminated string.
Exit : R0 = Number of characters actually sent.
This SWI sends a string, byte per byte, to the output-buffer. Any character
with ASCII-value smaller than 27 terminates the string. When, during the
sending of the string, the output-buffer gets full, sending is aborted.
On exit, R0 will contain the number of characters sent, which equals the
string-length if sending was succesful.
============================================================================
* SWI "Ice_LowerDTR"
&C090A
Entry: -
Exit : - All registers are preserved
This SWI sets the DTR bit in the status mask, and thus lowers the DTR-line
to the modem. This lowering of the DTR is very handy for hanging up the
modem.
============================================================================
* SWI "Ice_RaiseDTR"
&C090B
Entry: -
Exit : - All registers are preserved
This SWI clears the DTR bit in the status mask, and thus raises the DTR-
line to the modem. The DTR must be raised for sending data to the modem.
============================================================================
* SWI "Ice_CarrierDetect"
&C090C
Entry: -
Exit : R0 = 0 if no carrier was detected, or 1 if a carrier was
detected.
This SWI reads the DCD bit from the status mask, and returns in R0 the
status of this bit. Reading this bit regularly after a connection was
established informs you whether there still is a connection or not.
============================================================================
* SWI "Ice_WriteANSI"
&C090D
Entry: R0 = Character to be written (or ANSI-interpreted).
Exit : - All registers are preserved.
This SWI provides an ANSI Escape Sequence emulator. Many BBS's use color
coding for their text, conforming to the ANSI standard. Using this SWI to
print all incoming characters will result in these color-codes being
interpreted. Apart from color-codes, the ANSI standard also provides easy
cursor-positioning control and some other display-controls.
On entry, R0 should contain the character to be printed. The emulator will
take appropriate action depending on its ASCII-value.
============================================================================
* SWI "Ice_RemoteControl"
&C090E
Entry: -
Exit : - All registers are preserved.
This SWI switches your Archimedes to remote-control mode. In this mode,
all input and output goes via the serial port, which means you can control
your Arc from whatever terminal that is attached to the serial port.
============================================================================
* SWI "Ice_LocalControl"
&C090F
Entry: -
Exit : - All registers are preserved.
This SWI puts your Archimedes back in local-control mode. This is the
state the Arc is in when you switch it on.
============================================================================
Carl Declerck.