home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / a / arcdoor / !ArcDoor / IceUsage < prev    next >
Text File  |  1990-09-23  |  8KB  |  234 lines

  1.       _________________________________________________________________
  2.      /                                                                 \
  3.     /                              IceManager                           \
  4.    /                                                                     \
  5.   <              --==  Improved  Communications  Enhancer  ==--           >
  6.    \                                                                     /
  7.     \                   Written by Carl Declerck (c)1990                /
  8.      \_________________________________________________________________/
  9.  
  10.        This module is in the Public Domain. It may be used for whatever 
  11.        non-commercial purposes. Modification of the code is prohibited!
  12.  
  13.                             Usage of the Ice SWI's
  14.                            ------------------------
  15.  
  16. Ice chunk number: &C0900                         
  17.  
  18. ============================================================================
  19.  
  20. * SWI "Ice_Initialise" 
  21.       &C0900                                            
  22.  
  23.       Entry: R0 = Receive baudrate (REAL)
  24.              R1 = Transmit baudrate (REAL)
  25.              R2 = Number of databits (8,7,6 or 5)
  26.              R3 = Number of stopbits (2 or 1)
  27.              R4 = Parity (0=none, 1=odd, 2=even)
  28.  
  29.       Exit : - All registers are preserved
  30.   
  31.   This SWI initialises the serial port of the Archimedes. The REAL baudrates
  32.   must be passed in R0 and R1 on entry, NOT the 4-bit equivalents that are
  33.   used with OS_SerialOp.
  34.   This SWI combines three seperate calls to Ice_SetReceiveRate, 
  35.   Ice_SetTransmitRate and Ice_SetDataFormat respectively.                   
  36.  
  37. ============================================================================
  38.  
  39. * SWI "Ice_ReadReceiveRate"
  40.       &C0901
  41.  
  42.       Entry: -
  43.  
  44.       Exit : R0 = Receive baudrate (REAL)
  45.     
  46.   This SWI reads the current receive baudrate of the serial port.
  47.                                                                             
  48. ============================================================================
  49.  
  50. * SWI "Ice_SetReceiveRate"
  51.       &C0902
  52.  
  53.       Entry: R0 = New receive baudrate (REAL)
  54.  
  55.       Exit : - All registers are preserved
  56.  
  57.   This SWI sets a new receive baudrate for the serial port.                 
  58.  
  59. ============================================================================
  60.  
  61. * SWI "Ice_ReadTransmitRate"
  62.       &C0903
  63.  
  64.       Entry: -
  65.  
  66.       Exit : R0 = Transmit baudrate (REAL)
  67.  
  68.   This SWI reads the current transmit baudrate of the serial port.          
  69.  
  70. ============================================================================
  71.  
  72. * SWI "Ice_SetTransmitRate"
  73.       &C0904
  74.  
  75.       Entry: R0 = New transmit baudrate (REAL)
  76.  
  77.       Exit : - All registers are preserved
  78.  
  79.   This SWI sets a new transmit baudrate for the serial port.                
  80.  
  81. ============================================================================
  82.  
  83. * SWI "Ice_ReadDataFormat"
  84.       &C0905
  85.  
  86.       Entry: -
  87.  
  88.       Exit : R0 = Number of databits (8,7,6 or 5)
  89.              R1 = Number of stopbits (2 or 1)
  90.              R2 = Parity (0=none, 1=odd, 2=even)
  91.  
  92.   This SWI reads the current serial status, returning the dataformat bits
  93.   in registers R0-R2.                                                       
  94.  
  95. ============================================================================
  96.  
  97. * SWI "Ice_SetDataFormat"
  98.       &C0906
  99.  
  100.       Entry: R0 = Number of databits (8,7,6 or 5)
  101.              R1 = Number of stopbits (2 or 1)
  102.              R2 = Parity (0=none, 1=odd, 2=even)
  103.  
  104.       Exit : - All registers are preserved
  105.  
  106.   This SWI sets the serial status, taking in R0-R2 the bit-specifications
  107.   for the dataformat.                                    
  108.  
  109. ============================================================================
  110.  
  111. * SWI "Ice_GetByte"
  112.       &C0907
  113.  
  114.       Entry: -
  115.  
  116.       Exit : R0 = Byte read from serial input-buffer, or -1 if buffer was
  117.                   empty.
  118.  
  119.   This SWI reads a byte from the serial input-buffer. If reading was
  120.   succesful, R0 contains the byte read, otherwise, if the input-buffer was
  121.   empty, R0 contains -1.                                                    
  122.  
  123. ============================================================================
  124.  
  125. * SWI "Ice_SendByte"
  126.       &C0908
  127.  
  128.       Entry: R0 = Byte to be sent.
  129.  
  130.       Exit : R0 = Byte put in output-buffer, or -1 if buffer was full.
  131.  
  132.   This SWI puts a byte into the serial output-buffer. If the buffer was
  133.   already full, R0 contains -1 on exit, and the byte was not sent.          
  134.  
  135. ============================================================================
  136.  
  137. * SWI "Ice_SendString"
  138.       &C0909
  139.             
  140.       Entry: R0 = Pointer to control-character terminated string.
  141.  
  142.       Exit : R0 = Number of characters actually sent.
  143.  
  144.   This SWI sends a string, byte per byte, to the output-buffer. Any character
  145.   with ASCII-value smaller than 27 terminates the string. When, during the
  146.   sending of the string, the output-buffer gets full, sending is aborted.
  147.   On exit, R0 will contain the number of characters sent, which equals the
  148.   string-length if sending was succesful.                                   
  149.  
  150. ============================================================================
  151.  
  152. * SWI "Ice_LowerDTR"
  153.       &C090A
  154.  
  155.       Entry: -
  156.  
  157.       Exit : - All registers are preserved
  158.  
  159.   This SWI sets the DTR bit in the status mask, and thus lowers the DTR-line
  160.   to the modem. This lowering of the DTR is very handy for hanging up the
  161.   modem.                                                                    
  162.  
  163. ============================================================================
  164.  
  165. * SWI "Ice_RaiseDTR"
  166.       &C090B
  167.  
  168.       Entry: -
  169.  
  170.       Exit : - All registers are preserved
  171.  
  172.   This SWI clears the DTR bit in the status mask, and thus raises the DTR-
  173.   line to the modem. The DTR must be raised for sending data to the modem.  
  174.  
  175. ============================================================================
  176.  
  177. * SWI "Ice_CarrierDetect"
  178.       &C090C
  179.             
  180.       Entry: -
  181.  
  182.       Exit : R0 = 0 if no carrier was detected, or 1 if a carrier was 
  183.                   detected.
  184.  
  185.   This SWI reads the DCD bit from the status mask, and returns in R0 the 
  186.   status of this bit. Reading this bit regularly after a connection was
  187.   established informs you whether there still is a connection or not.       
  188.  
  189. ============================================================================
  190.  
  191. * SWI "Ice_WriteANSI"
  192.       &C090D
  193.  
  194.       Entry: R0 = Character to be written (or ANSI-interpreted).
  195.  
  196.       Exit : - All registers are preserved.
  197.  
  198.   This SWI provides an ANSI Escape Sequence emulator. Many BBS's use color
  199.   coding for their text, conforming to the ANSI standard. Using this SWI to
  200.   print all incoming characters will result in these color-codes being
  201.   interpreted. Apart from color-codes, the ANSI standard also provides easy
  202.   cursor-positioning control and some other display-controls.
  203.   On entry, R0 should contain the character to be printed. The emulator will
  204.   take appropriate action depending on its ASCII-value.
  205.                                                                             
  206. ============================================================================
  207.  
  208. * SWI "Ice_RemoteControl"
  209.       &C090E
  210.  
  211.       Entry: -
  212.  
  213.       Exit : - All registers are preserved.
  214.  
  215.   This SWI switches your Archimedes to remote-control mode. In this mode,
  216.   all input and output goes via the serial port, which means you can control
  217.   your Arc from whatever terminal that is attached to the serial port.
  218.  
  219. ============================================================================
  220.  
  221. * SWI "Ice_LocalControl"
  222.       &C090F
  223.  
  224.       Entry: -
  225.  
  226.       Exit : - All registers are preserved.
  227.  
  228.   This SWI puts your Archimedes back in local-control mode. This is the
  229.   state the Arc is in when you switch it on. 
  230.  
  231. ============================================================================
  232.       
  233.                                                               Carl Declerck.
  234.