Home » Archimedes archive » Acorn User » AU 1995-04.adf » !Internet_StarterPak » SerialDev/BlockSpec

SerialDev/BlockSpec

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Acorn User » AU 1995-04.adf » !Internet_StarterPak
Filename: SerialDev/BlockSpec
Read OK:
File size: 40D7 bytes
Load address: 0000
Exec address: 0000
File contents
Block Driver Specification
--------------------------

Hugo Fiennes, Rev 10a, 17th August 1994

Contact me on 0749 670058 (altman@cryton.demon.co.uk, fidonet 2:255/102.0)
for information about the latest version of the spec.

Aim
---

To provide a standard way for applications to access serial devices. Any
application supporting block drivers can be used with many serial devices,
with no modification required to the application code - and it's easier
to use than the serial SWIs anyway!

Info
----

This standard is public domain. The drivers supplied are freely distributable
but � 1994 Hugo Fiennes of The Serial Port. If you intend to use the block
drivers, please distribute the whole block driver package (inc sample source,
this file, and the complete !SerialDev application) with your program,
making sure that you are distributing the latest version (available from
The World of Cryton BBS, Arcade BBS, and ftp.demon.co.uk in the /pub/archimedes
directory).

An application called !SerialDev holds the drivers - in your application !Run
sequence you should check to see if <SerialDev$Path> is set, and if not, set
it to your application directory, inside which is Modules.Internal at least,
for your application to default to the internal port.

Eventually the idea is to have !SerialDev hold an application that handles
the installation in a 'pretty way' - eg dragging new drivers to a window to
install them, this would check to see if the driver was a later version of an
existing driver and if so replace the old one, otherwise it would install the
driver. Maybe this application could look a bit like ArtWorks !FontInst.
Hint, hint, somebody write one...

The drivers each have their own directory just in case, possibly extensions
with !Run files, modules, etc relating to the driver could be stored there.
Of course, drivers know their own name and could load files into RMA on
initialisation now and cause no problems.

ARCterm 7 1.44 and later use drivers of this specification. In this
archive I have included some other drivers, documented below.
Other programs that support block drivers are: Binkleyterm (2.11+),
Hearsay 2 (2.17+), ARCfax (1.06+), ARCbbs (1.63+), RISCbbs (1.02+),
Netway.

C headers have been provided for C programmers. BASIC/Assembler people
should have no problems working it out either - a small application,
'Example' is provided which will work with any block driver module to
provide a very simple terminal program.

REVISION 4 : Added 'wont empty' and 'dont overlay io' flags for pipes and
             (unfixed) RO3.10 serial ports.

REVISION 5 : Intialise can now return an error string.

REVISION 6 : More information on calling initialise.

REVISION 7 : Pipe drivers now support 'peek byte' - return next byte in
             buffer without removing it.

REVISION 8 : Internal port with PC cable now works with DCD low (bit 1
             on SerialOp 0 now set). OSBYTE 152 used for peek byte
             (for some reason the proper legal method doesn't work well).

REVISION 9 : All drivers must now store R14 on the stack so they can
             be called from supervisor mode.

REVISION 10: Basically this release just tidied the internal driver for
             RiscPC use - hitting the metal isn't required anymore to
             set high rates, so it isn't done. Still needed on A5000,
             A3010, A3020, A4000 & A4 though.

             Inquiry initialise (see below) added for JP :-) This is
             implemented in Internal, SP_Dual and Pipe drivers. It's
             only really necessary in the Internal (sets baud tables)
             and the SP_Dual (counts installed ports) drivers.

REVISION 10a:"I must not release software without testing it" :-)
             A little buglet in the SP_Dual drivers was pointed out to
             me, "they don't work!". This has now been fixed. Drivers
             should now also preserve the PSR (Internal, Dummy, Pipe,
             and SP_Dual do) just in case.

Internal driver
---------------

There are two version of this: Internal and InternalPC - the PC version
expects a standard PC serial cable, which will only work properly on A5000
or later machines (some early A5000s might have problems too).

Needs RO3.1 for block operations.

On a 'new hardware' machine (ie A5000 or later) will support 38400, 57600,
115200 automatically. Remember that these rates may well not be reliable
due to the lack of FIFO on the serial chip. These rates are acheived by
writing directly to the serial chip, which is definitely not Acorn-approved.
Beware!

On RiscPCs all rates to 115200 should be perfectly reliable as the hardware
now includes a FIFO.

Cables - the Acorn wiring for a modem is this:

   Acorn 9w female               Modem 25w male
   ---------------               --------------
       1-4-8                           20
         2                              3
         3                              2
         5                              7
         6                              5
         7                              4
         9                              8

And the PC wiring is this:

   Acorn 9w female               Modem 25w male
   ---------------               --------------
         1                              8
         2                              3
         3                              2
         4                             20
         5                              7
         6                              6 (not usually used much)
         7                              4
         8                              5
         9                             22 (not usually used much)

Serial Port Dual Serial
-----------------------

Again, there are 2 versions: SP_Dual and SP_DualPC, the PC version expects
a standard PC serial cable.

Since release 9, the Xon/Xoff flags are cleared every time flow control
is changed to stop things sticking if an Xoff has been received.

PipeA and PipeB
---------------

This will autoload the ARCbbs_Pipes module (contained in the PipeA directory)
if necessary.

The idea is, you open a port (0-15) on pipeA and data sent appears in the
input of the corresponding port on pipeB (and vice-versa). DTR at one end
is translated to DCD at the other (ditto for RTS-CTS). In this way, any
application which supports the block driver spec can talk to another, for
example, with ARCbbs and the ARCterm modem server on the same machine,
some ARCbbs ports could be given over to network access via the modem
server.

The pipes use the flag 'wont empty' as you can't wait for the pipe to
'finish sending' as the other end of the pipe may be waiting for the same
thing (unlike a serial port, where the data will go away eventually).

The pipes are 2k long in each direction.

Acorn Telnet (Needs Acorn's TCP/IP protocol suite)
------------
*Note! Does not store R14_SVC

This is only in testing, but is supplied as it might be useful. The coding
is possibly quite inefficient, but it works. You require !Internet and 
!Telnet to have been run before trying to use the driver. It will prompt
for a host name - type one, or an internet address. You can add ',xx'
where xx is the port number to telnet into. DCD as reported by modem
status will go high when a sucessful connection is made. Dropping DTR
then raising it again will clear any current call.

Known bugs: You can't have multiple sessions - if you load another emulator
and run telnet the port_claim message will stop the first one - possibly a
'dynamic' port number (returned by init?) should be put into the spec to
cater for things like this.


Dummy (/dev/null)
-----

This is a dummy driver, for when you want somewhere to trash data. It
always shows CTS, DSR and DCD, and will completely ignore any data you
send to it. It never has any data to give you.

II_Dual driver
--------------
*Note! Does not store R14_SVC

This is a temporary stop-gap until v3.xx software is available for the II
card. The port number you specify is the II port number -1, ie II port 3
would be specified as port 2. If you want to use the internal port while
using II ports, you need the Internal2 driver. Both of these drivers
rely on the poll entry being called directly after each wimp poll, to set
the current port.

Econet driver (not supplied with this release)
-------------

This works with ARCterm's new 16-line modem server to allow remote serial
access. To support connection, etc, it has 3 special functions:

Connect (function code 128)
  r1=handle/net/station (handle in bits 16-23,net in bits 8-15, station in 0-7)
  r2-> password, null terminated

  Tries to set up a connection with the modem server. Returns 0 for success,
  1 for no reply, 2 for already connected, or a pointer to an error block if
  r0 is 'big' on return.

Disconnect (function code 129)
  Disconnects from the modem server.

Scan for modem servers (function code 130)
  r1=buffer to fill of format:
     0    station
     1    net
     2    handle
     3    modem driver number as defined in the modem server config file
     4-63 modem ID string (null terminated)
  r2=max number of entries table can handle

-------------------------------------------------------------------------------
Driver layout
-------------------------------------------------------------------------------

0x000 Entry point to call routines

      In:  r0=function code
           r1-r3=data

      Out: r0=result

      NOTE! CHANGE IN REVISION 9!
      |
      | This entry point can be called in EITHER user or supervisor mode, so
      | R14 should always be pushed on the stack (STMFD R13!,{R14}) and be used
      | to return from the driver so that r14_svc is preserved if the driver is
      | called when in supervisor mode.
      |

      r0-r3 can be corrupted, r4-r12 should be preserved. r14 contains the
      return address

      Callers note that r13 should point to a full, descending stack
      with a decent amount of space free on it.

      Example handler code follows:

      entry
            STMFD R13!,{R14}
            CMP   R0,#((endoftable-table)/4)
            ADDCC PC,PC,R0,LSL#2
            LDMFD R13!,{PC}

      table
            B     func_0
            B     func_1
      endtable

0x080 Driver information string (31 bytes max, 0 terminated)
0x0A0 Manufacturer information string (31 bytes max, 0 terminated)
0x0C0 Version number (top 16 bits major, low 16 bits minor)
0x0C4 Driver flags

      0x00000001 - More than one port availiable
      0x00000002 - Supports split rates
      0x00000004 - Has >1 byte hardware FIFO
      0x00000008 - Can use Set control lines to generate a break
      0x00000010 - Requires polling (by function 19)
      0x00000020 - Won't empty (is a shared buffer)
      0x00000040 - Supports block get/put operations
      0x00000080 - Prefer not to overlap serial IO and disk IO
      0x00000100 - Supports inquiry initialise

      0xdd...... - Top byte is highest port number supported (numbered from 0)
0x0C8 Driver number. This is allocated by me, and always has the lowest byte
      as 0. The purpose of the driver number is for the Device_Claim protocol:
      when a serial port is specified, the port number is used to specify
      which port is to be claimed/released. The internal port is port 0 and
      driver number 0. To make the port number to use you add the sub-port
      number and the driver number together. eg, say the II dual card was
      driver number 1 (0x00000100) and you wanted to claim port 5, you
      would use the port number 0x00000105. This is unique and hopefully
      would cause no problems.

      PORT NUMBERS PASSED TO BLOCK DRIVERS ARE THE LOWER 8 BITS ONLY: THEY DO
      NOT INCLUDE THE DRIVER NUMBER.

      Currently allocated driver numbers:

        0 - Internal serial
        1 - II dual serial
        2 - Serial port dual serial
        3 - Internal serial with PC cable
        4 - Brainsoft Multipod (Kelvin Hill, #179 on Cryton)
        5 - Acorn telnet interface
        6 - Serial port dual serial with PC cable

      100 - Remote econet driver
      128 - Virtual pipe (end A)
      129 - Virtual pipe (end B)

0x0CC - 0x0FF reserved

0x100 Supported speed table. One word per speed, terminated with a null word.

0x180-> driver code.

Function codes
--------------

r0=0  Put byte
      --------
      r1=port number
      r2=byte to send

      Returns with r0=-1 if byte not inserted, r0=0 if byte inserted into
      TX queue.

r0=1  Get byte
      --------
      r1=port number

      Returns with r0=-1 if no byte availiable, r0=byte if a byte was removed.

r0=2  Put block
      ---------
      r1=port number
      r2=pointer to block
      r3=number of bytes to try and insert

      Returns with r0=number of bytes sucessfully inserted.

r0=3  Get block
      ---------
      r1=port number
      r2=pointer to block
      r3=maximum number of bytes to put into buffer

      Returns with r0=number of bytes put in buffer.

r0=4  Check TX buffer
      ---------------
      r1=port number

      Returns with r0=number of bytes free in TX buffer

r0=5  Check RX buffer
      ---------------
      r1=port number

      Returns with r0=number of bytes used in RX buffer

r0=6  Flush TX buffer (and hardware FIFO if applicable)
      ---------------
      r1=port number

r0=7  Flush RX buffer (and hardware FIFO if applicable)
      ---------------
      r1=port number

r0=8  Control lines
      -------------
      r1=port number
      r2=-1 to read or new settings

      Returns r0=control line settings

      b0=DTR
      b1=RTS
      b2=If set, set TX data active (ie break state)

r0=9  Read modem control lines
      ------------------------
      r1=port number

      Returns r0=control line status

      b0=CTS
      b1=DSR
      b2=RI
      b3=DCD

r0=10 Read RX errors
      --------------
      r1=port number

      Returns r0=bitset of errors seen since last read RX errors.

      b0=Overrun error
      b1=Parity error
      b2=Framing error
      b3=Break received

r0=11 Send break
      ----------
      r1=port number
      r2=break time (in centiseconds)

      This does not return until the break has been sent - although some
      serial ports could multitask when sending a break, the internal port
      can't. Check the driver flags to see if you can use a multitasking
      break before using this call.

r0=12 Examine byte (like Get byte but leaves it in the buffer)
      ------------
      r1=port number

      Returns with r0=-1 if no byte availiable, r0=byte if a byte was
      returned.

r0=13 TX Speed
      --------
      r1=port number
      r2=speed to set or -1 to read

      Returns with r0=speed.

r0=14 RX Speed
      --------
      r1=port number
      r2=speed to set or -1 to read

      Returns with r0=speed.

r0=15 Set word format
      ---------------
      r1=port number
      r2=word format to set or -1 to read

      Returns with r0=word format.

r0=16 Set flow control
      ----------------
      r1=port number
      r2=flow control method to set or -1 to read

      Returns with r0=method

      0=no flow control
      1=hardware
      2=xon/xoff
      3=both

r0=17 Initialise driver
      -----------------
      r1=port number
      r2=parameter string (optional)

      r2 optionally points to a null terminated string which can specify
      device options.

      Returns with r0 pointing to error string if
      initialisation unsucessful, otherwise r0=0.

      NOTE! Do not read the baud rate tables or driver flags UNTIL AFTER
      the intialise driver entry has been called. This allows for drivers
      to configure themselves to the available hardware and adjust the
      services offered accordingly.

      Release 10: There is now a flag, 'supports inquiry initialise' (see
      above) which allows you to call the initialise entry with r1=-1,
      which will not touch any hardware, just set all the baud tables,
      driver flags, and count the number of ports installed (if necessary),
      so you can read them and set up menus, etc.

r0=18 Close down driver
      -----------------
      r1=port number

r0=19 Poll driver
      -----------
      r1=port number

      This should be called regularly (eg in a polling loop) for the driver
      to perform polling tasks - eg the econet driver needs to check internal
      buffers and poll econet protocol tasks. Polls can be as infrequent as
      three or four times a second : if a driver needs polling more often
      than that, it should install a module and hook onto a vector somewhere.
00000000  42 6c 6f 63 6b 20 44 72  69 76 65 72 20 53 70 65  |Block Driver Spe|
00000010  63 69 66 69 63 61 74 69  6f 6e 0a 2d 2d 2d 2d 2d  |cification.-----|
00000020  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000030  2d 2d 2d 2d 2d 0a 0a 48  75 67 6f 20 46 69 65 6e  |-----..Hugo Fien|
00000040  6e 65 73 2c 20 52 65 76  20 31 30 61 2c 20 31 37  |nes, Rev 10a, 17|
00000050  74 68 20 41 75 67 75 73  74 20 31 39 39 34 0a 0a  |th August 1994..|
00000060  43 6f 6e 74 61 63 74 20  6d 65 20 6f 6e 20 30 37  |Contact me on 07|
00000070  34 39 20 36 37 30 30 35  38 20 28 61 6c 74 6d 61  |49 670058 (altma|
00000080  6e 40 63 72 79 74 6f 6e  2e 64 65 6d 6f 6e 2e 63  |n@cryton.demon.c|
00000090  6f 2e 75 6b 2c 20 66 69  64 6f 6e 65 74 20 32 3a  |o.uk, fidonet 2:|
000000a0  32 35 35 2f 31 30 32 2e  30 29 0a 66 6f 72 20 69  |255/102.0).for i|
000000b0  6e 66 6f 72 6d 61 74 69  6f 6e 20 61 62 6f 75 74  |nformation about|
000000c0  20 74 68 65 20 6c 61 74  65 73 74 20 76 65 72 73  | the latest vers|
000000d0  69 6f 6e 20 6f 66 20 74  68 65 20 73 70 65 63 2e  |ion of the spec.|
000000e0  0a 0a 41 69 6d 0a 2d 2d  2d 0a 0a 54 6f 20 70 72  |..Aim.---..To pr|
000000f0  6f 76 69 64 65 20 61 20  73 74 61 6e 64 61 72 64  |ovide a standard|
00000100  20 77 61 79 20 66 6f 72  20 61 70 70 6c 69 63 61  | way for applica|
00000110  74 69 6f 6e 73 20 74 6f  20 61 63 63 65 73 73 20  |tions to access |
00000120  73 65 72 69 61 6c 20 64  65 76 69 63 65 73 2e 20  |serial devices. |
00000130  41 6e 79 0a 61 70 70 6c  69 63 61 74 69 6f 6e 20  |Any.application |
00000140  73 75 70 70 6f 72 74 69  6e 67 20 62 6c 6f 63 6b  |supporting block|
00000150  20 64 72 69 76 65 72 73  20 63 61 6e 20 62 65 20  | drivers can be |
00000160  75 73 65 64 20 77 69 74  68 20 6d 61 6e 79 20 73  |used with many s|
00000170  65 72 69 61 6c 20 64 65  76 69 63 65 73 2c 0a 77  |erial devices,.w|
00000180  69 74 68 20 6e 6f 20 6d  6f 64 69 66 69 63 61 74  |ith no modificat|
00000190  69 6f 6e 20 72 65 71 75  69 72 65 64 20 74 6f 20  |ion required to |
000001a0  74 68 65 20 61 70 70 6c  69 63 61 74 69 6f 6e 20  |the application |
000001b0  63 6f 64 65 20 2d 20 61  6e 64 20 69 74 27 73 20  |code - and it's |
000001c0  65 61 73 69 65 72 0a 74  6f 20 75 73 65 20 74 68  |easier.to use th|
000001d0  61 6e 20 74 68 65 20 73  65 72 69 61 6c 20 53 57  |an the serial SW|
000001e0  49 73 20 61 6e 79 77 61  79 21 0a 0a 49 6e 66 6f  |Is anyway!..Info|
000001f0  0a 2d 2d 2d 2d 0a 0a 54  68 69 73 20 73 74 61 6e  |.----..This stan|
00000200  64 61 72 64 20 69 73 20  70 75 62 6c 69 63 20 64  |dard is public d|
00000210  6f 6d 61 69 6e 2e 20 54  68 65 20 64 72 69 76 65  |omain. The drive|
00000220  72 73 20 73 75 70 70 6c  69 65 64 20 61 72 65 20  |rs supplied are |
00000230  66 72 65 65 6c 79 20 64  69 73 74 72 69 62 75 74  |freely distribut|
00000240  61 62 6c 65 0a 62 75 74  20 a9 20 31 39 39 34 20  |able.but . 1994 |
00000250  48 75 67 6f 20 46 69 65  6e 6e 65 73 20 6f 66 20  |Hugo Fiennes of |
00000260  54 68 65 20 53 65 72 69  61 6c 20 50 6f 72 74 2e  |The Serial Port.|
00000270  20 49 66 20 79 6f 75 20  69 6e 74 65 6e 64 20 74  | If you intend t|
00000280  6f 20 75 73 65 20 74 68  65 20 62 6c 6f 63 6b 0a  |o use the block.|
00000290  64 72 69 76 65 72 73 2c  20 70 6c 65 61 73 65 20  |drivers, please |
000002a0  64 69 73 74 72 69 62 75  74 65 20 74 68 65 20 77  |distribute the w|
000002b0  68 6f 6c 65 20 62 6c 6f  63 6b 20 64 72 69 76 65  |hole block drive|
000002c0  72 20 70 61 63 6b 61 67  65 20 28 69 6e 63 20 73  |r package (inc s|
000002d0  61 6d 70 6c 65 20 73 6f  75 72 63 65 2c 0a 74 68  |ample source,.th|
000002e0  69 73 20 66 69 6c 65 2c  20 61 6e 64 20 74 68 65  |is file, and the|
000002f0  20 63 6f 6d 70 6c 65 74  65 20 21 53 65 72 69 61  | complete !Seria|
00000300  6c 44 65 76 20 61 70 70  6c 69 63 61 74 69 6f 6e  |lDev application|
00000310  29 20 77 69 74 68 20 79  6f 75 72 20 70 72 6f 67  |) with your prog|
00000320  72 61 6d 2c 0a 6d 61 6b  69 6e 67 20 73 75 72 65  |ram,.making sure|
00000330  20 74 68 61 74 20 79 6f  75 20 61 72 65 20 64 69  | that you are di|
00000340  73 74 72 69 62 75 74 69  6e 67 20 74 68 65 20 6c  |stributing the l|
00000350  61 74 65 73 74 20 76 65  72 73 69 6f 6e 20 28 61  |atest version (a|
00000360  76 61 69 6c 61 62 6c 65  20 66 72 6f 6d 0a 54 68  |vailable from.Th|
00000370  65 20 57 6f 72 6c 64 20  6f 66 20 43 72 79 74 6f  |e World of Cryto|
00000380  6e 20 42 42 53 2c 20 41  72 63 61 64 65 20 42 42  |n BBS, Arcade BB|
00000390  53 2c 20 61 6e 64 20 66  74 70 2e 64 65 6d 6f 6e  |S, and ftp.demon|
000003a0  2e 63 6f 2e 75 6b 20 69  6e 20 74 68 65 20 2f 70  |.co.uk in the /p|
000003b0  75 62 2f 61 72 63 68 69  6d 65 64 65 73 0a 64 69  |ub/archimedes.di|
000003c0  72 65 63 74 6f 72 79 29  2e 0a 0a 41 6e 20 61 70  |rectory)...An ap|
000003d0  70 6c 69 63 61 74 69 6f  6e 20 63 61 6c 6c 65 64  |plication called|
000003e0  20 21 53 65 72 69 61 6c  44 65 76 20 68 6f 6c 64  | !SerialDev hold|
000003f0  73 20 74 68 65 20 64 72  69 76 65 72 73 20 2d 20  |s the drivers - |
00000400  69 6e 20 79 6f 75 72 20  61 70 70 6c 69 63 61 74  |in your applicat|
00000410  69 6f 6e 20 21 52 75 6e  0a 73 65 71 75 65 6e 63  |ion !Run.sequenc|
00000420  65 20 79 6f 75 20 73 68  6f 75 6c 64 20 63 68 65  |e you should che|
00000430  63 6b 20 74 6f 20 73 65  65 20 69 66 20 3c 53 65  |ck to see if <Se|
00000440  72 69 61 6c 44 65 76 24  50 61 74 68 3e 20 69 73  |rialDev$Path> is|
00000450  20 73 65 74 2c 20 61 6e  64 20 69 66 20 6e 6f 74  | set, and if not|
00000460  2c 20 73 65 74 0a 69 74  20 74 6f 20 79 6f 75 72  |, set.it to your|
00000470  20 61 70 70 6c 69 63 61  74 69 6f 6e 20 64 69 72  | application dir|
00000480  65 63 74 6f 72 79 2c 20  69 6e 73 69 64 65 20 77  |ectory, inside w|
00000490  68 69 63 68 20 69 73 20  4d 6f 64 75 6c 65 73 2e  |hich is Modules.|
000004a0  49 6e 74 65 72 6e 61 6c  20 61 74 20 6c 65 61 73  |Internal at leas|
000004b0  74 2c 0a 66 6f 72 20 79  6f 75 72 20 61 70 70 6c  |t,.for your appl|
000004c0  69 63 61 74 69 6f 6e 20  74 6f 20 64 65 66 61 75  |ication to defau|
000004d0  6c 74 20 74 6f 20 74 68  65 20 69 6e 74 65 72 6e  |lt to the intern|
000004e0  61 6c 20 70 6f 72 74 2e  0a 0a 45 76 65 6e 74 75  |al port...Eventu|
000004f0  61 6c 6c 79 20 74 68 65  20 69 64 65 61 20 69 73  |ally the idea is|
00000500  20 74 6f 20 68 61 76 65  20 21 53 65 72 69 61 6c  | to have !Serial|
00000510  44 65 76 20 68 6f 6c 64  20 61 6e 20 61 70 70 6c  |Dev hold an appl|
00000520  69 63 61 74 69 6f 6e 20  74 68 61 74 20 68 61 6e  |ication that han|
00000530  64 6c 65 73 0a 74 68 65  20 69 6e 73 74 61 6c 6c  |dles.the install|
00000540  61 74 69 6f 6e 20 69 6e  20 61 20 27 70 72 65 74  |ation in a 'pret|
00000550  74 79 20 77 61 79 27 20  2d 20 65 67 20 64 72 61  |ty way' - eg dra|
00000560  67 67 69 6e 67 20 6e 65  77 20 64 72 69 76 65 72  |gging new driver|
00000570  73 20 74 6f 20 61 20 77  69 6e 64 6f 77 20 74 6f  |s to a window to|
00000580  0a 69 6e 73 74 61 6c 6c  20 74 68 65 6d 2c 20 74  |.install them, t|
00000590  68 69 73 20 77 6f 75 6c  64 20 63 68 65 63 6b 20  |his would check |
000005a0  74 6f 20 73 65 65 20 69  66 20 74 68 65 20 64 72  |to see if the dr|
000005b0  69 76 65 72 20 77 61 73  20 61 20 6c 61 74 65 72  |iver was a later|
000005c0  20 76 65 72 73 69 6f 6e  20 6f 66 20 61 6e 0a 65  | version of an.e|
000005d0  78 69 73 74 69 6e 67 20  64 72 69 76 65 72 20 61  |xisting driver a|
000005e0  6e 64 20 69 66 20 73 6f  20 72 65 70 6c 61 63 65  |nd if so replace|
000005f0  20 74 68 65 20 6f 6c 64  20 6f 6e 65 2c 20 6f 74  | the old one, ot|
00000600  68 65 72 77 69 73 65 20  69 74 20 77 6f 75 6c 64  |herwise it would|
00000610  20 69 6e 73 74 61 6c 6c  20 74 68 65 0a 64 72 69  | install the.dri|
00000620  76 65 72 2e 20 4d 61 79  62 65 20 74 68 69 73 20  |ver. Maybe this |
00000630  61 70 70 6c 69 63 61 74  69 6f 6e 20 63 6f 75 6c  |application coul|
00000640  64 20 6c 6f 6f 6b 20 61  20 62 69 74 20 6c 69 6b  |d look a bit lik|
00000650  65 20 41 72 74 57 6f 72  6b 73 20 21 46 6f 6e 74  |e ArtWorks !Font|
00000660  49 6e 73 74 2e 0a 48 69  6e 74 2c 20 68 69 6e 74  |Inst..Hint, hint|
00000670  2c 20 73 6f 6d 65 62 6f  64 79 20 77 72 69 74 65  |, somebody write|
00000680  20 6f 6e 65 2e 2e 2e 0a  0a 54 68 65 20 64 72 69  | one.....The dri|
00000690  76 65 72 73 20 65 61 63  68 20 68 61 76 65 20 74  |vers each have t|
000006a0  68 65 69 72 20 6f 77 6e  20 64 69 72 65 63 74 6f  |heir own directo|
000006b0  72 79 20 6a 75 73 74 20  69 6e 20 63 61 73 65 2c  |ry just in case,|
000006c0  20 70 6f 73 73 69 62 6c  79 20 65 78 74 65 6e 73  | possibly extens|
000006d0  69 6f 6e 73 0a 77 69 74  68 20 21 52 75 6e 20 66  |ions.with !Run f|
000006e0  69 6c 65 73 2c 20 6d 6f  64 75 6c 65 73 2c 20 65  |iles, modules, e|
000006f0  74 63 20 72 65 6c 61 74  69 6e 67 20 74 6f 20 74  |tc relating to t|
00000700  68 65 20 64 72 69 76 65  72 20 63 6f 75 6c 64 20  |he driver could |
00000710  62 65 20 73 74 6f 72 65  64 20 74 68 65 72 65 2e  |be stored there.|
00000720  0a 4f 66 20 63 6f 75 72  73 65 2c 20 64 72 69 76  |.Of course, driv|
00000730  65 72 73 20 6b 6e 6f 77  20 74 68 65 69 72 20 6f  |ers know their o|
00000740  77 6e 20 6e 61 6d 65 20  61 6e 64 20 63 6f 75 6c  |wn name and coul|
00000750  64 20 6c 6f 61 64 20 66  69 6c 65 73 20 69 6e 74  |d load files int|
00000760  6f 20 52 4d 41 20 6f 6e  0a 69 6e 69 74 69 61 6c  |o RMA on.initial|
00000770  69 73 61 74 69 6f 6e 20  6e 6f 77 20 61 6e 64 20  |isation now and |
00000780  63 61 75 73 65 20 6e 6f  20 70 72 6f 62 6c 65 6d  |cause no problem|
00000790  73 2e 0a 0a 41 52 43 74  65 72 6d 20 37 20 31 2e  |s...ARCterm 7 1.|
000007a0  34 34 20 61 6e 64 20 6c  61 74 65 72 20 75 73 65  |44 and later use|
000007b0  20 64 72 69 76 65 72 73  20 6f 66 20 74 68 69 73  | drivers of this|
000007c0  20 73 70 65 63 69 66 69  63 61 74 69 6f 6e 2e 20  | specification. |
000007d0  49 6e 20 74 68 69 73 0a  61 72 63 68 69 76 65 20  |In this.archive |
000007e0  49 20 68 61 76 65 20 69  6e 63 6c 75 64 65 64 20  |I have included |
000007f0  73 6f 6d 65 20 6f 74 68  65 72 20 64 72 69 76 65  |some other drive|
00000800  72 73 2c 20 64 6f 63 75  6d 65 6e 74 65 64 20 62  |rs, documented b|
00000810  65 6c 6f 77 2e 0a 4f 74  68 65 72 20 70 72 6f 67  |elow..Other prog|
00000820  72 61 6d 73 20 74 68 61  74 20 73 75 70 70 6f 72  |rams that suppor|
00000830  74 20 62 6c 6f 63 6b 20  64 72 69 76 65 72 73 20  |t block drivers |
00000840  61 72 65 3a 20 42 69 6e  6b 6c 65 79 74 65 72 6d  |are: Binkleyterm|
00000850  20 28 32 2e 31 31 2b 29  2c 0a 48 65 61 72 73 61  | (2.11+),.Hearsa|
00000860  79 20 32 20 28 32 2e 31  37 2b 29 2c 20 41 52 43  |y 2 (2.17+), ARC|
00000870  66 61 78 20 28 31 2e 30  36 2b 29 2c 20 41 52 43  |fax (1.06+), ARC|
00000880  62 62 73 20 28 31 2e 36  33 2b 29 2c 20 52 49 53  |bbs (1.63+), RIS|
00000890  43 62 62 73 20 28 31 2e  30 32 2b 29 2c 0a 4e 65  |Cbbs (1.02+),.Ne|
000008a0  74 77 61 79 2e 0a 0a 43  20 68 65 61 64 65 72 73  |tway...C headers|
000008b0  20 68 61 76 65 20 62 65  65 6e 20 70 72 6f 76 69  | have been provi|
000008c0  64 65 64 20 66 6f 72 20  43 20 70 72 6f 67 72 61  |ded for C progra|
000008d0  6d 6d 65 72 73 2e 20 42  41 53 49 43 2f 41 73 73  |mmers. BASIC/Ass|
000008e0  65 6d 62 6c 65 72 20 70  65 6f 70 6c 65 0a 73 68  |embler people.sh|
000008f0  6f 75 6c 64 20 68 61 76  65 20 6e 6f 20 70 72 6f  |ould have no pro|
00000900  62 6c 65 6d 73 20 77 6f  72 6b 69 6e 67 20 69 74  |blems working it|
00000910  20 6f 75 74 20 65 69 74  68 65 72 20 2d 20 61 20  | out either - a |
00000920  73 6d 61 6c 6c 20 61 70  70 6c 69 63 61 74 69 6f  |small applicatio|
00000930  6e 2c 0a 27 45 78 61 6d  70 6c 65 27 20 69 73 20  |n,.'Example' is |
00000940  70 72 6f 76 69 64 65 64  20 77 68 69 63 68 20 77  |provided which w|
00000950  69 6c 6c 20 77 6f 72 6b  20 77 69 74 68 20 61 6e  |ill work with an|
00000960  79 20 62 6c 6f 63 6b 20  64 72 69 76 65 72 20 6d  |y block driver m|
00000970  6f 64 75 6c 65 20 74 6f  0a 70 72 6f 76 69 64 65  |odule to.provide|
00000980  20 61 20 76 65 72 79 20  73 69 6d 70 6c 65 20 74  | a very simple t|
00000990  65 72 6d 69 6e 61 6c 20  70 72 6f 67 72 61 6d 2e  |erminal program.|
000009a0  0a 0a 52 45 56 49 53 49  4f 4e 20 34 20 3a 20 41  |..REVISION 4 : A|
000009b0  64 64 65 64 20 27 77 6f  6e 74 20 65 6d 70 74 79  |dded 'wont empty|
000009c0  27 20 61 6e 64 20 27 64  6f 6e 74 20 6f 76 65 72  |' and 'dont over|
000009d0  6c 61 79 20 69 6f 27 20  66 6c 61 67 73 20 66 6f  |lay io' flags fo|
000009e0  72 20 70 69 70 65 73 20  61 6e 64 0a 20 20 20 20  |r pipes and.    |
000009f0  20 20 20 20 20 20 20 20  20 28 75 6e 66 69 78 65  |         (unfixe|
00000a00  64 29 20 52 4f 33 2e 31  30 20 73 65 72 69 61 6c  |d) RO3.10 serial|
00000a10  20 70 6f 72 74 73 2e 0a  0a 52 45 56 49 53 49 4f  | ports...REVISIO|
00000a20  4e 20 35 20 3a 20 49 6e  74 69 61 6c 69 73 65 20  |N 5 : Intialise |
00000a30  63 61 6e 20 6e 6f 77 20  72 65 74 75 72 6e 20 61  |can now return a|
00000a40  6e 20 65 72 72 6f 72 20  73 74 72 69 6e 67 2e 0a  |n error string..|
00000a50  0a 52 45 56 49 53 49 4f  4e 20 36 20 3a 20 4d 6f  |.REVISION 6 : Mo|
00000a60  72 65 20 69 6e 66 6f 72  6d 61 74 69 6f 6e 20 6f  |re information o|
00000a70  6e 20 63 61 6c 6c 69 6e  67 20 69 6e 69 74 69 61  |n calling initia|
00000a80  6c 69 73 65 2e 0a 0a 52  45 56 49 53 49 4f 4e 20  |lise...REVISION |
00000a90  37 20 3a 20 50 69 70 65  20 64 72 69 76 65 72 73  |7 : Pipe drivers|
00000aa0  20 6e 6f 77 20 73 75 70  70 6f 72 74 20 27 70 65  | now support 'pe|
00000ab0  65 6b 20 62 79 74 65 27  20 2d 20 72 65 74 75 72  |ek byte' - retur|
00000ac0  6e 20 6e 65 78 74 20 62  79 74 65 20 69 6e 0a 20  |n next byte in. |
00000ad0  20 20 20 20 20 20 20 20  20 20 20 20 62 75 66 66  |            buff|
00000ae0  65 72 20 77 69 74 68 6f  75 74 20 72 65 6d 6f 76  |er without remov|
00000af0  69 6e 67 20 69 74 2e 0a  0a 52 45 56 49 53 49 4f  |ing it...REVISIO|
00000b00  4e 20 38 20 3a 20 49 6e  74 65 72 6e 61 6c 20 70  |N 8 : Internal p|
00000b10  6f 72 74 20 77 69 74 68  20 50 43 20 63 61 62 6c  |ort with PC cabl|
00000b20  65 20 6e 6f 77 20 77 6f  72 6b 73 20 77 69 74 68  |e now works with|
00000b30  20 44 43 44 20 6c 6f 77  20 28 62 69 74 20 31 0a  | DCD low (bit 1.|
00000b40  20 20 20 20 20 20 20 20  20 20 20 20 20 6f 6e 20  |             on |
00000b50  53 65 72 69 61 6c 4f 70  20 30 20 6e 6f 77 20 73  |SerialOp 0 now s|
00000b60  65 74 29 2e 20 4f 53 42  59 54 45 20 31 35 32 20  |et). OSBYTE 152 |
00000b70  75 73 65 64 20 66 6f 72  20 70 65 65 6b 20 62 79  |used for peek by|
00000b80  74 65 0a 20 20 20 20 20  20 20 20 20 20 20 20 20  |te.             |
00000b90  28 66 6f 72 20 73 6f 6d  65 20 72 65 61 73 6f 6e  |(for some reason|
00000ba0  20 74 68 65 20 70 72 6f  70 65 72 20 6c 65 67 61  | the proper lega|
00000bb0  6c 20 6d 65 74 68 6f 64  20 64 6f 65 73 6e 27 74  |l method doesn't|
00000bc0  20 77 6f 72 6b 20 77 65  6c 6c 29 2e 0a 0a 52 45  | work well)...RE|
00000bd0  56 49 53 49 4f 4e 20 39  20 3a 20 41 6c 6c 20 64  |VISION 9 : All d|
00000be0  72 69 76 65 72 73 20 6d  75 73 74 20 6e 6f 77 20  |rivers must now |
00000bf0  73 74 6f 72 65 20 52 31  34 20 6f 6e 20 74 68 65  |store R14 on the|
00000c00  20 73 74 61 63 6b 20 73  6f 20 74 68 65 79 20 63  | stack so they c|
00000c10  61 6e 0a 20 20 20 20 20  20 20 20 20 20 20 20 20  |an.             |
00000c20  62 65 20 63 61 6c 6c 65  64 20 66 72 6f 6d 20 73  |be called from s|
00000c30  75 70 65 72 76 69 73 6f  72 20 6d 6f 64 65 2e 0a  |upervisor mode..|
00000c40  0a 52 45 56 49 53 49 4f  4e 20 31 30 3a 20 42 61  |.REVISION 10: Ba|
00000c50  73 69 63 61 6c 6c 79 20  74 68 69 73 20 72 65 6c  |sically this rel|
00000c60  65 61 73 65 20 6a 75 73  74 20 74 69 64 69 65 64  |ease just tidied|
00000c70  20 74 68 65 20 69 6e 74  65 72 6e 61 6c 20 64 72  | the internal dr|
00000c80  69 76 65 72 20 66 6f 72  0a 20 20 20 20 20 20 20  |iver for.       |
00000c90  20 20 20 20 20 20 52 69  73 63 50 43 20 75 73 65  |      RiscPC use|
00000ca0  20 2d 20 68 69 74 74 69  6e 67 20 74 68 65 20 6d  | - hitting the m|
00000cb0  65 74 61 6c 20 69 73 6e  27 74 20 72 65 71 75 69  |etal isn't requi|
00000cc0  72 65 64 20 61 6e 79 6d  6f 72 65 20 74 6f 0a 20  |red anymore to. |
00000cd0  20 20 20 20 20 20 20 20  20 20 20 20 73 65 74 20  |            set |
00000ce0  68 69 67 68 20 72 61 74  65 73 2c 20 73 6f 20 69  |high rates, so i|
00000cf0  74 20 69 73 6e 27 74 20  64 6f 6e 65 2e 20 53 74  |t isn't done. St|
00000d00  69 6c 6c 20 6e 65 65 64  65 64 20 6f 6e 20 41 35  |ill needed on A5|
00000d10  30 30 30 2c 0a 20 20 20  20 20 20 20 20 20 20 20  |000,.           |
00000d20  20 20 41 33 30 31 30 2c  20 41 33 30 32 30 2c 20  |  A3010, A3020, |
00000d30  41 34 30 30 30 20 26 20  41 34 20 74 68 6f 75 67  |A4000 & A4 thoug|
00000d40  68 2e 0a 0a 20 20 20 20  20 20 20 20 20 20 20 20  |h...            |
00000d50  20 49 6e 71 75 69 72 79  20 69 6e 69 74 69 61 6c  | Inquiry initial|
00000d60  69 73 65 20 28 73 65 65  20 62 65 6c 6f 77 29 20  |ise (see below) |
00000d70  61 64 64 65 64 20 66 6f  72 20 4a 50 20 3a 2d 29  |added for JP :-)|
00000d80  20 54 68 69 73 20 69 73  0a 20 20 20 20 20 20 20  | This is.       |
00000d90  20 20 20 20 20 20 69 6d  70 6c 65 6d 65 6e 74 65  |      implemente|
00000da0  64 20 69 6e 20 49 6e 74  65 72 6e 61 6c 2c 20 53  |d in Internal, S|
00000db0  50 5f 44 75 61 6c 20 61  6e 64 20 50 69 70 65 20  |P_Dual and Pipe |
00000dc0  64 72 69 76 65 72 73 2e  20 49 74 27 73 0a 20 20  |drivers. It's.  |
00000dd0  20 20 20 20 20 20 20 20  20 20 20 6f 6e 6c 79 20  |           only |
00000de0  72 65 61 6c 6c 79 20 6e  65 63 65 73 73 61 72 79  |really necessary|
00000df0  20 69 6e 20 74 68 65 20  49 6e 74 65 72 6e 61 6c  | in the Internal|
00000e00  20 28 73 65 74 73 20 62  61 75 64 20 74 61 62 6c  | (sets baud tabl|
00000e10  65 73 29 0a 20 20 20 20  20 20 20 20 20 20 20 20  |es).            |
00000e20  20 61 6e 64 20 74 68 65  20 53 50 5f 44 75 61 6c  | and the SP_Dual|
00000e30  20 28 63 6f 75 6e 74 73  20 69 6e 73 74 61 6c 6c  | (counts install|
00000e40  65 64 20 70 6f 72 74 73  29 20 64 72 69 76 65 72  |ed ports) driver|
00000e50  73 2e 0a 0a 52 45 56 49  53 49 4f 4e 20 31 30 61  |s...REVISION 10a|
00000e60  3a 22 49 20 6d 75 73 74  20 6e 6f 74 20 72 65 6c  |:"I must not rel|
00000e70  65 61 73 65 20 73 6f 66  74 77 61 72 65 20 77 69  |ease software wi|
00000e80  74 68 6f 75 74 20 74 65  73 74 69 6e 67 20 69 74  |thout testing it|
00000e90  22 20 3a 2d 29 0a 20 20  20 20 20 20 20 20 20 20  |" :-).          |
00000ea0  20 20 20 41 20 6c 69 74  74 6c 65 20 62 75 67 6c  |   A little bugl|
00000eb0  65 74 20 69 6e 20 74 68  65 20 53 50 5f 44 75 61  |et in the SP_Dua|
00000ec0  6c 20 64 72 69 76 65 72  73 20 77 61 73 20 70 6f  |l drivers was po|
00000ed0  69 6e 74 65 64 20 6f 75  74 20 74 6f 0a 20 20 20  |inted out to.   |
00000ee0  20 20 20 20 20 20 20 20  20 20 6d 65 2c 20 22 74  |          me, "t|
00000ef0  68 65 79 20 64 6f 6e 27  74 20 77 6f 72 6b 21 22  |hey don't work!"|
00000f00  2e 20 54 68 69 73 20 68  61 73 20 6e 6f 77 20 62  |. This has now b|
00000f10  65 65 6e 20 66 69 78 65  64 2e 20 44 72 69 76 65  |een fixed. Drive|
00000f20  72 73 0a 20 20 20 20 20  20 20 20 20 20 20 20 20  |rs.             |
00000f30  73 68 6f 75 6c 64 20 6e  6f 77 20 61 6c 73 6f 20  |should now also |
00000f40  70 72 65 73 65 72 76 65  20 74 68 65 20 50 53 52  |preserve the PSR|
00000f50  20 28 49 6e 74 65 72 6e  61 6c 2c 20 44 75 6d 6d  | (Internal, Dumm|
00000f60  79 2c 20 50 69 70 65 2c  0a 20 20 20 20 20 20 20  |y, Pipe,.       |
00000f70  20 20 20 20 20 20 61 6e  64 20 53 50 5f 44 75 61  |      and SP_Dua|
00000f80  6c 20 64 6f 29 20 6a 75  73 74 20 69 6e 20 63 61  |l do) just in ca|
00000f90  73 65 2e 0a 0a 49 6e 74  65 72 6e 61 6c 20 64 72  |se...Internal dr|
00000fa0  69 76 65 72 0a 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |iver.-----------|
00000fb0  2d 2d 2d 2d 0a 0a 54 68  65 72 65 20 61 72 65 20  |----..There are |
00000fc0  74 77 6f 20 76 65 72 73  69 6f 6e 20 6f 66 20 74  |two version of t|
00000fd0  68 69 73 3a 20 49 6e 74  65 72 6e 61 6c 20 61 6e  |his: Internal an|
00000fe0  64 20 49 6e 74 65 72 6e  61 6c 50 43 20 2d 20 74  |d InternalPC - t|
00000ff0  68 65 20 50 43 20 76 65  72 73 69 6f 6e 0a 65 78  |he PC version.ex|
00001000  70 65 63 74 73 20 61 20  73 74 61 6e 64 61 72 64  |pects a standard|
00001010  20 50 43 20 73 65 72 69  61 6c 20 63 61 62 6c 65  | PC serial cable|
00001020  2c 20 77 68 69 63 68 20  77 69 6c 6c 20 6f 6e 6c  |, which will onl|
00001030  79 20 77 6f 72 6b 20 70  72 6f 70 65 72 6c 79 20  |y work properly |
00001040  6f 6e 20 41 35 30 30 30  0a 6f 72 20 6c 61 74 65  |on A5000.or late|
00001050  72 20 6d 61 63 68 69 6e  65 73 20 28 73 6f 6d 65  |r machines (some|
00001060  20 65 61 72 6c 79 20 41  35 30 30 30 73 20 6d 69  | early A5000s mi|
00001070  67 68 74 20 68 61 76 65  20 70 72 6f 62 6c 65 6d  |ght have problem|
00001080  73 20 74 6f 6f 29 2e 0a  0a 4e 65 65 64 73 20 52  |s too)...Needs R|
00001090  4f 33 2e 31 20 66 6f 72  20 62 6c 6f 63 6b 20 6f  |O3.1 for block o|
000010a0  70 65 72 61 74 69 6f 6e  73 2e 0a 0a 4f 6e 20 61  |perations...On a|
000010b0  20 27 6e 65 77 20 68 61  72 64 77 61 72 65 27 20  | 'new hardware' |
000010c0  6d 61 63 68 69 6e 65 20  28 69 65 20 41 35 30 30  |machine (ie A500|
000010d0  30 20 6f 72 20 6c 61 74  65 72 29 20 77 69 6c 6c  |0 or later) will|
000010e0  20 73 75 70 70 6f 72 74  20 33 38 34 30 30 2c 20  | support 38400, |
000010f0  35 37 36 30 30 2c 0a 31  31 35 32 30 30 20 61 75  |57600,.115200 au|
00001100  74 6f 6d 61 74 69 63 61  6c 6c 79 2e 20 52 65 6d  |tomatically. Rem|
00001110  65 6d 62 65 72 20 74 68  61 74 20 74 68 65 73 65  |ember that these|
00001120  20 72 61 74 65 73 20 6d  61 79 20 77 65 6c 6c 20  | rates may well |
00001130  6e 6f 74 20 62 65 20 72  65 6c 69 61 62 6c 65 0a  |not be reliable.|
00001140  64 75 65 20 74 6f 20 74  68 65 20 6c 61 63 6b 20  |due to the lack |
00001150  6f 66 20 46 49 46 4f 20  6f 6e 20 74 68 65 20 73  |of FIFO on the s|
00001160  65 72 69 61 6c 20 63 68  69 70 2e 20 54 68 65 73  |erial chip. Thes|
00001170  65 20 72 61 74 65 73 20  61 72 65 20 61 63 68 65  |e rates are ache|
00001180  69 76 65 64 20 62 79 0a  77 72 69 74 69 6e 67 20  |ived by.writing |
00001190  64 69 72 65 63 74 6c 79  20 74 6f 20 74 68 65 20  |directly to the |
000011a0  73 65 72 69 61 6c 20 63  68 69 70 2c 20 77 68 69  |serial chip, whi|
000011b0  63 68 20 69 73 20 64 65  66 69 6e 69 74 65 6c 79  |ch is definitely|
000011c0  20 6e 6f 74 20 41 63 6f  72 6e 2d 61 70 70 72 6f  | not Acorn-appro|
000011d0  76 65 64 2e 0a 42 65 77  61 72 65 21 0a 0a 4f 6e  |ved..Beware!..On|
000011e0  20 52 69 73 63 50 43 73  20 61 6c 6c 20 72 61 74  | RiscPCs all rat|
000011f0  65 73 20 74 6f 20 31 31  35 32 30 30 20 73 68 6f  |es to 115200 sho|
00001200  75 6c 64 20 62 65 20 70  65 72 66 65 63 74 6c 79  |uld be perfectly|
00001210  20 72 65 6c 69 61 62 6c  65 20 61 73 20 74 68 65  | reliable as the|
00001220  20 68 61 72 64 77 61 72  65 0a 6e 6f 77 20 69 6e  | hardware.now in|
00001230  63 6c 75 64 65 73 20 61  20 46 49 46 4f 2e 0a 0a  |cludes a FIFO...|
00001240  43 61 62 6c 65 73 20 2d  20 74 68 65 20 41 63 6f  |Cables - the Aco|
00001250  72 6e 20 77 69 72 69 6e  67 20 66 6f 72 20 61 20  |rn wiring for a |
00001260  6d 6f 64 65 6d 20 69 73  20 74 68 69 73 3a 0a 0a  |modem is this:..|
00001270  20 20 20 41 63 6f 72 6e  20 39 77 20 66 65 6d 61  |   Acorn 9w fema|
00001280  6c 65 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |le              |
00001290  20 4d 6f 64 65 6d 20 32  35 77 20 6d 61 6c 65 0a  | Modem 25w male.|
000012a0  20 20 20 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |   -------------|
000012b0  2d 2d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |--              |
000012c0  20 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 0a  | --------------.|
000012d0  20 20 20 20 20 20 20 31  2d 34 2d 38 20 20 20 20  |       1-4-8    |
000012e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000012f0  20 20 20 20 20 20 20 32  30 0a 20 20 20 20 20 20  |       20.      |
00001300  20 20 20 32 20 20 20 20  20 20 20 20 20 20 20 20  |   2            |
00001310  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001320  20 20 33 0a 20 20 20 20  20 20 20 20 20 33 20 20  |  3.         3  |
00001330  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001340  20 20 20 20 20 20 20 20  20 20 20 20 32 0a 20 20  |            2.  |
00001350  20 20 20 20 20 20 20 35  20 20 20 20 20 20 20 20  |       5        |
00001360  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001370  20 20 20 20 20 20 37 0a  20 20 20 20 20 20 20 20  |      7.        |
00001380  20 36 20 20 20 20 20 20  20 20 20 20 20 20 20 20  | 6              |
00001390  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000013a0  35 0a 20 20 20 20 20 20  20 20 20 37 20 20 20 20  |5.         7    |
000013b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000013c0  20 20 20 20 20 20 20 20  20 20 34 0a 20 20 20 20  |          4.    |
000013d0  20 20 20 20 20 39 20 20  20 20 20 20 20 20 20 20  |     9          |
000013e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000013f0  20 20 20 20 38 0a 0a 41  6e 64 20 74 68 65 20 50  |    8..And the P|
00001400  43 20 77 69 72 69 6e 67  20 69 73 20 74 68 69 73  |C wiring is this|
00001410  3a 0a 0a 20 20 20 41 63  6f 72 6e 20 39 77 20 66  |:..   Acorn 9w f|
00001420  65 6d 61 6c 65 20 20 20  20 20 20 20 20 20 20 20  |emale           |
00001430  20 20 20 20 4d 6f 64 65  6d 20 32 35 77 20 6d 61  |    Modem 25w ma|
00001440  6c 65 0a 20 20 20 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |le.   ----------|
00001450  2d 2d 2d 2d 2d 20 20 20  20 20 20 20 20 20 20 20  |-----           |
00001460  20 20 20 20 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |    ------------|
00001470  2d 2d 0a 20 20 20 20 20  20 20 20 20 31 20 20 20  |--.         1   |
00001480  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001490  20 20 20 20 20 20 20 20  20 20 20 38 0a 20 20 20  |           8.   |
000014a0  20 20 20 20 20 20 32 20  20 20 20 20 20 20 20 20  |      2         |
000014b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000014c0  20 20 20 20 20 33 0a 20  20 20 20 20 20 20 20 20  |     3.         |
000014d0  33 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |3               |
000014e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 32  |               2|
000014f0  0a 20 20 20 20 20 20 20  20 20 34 20 20 20 20 20  |.         4     |
00001500  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001510  20 20 20 20 20 20 20 20  32 30 0a 20 20 20 20 20  |        20.     |
00001520  20 20 20 20 35 20 20 20  20 20 20 20 20 20 20 20  |    5           |
00001530  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001540  20 20 20 37 0a 20 20 20  20 20 20 20 20 20 36 20  |   7.         6 |
00001550  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001560  20 20 20 20 20 20 20 20  20 20 20 20 20 36 20 28  |             6 (|
00001570  6e 6f 74 20 75 73 75 61  6c 6c 79 20 75 73 65 64  |not usually used|
00001580  20 6d 75 63 68 29 0a 20  20 20 20 20 20 20 20 20  | much).         |
00001590  37 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |7               |
000015a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 34  |               4|
000015b0  0a 20 20 20 20 20 20 20  20 20 38 20 20 20 20 20  |.         8     |
000015c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000015d0  20 20 20 20 20 20 20 20  20 35 0a 20 20 20 20 20  |         5.     |
000015e0  20 20 20 20 39 20 20 20  20 20 20 20 20 20 20 20  |    9           |
000015f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001600  20 20 32 32 20 28 6e 6f  74 20 75 73 75 61 6c 6c  |  22 (not usuall|
00001610  79 20 75 73 65 64 20 6d  75 63 68 29 0a 0a 53 65  |y used much)..Se|
00001620  72 69 61 6c 20 50 6f 72  74 20 44 75 61 6c 20 53  |rial Port Dual S|
00001630  65 72 69 61 6c 0a 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |erial.----------|
00001640  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 0a 0a 41  |-------------..A|
00001650  67 61 69 6e 2c 20 74 68  65 72 65 20 61 72 65 20  |gain, there are |
00001660  32 20 76 65 72 73 69 6f  6e 73 3a 20 53 50 5f 44  |2 versions: SP_D|
00001670  75 61 6c 20 61 6e 64 20  53 50 5f 44 75 61 6c 50  |ual and SP_DualP|
00001680  43 2c 20 74 68 65 20 50  43 20 76 65 72 73 69 6f  |C, the PC versio|
00001690  6e 20 65 78 70 65 63 74  73 0a 61 20 73 74 61 6e  |n expects.a stan|
000016a0  64 61 72 64 20 50 43 20  73 65 72 69 61 6c 20 63  |dard PC serial c|
000016b0  61 62 6c 65 2e 0a 0a 53  69 6e 63 65 20 72 65 6c  |able...Since rel|
000016c0  65 61 73 65 20 39 2c 20  74 68 65 20 58 6f 6e 2f  |ease 9, the Xon/|
000016d0  58 6f 66 66 20 66 6c 61  67 73 20 61 72 65 20 63  |Xoff flags are c|
000016e0  6c 65 61 72 65 64 20 65  76 65 72 79 20 74 69 6d  |leared every tim|
000016f0  65 20 66 6c 6f 77 20 63  6f 6e 74 72 6f 6c 0a 69  |e flow control.i|
00001700  73 20 63 68 61 6e 67 65  64 20 74 6f 20 73 74 6f  |s changed to sto|
00001710  70 20 74 68 69 6e 67 73  20 73 74 69 63 6b 69 6e  |p things stickin|
00001720  67 20 69 66 20 61 6e 20  58 6f 66 66 20 68 61 73  |g if an Xoff has|
00001730  20 62 65 65 6e 20 72 65  63 65 69 76 65 64 2e 0a  | been received..|
00001740  0a 50 69 70 65 41 20 61  6e 64 20 50 69 70 65 42  |.PipeA and PipeB|
00001750  0a 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |.---------------|
00001760  0a 0a 54 68 69 73 20 77  69 6c 6c 20 61 75 74 6f  |..This will auto|
00001770  6c 6f 61 64 20 74 68 65  20 41 52 43 62 62 73 5f  |load the ARCbbs_|
00001780  50 69 70 65 73 20 6d 6f  64 75 6c 65 20 28 63 6f  |Pipes module (co|
00001790  6e 74 61 69 6e 65 64 20  69 6e 20 74 68 65 20 50  |ntained in the P|
000017a0  69 70 65 41 20 64 69 72  65 63 74 6f 72 79 29 0a  |ipeA directory).|
000017b0  69 66 20 6e 65 63 65 73  73 61 72 79 2e 0a 0a 54  |if necessary...T|
000017c0  68 65 20 69 64 65 61 20  69 73 2c 20 79 6f 75 20  |he idea is, you |
000017d0  6f 70 65 6e 20 61 20 70  6f 72 74 20 28 30 2d 31  |open a port (0-1|
000017e0  35 29 20 6f 6e 20 70 69  70 65 41 20 61 6e 64 20  |5) on pipeA and |
000017f0  64 61 74 61 20 73 65 6e  74 20 61 70 70 65 61 72  |data sent appear|
00001800  73 20 69 6e 20 74 68 65  0a 69 6e 70 75 74 20 6f  |s in the.input o|
00001810  66 20 74 68 65 20 63 6f  72 72 65 73 70 6f 6e 64  |f the correspond|
00001820  69 6e 67 20 70 6f 72 74  20 6f 6e 20 70 69 70 65  |ing port on pipe|
00001830  42 20 28 61 6e 64 20 76  69 63 65 2d 76 65 72 73  |B (and vice-vers|
00001840  61 29 2e 20 44 54 52 20  61 74 20 6f 6e 65 20 65  |a). DTR at one e|
00001850  6e 64 0a 69 73 20 74 72  61 6e 73 6c 61 74 65 64  |nd.is translated|
00001860  20 74 6f 20 44 43 44 20  61 74 20 74 68 65 20 6f  | to DCD at the o|
00001870  74 68 65 72 20 28 64 69  74 74 6f 20 66 6f 72 20  |ther (ditto for |
00001880  52 54 53 2d 43 54 53 29  2e 20 49 6e 20 74 68 69  |RTS-CTS). In thi|
00001890  73 20 77 61 79 2c 20 61  6e 79 0a 61 70 70 6c 69  |s way, any.appli|
000018a0  63 61 74 69 6f 6e 20 77  68 69 63 68 20 73 75 70  |cation which sup|
000018b0  70 6f 72 74 73 20 74 68  65 20 62 6c 6f 63 6b 20  |ports the block |
000018c0  64 72 69 76 65 72 20 73  70 65 63 20 63 61 6e 20  |driver spec can |
000018d0  74 61 6c 6b 20 74 6f 20  61 6e 6f 74 68 65 72 2c  |talk to another,|
000018e0  20 66 6f 72 0a 65 78 61  6d 70 6c 65 2c 20 77 69  | for.example, wi|
000018f0  74 68 20 41 52 43 62 62  73 20 61 6e 64 20 74 68  |th ARCbbs and th|
00001900  65 20 41 52 43 74 65 72  6d 20 6d 6f 64 65 6d 20  |e ARCterm modem |
00001910  73 65 72 76 65 72 20 6f  6e 20 74 68 65 20 73 61  |server on the sa|
00001920  6d 65 20 6d 61 63 68 69  6e 65 2c 0a 73 6f 6d 65  |me machine,.some|
00001930  20 41 52 43 62 62 73 20  70 6f 72 74 73 20 63 6f  | ARCbbs ports co|
00001940  75 6c 64 20 62 65 20 67  69 76 65 6e 20 6f 76 65  |uld be given ove|
00001950  72 20 74 6f 20 6e 65 74  77 6f 72 6b 20 61 63 63  |r to network acc|
00001960  65 73 73 20 76 69 61 20  74 68 65 20 6d 6f 64 65  |ess via the mode|
00001970  6d 0a 73 65 72 76 65 72  2e 0a 0a 54 68 65 20 70  |m.server...The p|
00001980  69 70 65 73 20 75 73 65  20 74 68 65 20 66 6c 61  |ipes use the fla|
00001990  67 20 27 77 6f 6e 74 20  65 6d 70 74 79 27 20 61  |g 'wont empty' a|
000019a0  73 20 79 6f 75 20 63 61  6e 27 74 20 77 61 69 74  |s you can't wait|
000019b0  20 66 6f 72 20 74 68 65  20 70 69 70 65 20 74 6f  | for the pipe to|
000019c0  0a 27 66 69 6e 69 73 68  20 73 65 6e 64 69 6e 67  |.'finish sending|
000019d0  27 20 61 73 20 74 68 65  20 6f 74 68 65 72 20 65  |' as the other e|
000019e0  6e 64 20 6f 66 20 74 68  65 20 70 69 70 65 20 6d  |nd of the pipe m|
000019f0  61 79 20 62 65 20 77 61  69 74 69 6e 67 20 66 6f  |ay be waiting fo|
00001a00  72 20 74 68 65 20 73 61  6d 65 0a 74 68 69 6e 67  |r the same.thing|
00001a10  20 28 75 6e 6c 69 6b 65  20 61 20 73 65 72 69 61  | (unlike a seria|
00001a20  6c 20 70 6f 72 74 2c 20  77 68 65 72 65 20 74 68  |l port, where th|
00001a30  65 20 64 61 74 61 20 77  69 6c 6c 20 67 6f 20 61  |e data will go a|
00001a40  77 61 79 20 65 76 65 6e  74 75 61 6c 6c 79 29 2e  |way eventually).|
00001a50  0a 0a 54 68 65 20 70 69  70 65 73 20 61 72 65 20  |..The pipes are |
00001a60  32 6b 20 6c 6f 6e 67 20  69 6e 20 65 61 63 68 20  |2k long in each |
00001a70  64 69 72 65 63 74 69 6f  6e 2e 0a 0a 41 63 6f 72  |direction...Acor|
00001a80  6e 20 54 65 6c 6e 65 74  20 28 4e 65 65 64 73 20  |n Telnet (Needs |
00001a90  41 63 6f 72 6e 27 73 20  54 43 50 2f 49 50 20 70  |Acorn's TCP/IP p|
00001aa0  72 6f 74 6f 63 6f 6c 20  73 75 69 74 65 29 0a 2d  |rotocol suite).-|
00001ab0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 0a 2a 4e 6f 74  |-----------.*Not|
00001ac0  65 21 20 44 6f 65 73 20  6e 6f 74 20 73 74 6f 72  |e! Does not stor|
00001ad0  65 20 52 31 34 5f 53 56  43 0a 0a 54 68 69 73 20  |e R14_SVC..This |
00001ae0  69 73 20 6f 6e 6c 79 20  69 6e 20 74 65 73 74 69  |is only in testi|
00001af0  6e 67 2c 20 62 75 74 20  69 73 20 73 75 70 70 6c  |ng, but is suppl|
00001b00  69 65 64 20 61 73 20 69  74 20 6d 69 67 68 74 20  |ied as it might |
00001b10  62 65 20 75 73 65 66 75  6c 2e 20 54 68 65 20 63  |be useful. The c|
00001b20  6f 64 69 6e 67 0a 69 73  20 70 6f 73 73 69 62 6c  |oding.is possibl|
00001b30  79 20 71 75 69 74 65 20  69 6e 65 66 66 69 63 69  |y quite ineffici|
00001b40  65 6e 74 2c 20 62 75 74  20 69 74 20 77 6f 72 6b  |ent, but it work|
00001b50  73 2e 20 59 6f 75 20 72  65 71 75 69 72 65 20 21  |s. You require !|
00001b60  49 6e 74 65 72 6e 65 74  20 61 6e 64 20 0a 21 54  |Internet and .!T|
00001b70  65 6c 6e 65 74 20 74 6f  20 68 61 76 65 20 62 65  |elnet to have be|
00001b80  65 6e 20 72 75 6e 20 62  65 66 6f 72 65 20 74 72  |en run before tr|
00001b90  79 69 6e 67 20 74 6f 20  75 73 65 20 74 68 65 20  |ying to use the |
00001ba0  64 72 69 76 65 72 2e 20  49 74 20 77 69 6c 6c 20  |driver. It will |
00001bb0  70 72 6f 6d 70 74 0a 66  6f 72 20 61 20 68 6f 73  |prompt.for a hos|
00001bc0  74 20 6e 61 6d 65 20 2d  20 74 79 70 65 20 6f 6e  |t name - type on|
00001bd0  65 2c 20 6f 72 20 61 6e  20 69 6e 74 65 72 6e 65  |e, or an interne|
00001be0  74 20 61 64 64 72 65 73  73 2e 20 59 6f 75 20 63  |t address. You c|
00001bf0  61 6e 20 61 64 64 20 27  2c 78 78 27 0a 77 68 65  |an add ',xx'.whe|
00001c00  72 65 20 78 78 20 69 73  20 74 68 65 20 70 6f 72  |re xx is the por|
00001c10  74 20 6e 75 6d 62 65 72  20 74 6f 20 74 65 6c 6e  |t number to teln|
00001c20  65 74 20 69 6e 74 6f 2e  20 44 43 44 20 61 73 20  |et into. DCD as |
00001c30  72 65 70 6f 72 74 65 64  20 62 79 20 6d 6f 64 65  |reported by mode|
00001c40  6d 0a 73 74 61 74 75 73  20 77 69 6c 6c 20 67 6f  |m.status will go|
00001c50  20 68 69 67 68 20 77 68  65 6e 20 61 20 73 75 63  | high when a suc|
00001c60  65 73 73 66 75 6c 20 63  6f 6e 6e 65 63 74 69 6f  |essful connectio|
00001c70  6e 20 69 73 20 6d 61 64  65 2e 20 44 72 6f 70 70  |n is made. Dropp|
00001c80  69 6e 67 20 44 54 52 0a  74 68 65 6e 20 72 61 69  |ing DTR.then rai|
00001c90  73 69 6e 67 20 69 74 20  61 67 61 69 6e 20 77 69  |sing it again wi|
00001ca0  6c 6c 20 63 6c 65 61 72  20 61 6e 79 20 63 75 72  |ll clear any cur|
00001cb0  72 65 6e 74 20 63 61 6c  6c 2e 0a 0a 4b 6e 6f 77  |rent call...Know|
00001cc0  6e 20 62 75 67 73 3a 20  59 6f 75 20 63 61 6e 27  |n bugs: You can'|
00001cd0  74 20 68 61 76 65 20 6d  75 6c 74 69 70 6c 65 20  |t have multiple |
00001ce0  73 65 73 73 69 6f 6e 73  20 2d 20 69 66 20 79 6f  |sessions - if yo|
00001cf0  75 20 6c 6f 61 64 20 61  6e 6f 74 68 65 72 20 65  |u load another e|
00001d00  6d 75 6c 61 74 6f 72 0a  61 6e 64 20 72 75 6e 20  |mulator.and run |
00001d10  74 65 6c 6e 65 74 20 74  68 65 20 70 6f 72 74 5f  |telnet the port_|
00001d20  63 6c 61 69 6d 20 6d 65  73 73 61 67 65 20 77 69  |claim message wi|
00001d30  6c 6c 20 73 74 6f 70 20  74 68 65 20 66 69 72 73  |ll stop the firs|
00001d40  74 20 6f 6e 65 20 2d 20  70 6f 73 73 69 62 6c 79  |t one - possibly|
00001d50  20 61 0a 27 64 79 6e 61  6d 69 63 27 20 70 6f 72  | a.'dynamic' por|
00001d60  74 20 6e 75 6d 62 65 72  20 28 72 65 74 75 72 6e  |t number (return|
00001d70  65 64 20 62 79 20 69 6e  69 74 3f 29 20 73 68 6f  |ed by init?) sho|
00001d80  75 6c 64 20 62 65 20 70  75 74 20 69 6e 74 6f 20  |uld be put into |
00001d90  74 68 65 20 73 70 65 63  20 74 6f 0a 63 61 74 65  |the spec to.cate|
00001da0  72 20 66 6f 72 20 74 68  69 6e 67 73 20 6c 69 6b  |r for things lik|
00001db0  65 20 74 68 69 73 2e 0a  0a 0a 44 75 6d 6d 79 20  |e this....Dummy |
00001dc0  28 2f 64 65 76 2f 6e 75  6c 6c 29 0a 2d 2d 2d 2d  |(/dev/null).----|
00001dd0  2d 0a 0a 54 68 69 73 20  69 73 20 61 20 64 75 6d  |-..This is a dum|
00001de0  6d 79 20 64 72 69 76 65  72 2c 20 66 6f 72 20 77  |my driver, for w|
00001df0  68 65 6e 20 79 6f 75 20  77 61 6e 74 20 73 6f 6d  |hen you want som|
00001e00  65 77 68 65 72 65 20 74  6f 20 74 72 61 73 68 20  |ewhere to trash |
00001e10  64 61 74 61 2e 20 49 74  0a 61 6c 77 61 79 73 20  |data. It.always |
00001e20  73 68 6f 77 73 20 43 54  53 2c 20 44 53 52 20 61  |shows CTS, DSR a|
00001e30  6e 64 20 44 43 44 2c 20  61 6e 64 20 77 69 6c 6c  |nd DCD, and will|
00001e40  20 63 6f 6d 70 6c 65 74  65 6c 79 20 69 67 6e 6f  | completely igno|
00001e50  72 65 20 61 6e 79 20 64  61 74 61 20 79 6f 75 0a  |re any data you.|
00001e60  73 65 6e 64 20 74 6f 20  69 74 2e 20 49 74 20 6e  |send to it. It n|
00001e70  65 76 65 72 20 68 61 73  20 61 6e 79 20 64 61 74  |ever has any dat|
00001e80  61 20 74 6f 20 67 69 76  65 20 79 6f 75 2e 0a 0a  |a to give you...|
00001e90  49 49 5f 44 75 61 6c 20  64 72 69 76 65 72 0a 2d  |II_Dual driver.-|
00001ea0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 0a 2a 4e  |-------------.*N|
00001eb0  6f 74 65 21 20 44 6f 65  73 20 6e 6f 74 20 73 74  |ote! Does not st|
00001ec0  6f 72 65 20 52 31 34 5f  53 56 43 0a 0a 54 68 69  |ore R14_SVC..Thi|
00001ed0  73 20 69 73 20 61 20 74  65 6d 70 6f 72 61 72 79  |s is a temporary|
00001ee0  20 73 74 6f 70 2d 67 61  70 20 75 6e 74 69 6c 20  | stop-gap until |
00001ef0  76 33 2e 78 78 20 73 6f  66 74 77 61 72 65 20 69  |v3.xx software i|
00001f00  73 20 61 76 61 69 6c 61  62 6c 65 20 66 6f 72 20  |s available for |
00001f10  74 68 65 20 49 49 0a 63  61 72 64 2e 20 54 68 65  |the II.card. The|
00001f20  20 70 6f 72 74 20 6e 75  6d 62 65 72 20 79 6f 75  | port number you|
00001f30  20 73 70 65 63 69 66 79  20 69 73 20 74 68 65 20  | specify is the |
00001f40  49 49 20 70 6f 72 74 20  6e 75 6d 62 65 72 20 2d  |II port number -|
00001f50  31 2c 20 69 65 20 49 49  20 70 6f 72 74 20 33 0a  |1, ie II port 3.|
00001f60  77 6f 75 6c 64 20 62 65  20 73 70 65 63 69 66 69  |would be specifi|
00001f70  65 64 20 61 73 20 70 6f  72 74 20 32 2e 20 49 66  |ed as port 2. If|
00001f80  20 79 6f 75 20 77 61 6e  74 20 74 6f 20 75 73 65  | you want to use|
00001f90  20 74 68 65 20 69 6e 74  65 72 6e 61 6c 20 70 6f  | the internal po|
00001fa0  72 74 20 77 68 69 6c 65  0a 75 73 69 6e 67 20 49  |rt while.using I|
00001fb0  49 20 70 6f 72 74 73 2c  20 79 6f 75 20 6e 65 65  |I ports, you nee|
00001fc0  64 20 74 68 65 20 49 6e  74 65 72 6e 61 6c 32 20  |d the Internal2 |
00001fd0  64 72 69 76 65 72 2e 20  42 6f 74 68 20 6f 66 20  |driver. Both of |
00001fe0  74 68 65 73 65 20 64 72  69 76 65 72 73 0a 72 65  |these drivers.re|
00001ff0  6c 79 20 6f 6e 20 74 68  65 20 70 6f 6c 6c 20 65  |ly on the poll e|
00002000  6e 74 72 79 20 62 65 69  6e 67 20 63 61 6c 6c 65  |ntry being calle|
00002010  64 20 64 69 72 65 63 74  6c 79 20 61 66 74 65 72  |d directly after|
00002020  20 65 61 63 68 20 77 69  6d 70 20 70 6f 6c 6c 2c  | each wimp poll,|
00002030  20 74 6f 20 73 65 74 0a  74 68 65 20 63 75 72 72  | to set.the curr|
00002040  65 6e 74 20 70 6f 72 74  2e 0a 0a 45 63 6f 6e 65  |ent port...Econe|
00002050  74 20 64 72 69 76 65 72  20 28 6e 6f 74 20 73 75  |t driver (not su|
00002060  70 70 6c 69 65 64 20 77  69 74 68 20 74 68 69 73  |pplied with this|
00002070  20 72 65 6c 65 61 73 65  29 0a 2d 2d 2d 2d 2d 2d  | release).------|
00002080  2d 2d 2d 2d 2d 2d 2d 0a  0a 54 68 69 73 20 77 6f  |-------..This wo|
00002090  72 6b 73 20 77 69 74 68  20 41 52 43 74 65 72 6d  |rks with ARCterm|
000020a0  27 73 20 6e 65 77 20 31  36 2d 6c 69 6e 65 20 6d  |'s new 16-line m|
000020b0  6f 64 65 6d 20 73 65 72  76 65 72 20 74 6f 20 61  |odem server to a|
000020c0  6c 6c 6f 77 20 72 65 6d  6f 74 65 20 73 65 72 69  |llow remote seri|
000020d0  61 6c 0a 61 63 63 65 73  73 2e 20 54 6f 20 73 75  |al.access. To su|
000020e0  70 70 6f 72 74 20 63 6f  6e 6e 65 63 74 69 6f 6e  |pport connection|
000020f0  2c 20 65 74 63 2c 20 69  74 20 68 61 73 20 33 20  |, etc, it has 3 |
00002100  73 70 65 63 69 61 6c 20  66 75 6e 63 74 69 6f 6e  |special function|
00002110  73 3a 0a 0a 43 6f 6e 6e  65 63 74 20 28 66 75 6e  |s:..Connect (fun|
00002120  63 74 69 6f 6e 20 63 6f  64 65 20 31 32 38 29 0a  |ction code 128).|
00002130  20 20 72 31 3d 68 61 6e  64 6c 65 2f 6e 65 74 2f  |  r1=handle/net/|
00002140  73 74 61 74 69 6f 6e 20  28 68 61 6e 64 6c 65 20  |station (handle |
00002150  69 6e 20 62 69 74 73 20  31 36 2d 32 33 2c 6e 65  |in bits 16-23,ne|
00002160  74 20 69 6e 20 62 69 74  73 20 38 2d 31 35 2c 20  |t in bits 8-15, |
00002170  73 74 61 74 69 6f 6e 20  69 6e 20 30 2d 37 29 0a  |station in 0-7).|
00002180  20 20 72 32 2d 3e 20 70  61 73 73 77 6f 72 64 2c  |  r2-> password,|
00002190  20 6e 75 6c 6c 20 74 65  72 6d 69 6e 61 74 65 64  | null terminated|
000021a0  0a 0a 20 20 54 72 69 65  73 20 74 6f 20 73 65 74  |..  Tries to set|
000021b0  20 75 70 20 61 20 63 6f  6e 6e 65 63 74 69 6f 6e  | up a connection|
000021c0  20 77 69 74 68 20 74 68  65 20 6d 6f 64 65 6d 20  | with the modem |
000021d0  73 65 72 76 65 72 2e 20  52 65 74 75 72 6e 73 20  |server. Returns |
000021e0  30 20 66 6f 72 20 73 75  63 63 65 73 73 2c 0a 20  |0 for success,. |
000021f0  20 31 20 66 6f 72 20 6e  6f 20 72 65 70 6c 79 2c  | 1 for no reply,|
00002200  20 32 20 66 6f 72 20 61  6c 72 65 61 64 79 20 63  | 2 for already c|
00002210  6f 6e 6e 65 63 74 65 64  2c 20 6f 72 20 61 20 70  |onnected, or a p|
00002220  6f 69 6e 74 65 72 20 74  6f 20 61 6e 20 65 72 72  |ointer to an err|
00002230  6f 72 20 62 6c 6f 63 6b  20 69 66 0a 20 20 72 30  |or block if.  r0|
00002240  20 69 73 20 27 62 69 67  27 20 6f 6e 20 72 65 74  | is 'big' on ret|
00002250  75 72 6e 2e 0a 0a 44 69  73 63 6f 6e 6e 65 63 74  |urn...Disconnect|
00002260  20 28 66 75 6e 63 74 69  6f 6e 20 63 6f 64 65 20  | (function code |
00002270  31 32 39 29 0a 20 20 44  69 73 63 6f 6e 6e 65 63  |129).  Disconnec|
00002280  74 73 20 66 72 6f 6d 20  74 68 65 20 6d 6f 64 65  |ts from the mode|
00002290  6d 20 73 65 72 76 65 72  2e 0a 0a 53 63 61 6e 20  |m server...Scan |
000022a0  66 6f 72 20 6d 6f 64 65  6d 20 73 65 72 76 65 72  |for modem server|
000022b0  73 20 28 66 75 6e 63 74  69 6f 6e 20 63 6f 64 65  |s (function code|
000022c0  20 31 33 30 29 0a 20 20  72 31 3d 62 75 66 66 65  | 130).  r1=buffe|
000022d0  72 20 74 6f 20 66 69 6c  6c 20 6f 66 20 66 6f 72  |r to fill of for|
000022e0  6d 61 74 3a 0a 20 20 20  20 20 30 20 20 20 20 73  |mat:.     0    s|
000022f0  74 61 74 69 6f 6e 0a 20  20 20 20 20 31 20 20 20  |tation.     1   |
00002300  20 6e 65 74 0a 20 20 20  20 20 32 20 20 20 20 68  | net.     2    h|
00002310  61 6e 64 6c 65 0a 20 20  20 20 20 33 20 20 20 20  |andle.     3    |
00002320  6d 6f 64 65 6d 20 64 72  69 76 65 72 20 6e 75 6d  |modem driver num|
00002330  62 65 72 20 61 73 20 64  65 66 69 6e 65 64 20 69  |ber as defined i|
00002340  6e 20 74 68 65 20 6d 6f  64 65 6d 20 73 65 72 76  |n the modem serv|
00002350  65 72 20 63 6f 6e 66 69  67 20 66 69 6c 65 0a 20  |er config file. |
00002360  20 20 20 20 34 2d 36 33  20 6d 6f 64 65 6d 20 49  |    4-63 modem I|
00002370  44 20 73 74 72 69 6e 67  20 28 6e 75 6c 6c 20 74  |D string (null t|
00002380  65 72 6d 69 6e 61 74 65  64 29 0a 20 20 72 32 3d  |erminated).  r2=|
00002390  6d 61 78 20 6e 75 6d 62  65 72 20 6f 66 20 65 6e  |max number of en|
000023a0  74 72 69 65 73 20 74 61  62 6c 65 20 63 61 6e 20  |tries table can |
000023b0  68 61 6e 64 6c 65 0a 0a  2d 2d 2d 2d 2d 2d 2d 2d  |handle..--------|
000023c0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00002400  2d 2d 2d 2d 2d 2d 2d 0a  44 72 69 76 65 72 20 6c  |-------.Driver l|
00002410  61 79 6f 75 74 0a 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |ayout.----------|
00002420  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00002460  2d 2d 2d 2d 2d 0a 0a 30  78 30 30 30 20 45 6e 74  |-----..0x000 Ent|
00002470  72 79 20 70 6f 69 6e 74  20 74 6f 20 63 61 6c 6c  |ry point to call|
00002480  20 72 6f 75 74 69 6e 65  73 0a 0a 20 20 20 20 20  | routines..     |
00002490  20 49 6e 3a 20 20 72 30  3d 66 75 6e 63 74 69 6f  | In:  r0=functio|
000024a0  6e 20 63 6f 64 65 0a 20  20 20 20 20 20 20 20 20  |n code.         |
000024b0  20 20 72 31 2d 72 33 3d  64 61 74 61 0a 0a 20 20  |  r1-r3=data..  |
000024c0  20 20 20 20 4f 75 74 3a  20 72 30 3d 72 65 73 75  |    Out: r0=resu|
000024d0  6c 74 0a 0a 20 20 20 20  20 20 4e 4f 54 45 21 20  |lt..      NOTE! |
000024e0  43 48 41 4e 47 45 20 49  4e 20 52 45 56 49 53 49  |CHANGE IN REVISI|
000024f0  4f 4e 20 39 21 0a 20 20  20 20 20 20 7c 0a 20 20  |ON 9!.      |.  |
00002500  20 20 20 20 7c 20 54 68  69 73 20 65 6e 74 72 79  |    | This entry|
00002510  20 70 6f 69 6e 74 20 63  61 6e 20 62 65 20 63 61  | point can be ca|
00002520  6c 6c 65 64 20 69 6e 20  45 49 54 48 45 52 20 75  |lled in EITHER u|
00002530  73 65 72 20 6f 72 20 73  75 70 65 72 76 69 73 6f  |ser or superviso|
00002540  72 20 6d 6f 64 65 2c 20  73 6f 0a 20 20 20 20 20  |r mode, so.     |
00002550  20 7c 20 52 31 34 20 73  68 6f 75 6c 64 20 61 6c  | | R14 should al|
00002560  77 61 79 73 20 62 65 20  70 75 73 68 65 64 20 6f  |ways be pushed o|
00002570  6e 20 74 68 65 20 73 74  61 63 6b 20 28 53 54 4d  |n the stack (STM|
00002580  46 44 20 52 31 33 21 2c  7b 52 31 34 7d 29 20 61  |FD R13!,{R14}) a|
00002590  6e 64 20 62 65 20 75 73  65 64 0a 20 20 20 20 20  |nd be used.     |
000025a0  20 7c 20 74 6f 20 72 65  74 75 72 6e 20 66 72 6f  | | to return fro|
000025b0  6d 20 74 68 65 20 64 72  69 76 65 72 20 73 6f 20  |m the driver so |
000025c0  74 68 61 74 20 72 31 34  5f 73 76 63 20 69 73 20  |that r14_svc is |
000025d0  70 72 65 73 65 72 76 65  64 20 69 66 20 74 68 65  |preserved if the|
000025e0  20 64 72 69 76 65 72 20  69 73 0a 20 20 20 20 20  | driver is.     |
000025f0  20 7c 20 63 61 6c 6c 65  64 20 77 68 65 6e 20 69  | | called when i|
00002600  6e 20 73 75 70 65 72 76  69 73 6f 72 20 6d 6f 64  |n supervisor mod|
00002610  65 2e 0a 20 20 20 20 20  20 7c 0a 0a 20 20 20 20  |e..      |..    |
00002620  20 20 72 30 2d 72 33 20  63 61 6e 20 62 65 20 63  |  r0-r3 can be c|
00002630  6f 72 72 75 70 74 65 64  2c 20 72 34 2d 72 31 32  |orrupted, r4-r12|
00002640  20 73 68 6f 75 6c 64 20  62 65 20 70 72 65 73 65  | should be prese|
00002650  72 76 65 64 2e 20 72 31  34 20 63 6f 6e 74 61 69  |rved. r14 contai|
00002660  6e 73 20 74 68 65 0a 20  20 20 20 20 20 72 65 74  |ns the.      ret|
00002670  75 72 6e 20 61 64 64 72  65 73 73 0a 0a 20 20 20  |urn address..   |
00002680  20 20 20 43 61 6c 6c 65  72 73 20 6e 6f 74 65 20  |   Callers note |
00002690  74 68 61 74 20 72 31 33  20 73 68 6f 75 6c 64 20  |that r13 should |
000026a0  70 6f 69 6e 74 20 74 6f  20 61 20 66 75 6c 6c 2c  |point to a full,|
000026b0  20 64 65 73 63 65 6e 64  69 6e 67 20 73 74 61 63  | descending stac|
000026c0  6b 0a 20 20 20 20 20 20  77 69 74 68 20 61 20 64  |k.      with a d|
000026d0  65 63 65 6e 74 20 61 6d  6f 75 6e 74 20 6f 66 20  |ecent amount of |
000026e0  73 70 61 63 65 20 66 72  65 65 20 6f 6e 20 69 74  |space free on it|
000026f0  2e 0a 0a 20 20 20 20 20  20 45 78 61 6d 70 6c 65  |...      Example|
00002700  20 68 61 6e 64 6c 65 72  20 63 6f 64 65 20 66 6f  | handler code fo|
00002710  6c 6c 6f 77 73 3a 0a 0a  20 20 20 20 20 20 65 6e  |llows:..      en|
00002720  74 72 79 0a 20 20 20 20  20 20 20 20 20 20 20 20  |try.            |
00002730  53 54 4d 46 44 20 52 31  33 21 2c 7b 52 31 34 7d  |STMFD R13!,{R14}|
00002740  0a 20 20 20 20 20 20 20  20 20 20 20 20 43 4d 50  |.            CMP|
00002750  20 20 20 52 30 2c 23 28  28 65 6e 64 6f 66 74 61  |   R0,#((endofta|
00002760  62 6c 65 2d 74 61 62 6c  65 29 2f 34 29 0a 20 20  |ble-table)/4).  |
00002770  20 20 20 20 20 20 20 20  20 20 41 44 44 43 43 20  |          ADDCC |
00002780  50 43 2c 50 43 2c 52 30  2c 4c 53 4c 23 32 0a 20  |PC,PC,R0,LSL#2. |
00002790  20 20 20 20 20 20 20 20  20 20 20 4c 44 4d 46 44  |           LDMFD|
000027a0  20 52 31 33 21 2c 7b 50  43 7d 0a 0a 20 20 20 20  | R13!,{PC}..    |
000027b0  20 20 74 61 62 6c 65 0a  20 20 20 20 20 20 20 20  |  table.        |
000027c0  20 20 20 20 42 20 20 20  20 20 66 75 6e 63 5f 30  |    B     func_0|
000027d0  0a 20 20 20 20 20 20 20  20 20 20 20 20 42 20 20  |.            B  |
000027e0  20 20 20 66 75 6e 63 5f  31 0a 20 20 20 20 20 20  |   func_1.      |
000027f0  65 6e 64 74 61 62 6c 65  0a 0a 30 78 30 38 30 20  |endtable..0x080 |
00002800  44 72 69 76 65 72 20 69  6e 66 6f 72 6d 61 74 69  |Driver informati|
00002810  6f 6e 20 73 74 72 69 6e  67 20 28 33 31 20 62 79  |on string (31 by|
00002820  74 65 73 20 6d 61 78 2c  20 30 20 74 65 72 6d 69  |tes max, 0 termi|
00002830  6e 61 74 65 64 29 0a 30  78 30 41 30 20 4d 61 6e  |nated).0x0A0 Man|
00002840  75 66 61 63 74 75 72 65  72 20 69 6e 66 6f 72 6d  |ufacturer inform|
00002850  61 74 69 6f 6e 20 73 74  72 69 6e 67 20 28 33 31  |ation string (31|
00002860  20 62 79 74 65 73 20 6d  61 78 2c 20 30 20 74 65  | bytes max, 0 te|
00002870  72 6d 69 6e 61 74 65 64  29 0a 30 78 30 43 30 20  |rminated).0x0C0 |
00002880  56 65 72 73 69 6f 6e 20  6e 75 6d 62 65 72 20 28  |Version number (|
00002890  74 6f 70 20 31 36 20 62  69 74 73 20 6d 61 6a 6f  |top 16 bits majo|
000028a0  72 2c 20 6c 6f 77 20 31  36 20 62 69 74 73 20 6d  |r, low 16 bits m|
000028b0  69 6e 6f 72 29 0a 30 78  30 43 34 20 44 72 69 76  |inor).0x0C4 Driv|
000028c0  65 72 20 66 6c 61 67 73  0a 0a 20 20 20 20 20 20  |er flags..      |
000028d0  30 78 30 30 30 30 30 30  30 31 20 2d 20 4d 6f 72  |0x00000001 - Mor|
000028e0  65 20 74 68 61 6e 20 6f  6e 65 20 70 6f 72 74 20  |e than one port |
000028f0  61 76 61 69 6c 69 61 62  6c 65 0a 20 20 20 20 20  |availiable.     |
00002900  20 30 78 30 30 30 30 30  30 30 32 20 2d 20 53 75  | 0x00000002 - Su|
00002910  70 70 6f 72 74 73 20 73  70 6c 69 74 20 72 61 74  |pports split rat|
00002920  65 73 0a 20 20 20 20 20  20 30 78 30 30 30 30 30  |es.      0x00000|
00002930  30 30 34 20 2d 20 48 61  73 20 3e 31 20 62 79 74  |004 - Has >1 byt|
00002940  65 20 68 61 72 64 77 61  72 65 20 46 49 46 4f 0a  |e hardware FIFO.|
00002950  20 20 20 20 20 20 30 78  30 30 30 30 30 30 30 38  |      0x00000008|
00002960  20 2d 20 43 61 6e 20 75  73 65 20 53 65 74 20 63  | - Can use Set c|
00002970  6f 6e 74 72 6f 6c 20 6c  69 6e 65 73 20 74 6f 20  |ontrol lines to |
00002980  67 65 6e 65 72 61 74 65  20 61 20 62 72 65 61 6b  |generate a break|
00002990  0a 20 20 20 20 20 20 30  78 30 30 30 30 30 30 31  |.      0x0000001|
000029a0  30 20 2d 20 52 65 71 75  69 72 65 73 20 70 6f 6c  |0 - Requires pol|
000029b0  6c 69 6e 67 20 28 62 79  20 66 75 6e 63 74 69 6f  |ling (by functio|
000029c0  6e 20 31 39 29 0a 20 20  20 20 20 20 30 78 30 30  |n 19).      0x00|
000029d0  30 30 30 30 32 30 20 2d  20 57 6f 6e 27 74 20 65  |000020 - Won't e|
000029e0  6d 70 74 79 20 28 69 73  20 61 20 73 68 61 72 65  |mpty (is a share|
000029f0  64 20 62 75 66 66 65 72  29 0a 20 20 20 20 20 20  |d buffer).      |
00002a00  30 78 30 30 30 30 30 30  34 30 20 2d 20 53 75 70  |0x00000040 - Sup|
00002a10  70 6f 72 74 73 20 62 6c  6f 63 6b 20 67 65 74 2f  |ports block get/|
00002a20  70 75 74 20 6f 70 65 72  61 74 69 6f 6e 73 0a 20  |put operations. |
00002a30  20 20 20 20 20 30 78 30  30 30 30 30 30 38 30 20  |     0x00000080 |
00002a40  2d 20 50 72 65 66 65 72  20 6e 6f 74 20 74 6f 20  |- Prefer not to |
00002a50  6f 76 65 72 6c 61 70 20  73 65 72 69 61 6c 20 49  |overlap serial I|
00002a60  4f 20 61 6e 64 20 64 69  73 6b 20 49 4f 0a 20 20  |O and disk IO.  |
00002a70  20 20 20 20 30 78 30 30  30 30 30 31 30 30 20 2d  |    0x00000100 -|
00002a80  20 53 75 70 70 6f 72 74  73 20 69 6e 71 75 69 72  | Supports inquir|
00002a90  79 20 69 6e 69 74 69 61  6c 69 73 65 0a 0a 20 20  |y initialise..  |
00002aa0  20 20 20 20 30 78 64 64  2e 2e 2e 2e 2e 2e 20 2d  |    0xdd...... -|
00002ab0  20 54 6f 70 20 62 79 74  65 20 69 73 20 68 69 67  | Top byte is hig|
00002ac0  68 65 73 74 20 70 6f 72  74 20 6e 75 6d 62 65 72  |hest port number|
00002ad0  20 73 75 70 70 6f 72 74  65 64 20 28 6e 75 6d 62  | supported (numb|
00002ae0  65 72 65 64 20 66 72 6f  6d 20 30 29 0a 30 78 30  |ered from 0).0x0|
00002af0  43 38 20 44 72 69 76 65  72 20 6e 75 6d 62 65 72  |C8 Driver number|
00002b00  2e 20 54 68 69 73 20 69  73 20 61 6c 6c 6f 63 61  |. This is alloca|
00002b10  74 65 64 20 62 79 20 6d  65 2c 20 61 6e 64 20 61  |ted by me, and a|
00002b20  6c 77 61 79 73 20 68 61  73 20 74 68 65 20 6c 6f  |lways has the lo|
00002b30  77 65 73 74 20 62 79 74  65 0a 20 20 20 20 20 20  |west byte.      |
00002b40  61 73 20 30 2e 20 54 68  65 20 70 75 72 70 6f 73  |as 0. The purpos|
00002b50  65 20 6f 66 20 74 68 65  20 64 72 69 76 65 72 20  |e of the driver |
00002b60  6e 75 6d 62 65 72 20 69  73 20 66 6f 72 20 74 68  |number is for th|
00002b70  65 20 44 65 76 69 63 65  5f 43 6c 61 69 6d 20 70  |e Device_Claim p|
00002b80  72 6f 74 6f 63 6f 6c 3a  0a 20 20 20 20 20 20 77  |rotocol:.      w|
00002b90  68 65 6e 20 61 20 73 65  72 69 61 6c 20 70 6f 72  |hen a serial por|
00002ba0  74 20 69 73 20 73 70 65  63 69 66 69 65 64 2c 20  |t is specified, |
00002bb0  74 68 65 20 70 6f 72 74  20 6e 75 6d 62 65 72 20  |the port number |
00002bc0  69 73 20 75 73 65 64 20  74 6f 20 73 70 65 63 69  |is used to speci|
00002bd0  66 79 0a 20 20 20 20 20  20 77 68 69 63 68 20 70  |fy.      which p|
00002be0  6f 72 74 20 69 73 20 74  6f 20 62 65 20 63 6c 61  |ort is to be cla|
00002bf0  69 6d 65 64 2f 72 65 6c  65 61 73 65 64 2e 20 54  |imed/released. T|
00002c00  68 65 20 69 6e 74 65 72  6e 61 6c 20 70 6f 72 74  |he internal port|
00002c10  20 69 73 20 70 6f 72 74  20 30 20 61 6e 64 0a 20  | is port 0 and. |
00002c20  20 20 20 20 20 64 72 69  76 65 72 20 6e 75 6d 62  |     driver numb|
00002c30  65 72 20 30 2e 20 54 6f  20 6d 61 6b 65 20 74 68  |er 0. To make th|
00002c40  65 20 70 6f 72 74 20 6e  75 6d 62 65 72 20 74 6f  |e port number to|
00002c50  20 75 73 65 20 79 6f 75  20 61 64 64 20 74 68 65  | use you add the|
00002c60  20 73 75 62 2d 70 6f 72  74 0a 20 20 20 20 20 20  | sub-port.      |
00002c70  6e 75 6d 62 65 72 20 61  6e 64 20 74 68 65 20 64  |number and the d|
00002c80  72 69 76 65 72 20 6e 75  6d 62 65 72 20 74 6f 67  |river number tog|
00002c90  65 74 68 65 72 2e 20 65  67 2c 20 73 61 79 20 74  |ether. eg, say t|
00002ca0  68 65 20 49 49 20 64 75  61 6c 20 63 61 72 64 20  |he II dual card |
00002cb0  77 61 73 0a 20 20 20 20  20 20 64 72 69 76 65 72  |was.      driver|
00002cc0  20 6e 75 6d 62 65 72 20  31 20 28 30 78 30 30 30  | number 1 (0x000|
00002cd0  30 30 31 30 30 29 20 61  6e 64 20 79 6f 75 20 77  |00100) and you w|
00002ce0  61 6e 74 65 64 20 74 6f  20 63 6c 61 69 6d 20 70  |anted to claim p|
00002cf0  6f 72 74 20 35 2c 20 79  6f 75 0a 20 20 20 20 20  |ort 5, you.     |
00002d00  20 77 6f 75 6c 64 20 75  73 65 20 74 68 65 20 70  | would use the p|
00002d10  6f 72 74 20 6e 75 6d 62  65 72 20 30 78 30 30 30  |ort number 0x000|
00002d20  30 30 31 30 35 2e 20 54  68 69 73 20 69 73 20 75  |00105. This is u|
00002d30  6e 69 71 75 65 20 61 6e  64 20 68 6f 70 65 66 75  |nique and hopefu|
00002d40  6c 6c 79 0a 20 20 20 20  20 20 77 6f 75 6c 64 20  |lly.      would |
00002d50  63 61 75 73 65 20 6e 6f  20 70 72 6f 62 6c 65 6d  |cause no problem|
00002d60  73 2e 0a 0a 20 20 20 20  20 20 50 4f 52 54 20 4e  |s...      PORT N|
00002d70  55 4d 42 45 52 53 20 50  41 53 53 45 44 20 54 4f  |UMBERS PASSED TO|
00002d80  20 42 4c 4f 43 4b 20 44  52 49 56 45 52 53 20 41  | BLOCK DRIVERS A|
00002d90  52 45 20 54 48 45 20 4c  4f 57 45 52 20 38 20 42  |RE THE LOWER 8 B|
00002da0  49 54 53 20 4f 4e 4c 59  3a 20 54 48 45 59 20 44  |ITS ONLY: THEY D|
00002db0  4f 0a 20 20 20 20 20 20  4e 4f 54 20 49 4e 43 4c  |O.      NOT INCL|
00002dc0  55 44 45 20 54 48 45 20  44 52 49 56 45 52 20 4e  |UDE THE DRIVER N|
00002dd0  55 4d 42 45 52 2e 0a 0a  20 20 20 20 20 20 43 75  |UMBER...      Cu|
00002de0  72 72 65 6e 74 6c 79 20  61 6c 6c 6f 63 61 74 65  |rrently allocate|
00002df0  64 20 64 72 69 76 65 72  20 6e 75 6d 62 65 72 73  |d driver numbers|
00002e00  3a 0a 0a 20 20 20 20 20  20 20 20 30 20 2d 20 49  |:..        0 - I|
00002e10  6e 74 65 72 6e 61 6c 20  73 65 72 69 61 6c 0a 20  |nternal serial. |
00002e20  20 20 20 20 20 20 20 31  20 2d 20 49 49 20 64 75  |       1 - II du|
00002e30  61 6c 20 73 65 72 69 61  6c 0a 20 20 20 20 20 20  |al serial.      |
00002e40  20 20 32 20 2d 20 53 65  72 69 61 6c 20 70 6f 72  |  2 - Serial por|
00002e50  74 20 64 75 61 6c 20 73  65 72 69 61 6c 0a 20 20  |t dual serial.  |
00002e60  20 20 20 20 20 20 33 20  2d 20 49 6e 74 65 72 6e  |      3 - Intern|
00002e70  61 6c 20 73 65 72 69 61  6c 20 77 69 74 68 20 50  |al serial with P|
00002e80  43 20 63 61 62 6c 65 0a  20 20 20 20 20 20 20 20  |C cable.        |
00002e90  34 20 2d 20 42 72 61 69  6e 73 6f 66 74 20 4d 75  |4 - Brainsoft Mu|
00002ea0  6c 74 69 70 6f 64 20 28  4b 65 6c 76 69 6e 20 48  |ltipod (Kelvin H|
00002eb0  69 6c 6c 2c 20 23 31 37  39 20 6f 6e 20 43 72 79  |ill, #179 on Cry|
00002ec0  74 6f 6e 29 0a 20 20 20  20 20 20 20 20 35 20 2d  |ton).        5 -|
00002ed0  20 41 63 6f 72 6e 20 74  65 6c 6e 65 74 20 69 6e  | Acorn telnet in|
00002ee0  74 65 72 66 61 63 65 0a  20 20 20 20 20 20 20 20  |terface.        |
00002ef0  36 20 2d 20 53 65 72 69  61 6c 20 70 6f 72 74 20  |6 - Serial port |
00002f00  64 75 61 6c 20 73 65 72  69 61 6c 20 77 69 74 68  |dual serial with|
00002f10  20 50 43 20 63 61 62 6c  65 0a 0a 20 20 20 20 20  | PC cable..     |
00002f20  20 31 30 30 20 2d 20 52  65 6d 6f 74 65 20 65 63  | 100 - Remote ec|
00002f30  6f 6e 65 74 20 64 72 69  76 65 72 0a 20 20 20 20  |onet driver.    |
00002f40  20 20 31 32 38 20 2d 20  56 69 72 74 75 61 6c 20  |  128 - Virtual |
00002f50  70 69 70 65 20 28 65 6e  64 20 41 29 0a 20 20 20  |pipe (end A).   |
00002f60  20 20 20 31 32 39 20 2d  20 56 69 72 74 75 61 6c  |   129 - Virtual|
00002f70  20 70 69 70 65 20 28 65  6e 64 20 42 29 0a 0a 30  | pipe (end B)..0|
00002f80  78 30 43 43 20 2d 20 30  78 30 46 46 20 72 65 73  |x0CC - 0x0FF res|
00002f90  65 72 76 65 64 0a 0a 30  78 31 30 30 20 53 75 70  |erved..0x100 Sup|
00002fa0  70 6f 72 74 65 64 20 73  70 65 65 64 20 74 61 62  |ported speed tab|
00002fb0  6c 65 2e 20 4f 6e 65 20  77 6f 72 64 20 70 65 72  |le. One word per|
00002fc0  20 73 70 65 65 64 2c 20  74 65 72 6d 69 6e 61 74  | speed, terminat|
00002fd0  65 64 20 77 69 74 68 20  61 20 6e 75 6c 6c 20 77  |ed with a null w|
00002fe0  6f 72 64 2e 0a 0a 30 78  31 38 30 2d 3e 20 64 72  |ord...0x180-> dr|
00002ff0  69 76 65 72 20 63 6f 64  65 2e 0a 0a 46 75 6e 63  |iver code...Func|
00003000  74 69 6f 6e 20 63 6f 64  65 73 0a 2d 2d 2d 2d 2d  |tion codes.-----|
00003010  2d 2d 2d 2d 2d 2d 2d 2d  2d 0a 0a 72 30 3d 30 20  |---------..r0=0 |
00003020  20 50 75 74 20 62 79 74  65 0a 20 20 20 20 20 20  | Put byte.      |
00003030  2d 2d 2d 2d 2d 2d 2d 2d  0a 20 20 20 20 20 20 72  |--------.      r|
00003040  31 3d 70 6f 72 74 20 6e  75 6d 62 65 72 0a 20 20  |1=port number.  |
00003050  20 20 20 20 72 32 3d 62  79 74 65 20 74 6f 20 73  |    r2=byte to s|
00003060  65 6e 64 0a 0a 20 20 20  20 20 20 52 65 74 75 72  |end..      Retur|
00003070  6e 73 20 77 69 74 68 20  72 30 3d 2d 31 20 69 66  |ns with r0=-1 if|
00003080  20 62 79 74 65 20 6e 6f  74 20 69 6e 73 65 72 74  | byte not insert|
00003090  65 64 2c 20 72 30 3d 30  20 69 66 20 62 79 74 65  |ed, r0=0 if byte|
000030a0  20 69 6e 73 65 72 74 65  64 20 69 6e 74 6f 0a 20  | inserted into. |
000030b0  20 20 20 20 20 54 58 20  71 75 65 75 65 2e 0a 0a  |     TX queue...|
000030c0  72 30 3d 31 20 20 47 65  74 20 62 79 74 65 0a 20  |r0=1  Get byte. |
000030d0  20 20 20 20 20 2d 2d 2d  2d 2d 2d 2d 2d 0a 20 20  |     --------.  |
000030e0  20 20 20 20 72 31 3d 70  6f 72 74 20 6e 75 6d 62  |    r1=port numb|
000030f0  65 72 0a 0a 20 20 20 20  20 20 52 65 74 75 72 6e  |er..      Return|
00003100  73 20 77 69 74 68 20 72  30 3d 2d 31 20 69 66 20  |s with r0=-1 if |
00003110  6e 6f 20 62 79 74 65 20  61 76 61 69 6c 69 61 62  |no byte availiab|
00003120  6c 65 2c 20 72 30 3d 62  79 74 65 20 69 66 20 61  |le, r0=byte if a|
00003130  20 62 79 74 65 20 77 61  73 20 72 65 6d 6f 76 65  | byte was remove|
00003140  64 2e 0a 0a 72 30 3d 32  20 20 50 75 74 20 62 6c  |d...r0=2  Put bl|
00003150  6f 63 6b 0a 20 20 20 20  20 20 2d 2d 2d 2d 2d 2d  |ock.      ------|
00003160  2d 2d 2d 0a 20 20 20 20  20 20 72 31 3d 70 6f 72  |---.      r1=por|
00003170  74 20 6e 75 6d 62 65 72  0a 20 20 20 20 20 20 72  |t number.      r|
00003180  32 3d 70 6f 69 6e 74 65  72 20 74 6f 20 62 6c 6f  |2=pointer to blo|
00003190  63 6b 0a 20 20 20 20 20  20 72 33 3d 6e 75 6d 62  |ck.      r3=numb|
000031a0  65 72 20 6f 66 20 62 79  74 65 73 20 74 6f 20 74  |er of bytes to t|
000031b0  72 79 20 61 6e 64 20 69  6e 73 65 72 74 0a 0a 20  |ry and insert.. |
000031c0  20 20 20 20 20 52 65 74  75 72 6e 73 20 77 69 74  |     Returns wit|
000031d0  68 20 72 30 3d 6e 75 6d  62 65 72 20 6f 66 20 62  |h r0=number of b|
000031e0  79 74 65 73 20 73 75 63  65 73 73 66 75 6c 6c 79  |ytes sucessfully|
000031f0  20 69 6e 73 65 72 74 65  64 2e 0a 0a 72 30 3d 33  | inserted...r0=3|
00003200  20 20 47 65 74 20 62 6c  6f 63 6b 0a 20 20 20 20  |  Get block.    |
00003210  20 20 2d 2d 2d 2d 2d 2d  2d 2d 2d 0a 20 20 20 20  |  ---------.    |
00003220  20 20 72 31 3d 70 6f 72  74 20 6e 75 6d 62 65 72  |  r1=port number|
00003230  0a 20 20 20 20 20 20 72  32 3d 70 6f 69 6e 74 65  |.      r2=pointe|
00003240  72 20 74 6f 20 62 6c 6f  63 6b 0a 20 20 20 20 20  |r to block.     |
00003250  20 72 33 3d 6d 61 78 69  6d 75 6d 20 6e 75 6d 62  | r3=maximum numb|
00003260  65 72 20 6f 66 20 62 79  74 65 73 20 74 6f 20 70  |er of bytes to p|
00003270  75 74 20 69 6e 74 6f 20  62 75 66 66 65 72 0a 0a  |ut into buffer..|
00003280  20 20 20 20 20 20 52 65  74 75 72 6e 73 20 77 69  |      Returns wi|
00003290  74 68 20 72 30 3d 6e 75  6d 62 65 72 20 6f 66 20  |th r0=number of |
000032a0  62 79 74 65 73 20 70 75  74 20 69 6e 20 62 75 66  |bytes put in buf|
000032b0  66 65 72 2e 0a 0a 72 30  3d 34 20 20 43 68 65 63  |fer...r0=4  Chec|
000032c0  6b 20 54 58 20 62 75 66  66 65 72 0a 20 20 20 20  |k TX buffer.    |
000032d0  20 20 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |  --------------|
000032e0  2d 0a 20 20 20 20 20 20  72 31 3d 70 6f 72 74 20  |-.      r1=port |
000032f0  6e 75 6d 62 65 72 0a 0a  20 20 20 20 20 20 52 65  |number..      Re|
00003300  74 75 72 6e 73 20 77 69  74 68 20 72 30 3d 6e 75  |turns with r0=nu|
00003310  6d 62 65 72 20 6f 66 20  62 79 74 65 73 20 66 72  |mber of bytes fr|
00003320  65 65 20 69 6e 20 54 58  20 62 75 66 66 65 72 0a  |ee in TX buffer.|
00003330  0a 72 30 3d 35 20 20 43  68 65 63 6b 20 52 58 20  |.r0=5  Check RX |
00003340  62 75 66 66 65 72 0a 20  20 20 20 20 20 2d 2d 2d  |buffer.      ---|
00003350  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 0a 20 20 20  |------------.   |
00003360  20 20 20 72 31 3d 70 6f  72 74 20 6e 75 6d 62 65  |   r1=port numbe|
00003370  72 0a 0a 20 20 20 20 20  20 52 65 74 75 72 6e 73  |r..      Returns|
00003380  20 77 69 74 68 20 72 30  3d 6e 75 6d 62 65 72 20  | with r0=number |
00003390  6f 66 20 62 79 74 65 73  20 75 73 65 64 20 69 6e  |of bytes used in|
000033a0  20 52 58 20 62 75 66 66  65 72 0a 0a 72 30 3d 36  | RX buffer..r0=6|
000033b0  20 20 46 6c 75 73 68 20  54 58 20 62 75 66 66 65  |  Flush TX buffe|
000033c0  72 20 28 61 6e 64 20 68  61 72 64 77 61 72 65 20  |r (and hardware |
000033d0  46 49 46 4f 20 69 66 20  61 70 70 6c 69 63 61 62  |FIFO if applicab|
000033e0  6c 65 29 0a 20 20 20 20  20 20 2d 2d 2d 2d 2d 2d  |le).      ------|
000033f0  2d 2d 2d 2d 2d 2d 2d 2d  2d 0a 20 20 20 20 20 20  |---------.      |
00003400  72 31 3d 70 6f 72 74 20  6e 75 6d 62 65 72 0a 0a  |r1=port number..|
00003410  72 30 3d 37 20 20 46 6c  75 73 68 20 52 58 20 62  |r0=7  Flush RX b|
00003420  75 66 66 65 72 20 28 61  6e 64 20 68 61 72 64 77  |uffer (and hardw|
00003430  61 72 65 20 46 49 46 4f  20 69 66 20 61 70 70 6c  |are FIFO if appl|
00003440  69 63 61 62 6c 65 29 0a  20 20 20 20 20 20 2d 2d  |icable).      --|
00003450  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 0a 20 20  |-------------.  |
00003460  20 20 20 20 72 31 3d 70  6f 72 74 20 6e 75 6d 62  |    r1=port numb|
00003470  65 72 0a 0a 72 30 3d 38  20 20 43 6f 6e 74 72 6f  |er..r0=8  Contro|
00003480  6c 20 6c 69 6e 65 73 0a  20 20 20 20 20 20 2d 2d  |l lines.      --|
00003490  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 0a 20 20 20 20  |-----------.    |
000034a0  20 20 72 31 3d 70 6f 72  74 20 6e 75 6d 62 65 72  |  r1=port number|
000034b0  0a 20 20 20 20 20 20 72  32 3d 2d 31 20 74 6f 20  |.      r2=-1 to |
000034c0  72 65 61 64 20 6f 72 20  6e 65 77 20 73 65 74 74  |read or new sett|
000034d0  69 6e 67 73 0a 0a 20 20  20 20 20 20 52 65 74 75  |ings..      Retu|
000034e0  72 6e 73 20 72 30 3d 63  6f 6e 74 72 6f 6c 20 6c  |rns r0=control l|
000034f0  69 6e 65 20 73 65 74 74  69 6e 67 73 0a 0a 20 20  |ine settings..  |
00003500  20 20 20 20 62 30 3d 44  54 52 0a 20 20 20 20 20  |    b0=DTR.     |
00003510  20 62 31 3d 52 54 53 0a  20 20 20 20 20 20 62 32  | b1=RTS.      b2|
00003520  3d 49 66 20 73 65 74 2c  20 73 65 74 20 54 58 20  |=If set, set TX |
00003530  64 61 74 61 20 61 63 74  69 76 65 20 28 69 65 20  |data active (ie |
00003540  62 72 65 61 6b 20 73 74  61 74 65 29 0a 0a 72 30  |break state)..r0|
00003550  3d 39 20 20 52 65 61 64  20 6d 6f 64 65 6d 20 63  |=9  Read modem c|
00003560  6f 6e 74 72 6f 6c 20 6c  69 6e 65 73 0a 20 20 20  |ontrol lines.   |
00003570  20 20 20 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |   -------------|
00003580  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 0a 20 20 20 20  |-----------.    |
00003590  20 20 72 31 3d 70 6f 72  74 20 6e 75 6d 62 65 72  |  r1=port number|
000035a0  0a 0a 20 20 20 20 20 20  52 65 74 75 72 6e 73 20  |..      Returns |
000035b0  72 30 3d 63 6f 6e 74 72  6f 6c 20 6c 69 6e 65 20  |r0=control line |
000035c0  73 74 61 74 75 73 0a 0a  20 20 20 20 20 20 62 30  |status..      b0|
000035d0  3d 43 54 53 0a 20 20 20  20 20 20 62 31 3d 44 53  |=CTS.      b1=DS|
000035e0  52 0a 20 20 20 20 20 20  62 32 3d 52 49 0a 20 20  |R.      b2=RI.  |
000035f0  20 20 20 20 62 33 3d 44  43 44 0a 0a 72 30 3d 31  |    b3=DCD..r0=1|
00003600  30 20 52 65 61 64 20 52  58 20 65 72 72 6f 72 73  |0 Read RX errors|
00003610  0a 20 20 20 20 20 20 2d  2d 2d 2d 2d 2d 2d 2d 2d  |.      ---------|
00003620  2d 2d 2d 2d 2d 0a 20 20  20 20 20 20 72 31 3d 70  |-----.      r1=p|
00003630  6f 72 74 20 6e 75 6d 62  65 72 0a 0a 20 20 20 20  |ort number..    |
00003640  20 20 52 65 74 75 72 6e  73 20 72 30 3d 62 69 74  |  Returns r0=bit|
00003650  73 65 74 20 6f 66 20 65  72 72 6f 72 73 20 73 65  |set of errors se|
00003660  65 6e 20 73 69 6e 63 65  20 6c 61 73 74 20 72 65  |en since last re|
00003670  61 64 20 52 58 20 65 72  72 6f 72 73 2e 0a 0a 20  |ad RX errors... |
00003680  20 20 20 20 20 62 30 3d  4f 76 65 72 72 75 6e 20  |     b0=Overrun |
00003690  65 72 72 6f 72 0a 20 20  20 20 20 20 62 31 3d 50  |error.      b1=P|
000036a0  61 72 69 74 79 20 65 72  72 6f 72 0a 20 20 20 20  |arity error.    |
000036b0  20 20 62 32 3d 46 72 61  6d 69 6e 67 20 65 72 72  |  b2=Framing err|
000036c0  6f 72 0a 20 20 20 20 20  20 62 33 3d 42 72 65 61  |or.      b3=Brea|
000036d0  6b 20 72 65 63 65 69 76  65 64 0a 0a 72 30 3d 31  |k received..r0=1|
000036e0  31 20 53 65 6e 64 20 62  72 65 61 6b 0a 20 20 20  |1 Send break.   |
000036f0  20 20 20 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 0a 20 20  |   ----------.  |
00003700  20 20 20 20 72 31 3d 70  6f 72 74 20 6e 75 6d 62  |    r1=port numb|
00003710  65 72 0a 20 20 20 20 20  20 72 32 3d 62 72 65 61  |er.      r2=brea|
00003720  6b 20 74 69 6d 65 20 28  69 6e 20 63 65 6e 74 69  |k time (in centi|
00003730  73 65 63 6f 6e 64 73 29  0a 0a 20 20 20 20 20 20  |seconds)..      |
00003740  54 68 69 73 20 64 6f 65  73 20 6e 6f 74 20 72 65  |This does not re|
00003750  74 75 72 6e 20 75 6e 74  69 6c 20 74 68 65 20 62  |turn until the b|
00003760  72 65 61 6b 20 68 61 73  20 62 65 65 6e 20 73 65  |reak has been se|
00003770  6e 74 20 2d 20 61 6c 74  68 6f 75 67 68 20 73 6f  |nt - although so|
00003780  6d 65 0a 20 20 20 20 20  20 73 65 72 69 61 6c 20  |me.      serial |
00003790  70 6f 72 74 73 20 63 6f  75 6c 64 20 6d 75 6c 74  |ports could mult|
000037a0  69 74 61 73 6b 20 77 68  65 6e 20 73 65 6e 64 69  |itask when sendi|
000037b0  6e 67 20 61 20 62 72 65  61 6b 2c 20 74 68 65 20  |ng a break, the |
000037c0  69 6e 74 65 72 6e 61 6c  20 70 6f 72 74 0a 20 20  |internal port.  |
000037d0  20 20 20 20 63 61 6e 27  74 2e 20 43 68 65 63 6b  |    can't. Check|
000037e0  20 74 68 65 20 64 72 69  76 65 72 20 66 6c 61 67  | the driver flag|
000037f0  73 20 74 6f 20 73 65 65  20 69 66 20 79 6f 75 20  |s to see if you |
00003800  63 61 6e 20 75 73 65 20  61 20 6d 75 6c 74 69 74  |can use a multit|
00003810  61 73 6b 69 6e 67 0a 20  20 20 20 20 20 62 72 65  |asking.      bre|
00003820  61 6b 20 62 65 66 6f 72  65 20 75 73 69 6e 67 20  |ak before using |
00003830  74 68 69 73 20 63 61 6c  6c 2e 0a 0a 72 30 3d 31  |this call...r0=1|
00003840  32 20 45 78 61 6d 69 6e  65 20 62 79 74 65 20 28  |2 Examine byte (|
00003850  6c 69 6b 65 20 47 65 74  20 62 79 74 65 20 62 75  |like Get byte bu|
00003860  74 20 6c 65 61 76 65 73  20 69 74 20 69 6e 20 74  |t leaves it in t|
00003870  68 65 20 62 75 66 66 65  72 29 0a 20 20 20 20 20  |he buffer).     |
00003880  20 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 0a 20 20  | ------------.  |
00003890  20 20 20 20 72 31 3d 70  6f 72 74 20 6e 75 6d 62  |    r1=port numb|
000038a0  65 72 0a 0a 20 20 20 20  20 20 52 65 74 75 72 6e  |er..      Return|
000038b0  73 20 77 69 74 68 20 72  30 3d 2d 31 20 69 66 20  |s with r0=-1 if |
000038c0  6e 6f 20 62 79 74 65 20  61 76 61 69 6c 69 61 62  |no byte availiab|
000038d0  6c 65 2c 20 72 30 3d 62  79 74 65 20 69 66 20 61  |le, r0=byte if a|
000038e0  20 62 79 74 65 20 77 61  73 0a 20 20 20 20 20 20  | byte was.      |
000038f0  72 65 74 75 72 6e 65 64  2e 0a 0a 72 30 3d 31 33  |returned...r0=13|
00003900  20 54 58 20 53 70 65 65  64 0a 20 20 20 20 20 20  | TX Speed.      |
00003910  2d 2d 2d 2d 2d 2d 2d 2d  0a 20 20 20 20 20 20 72  |--------.      r|
00003920  31 3d 70 6f 72 74 20 6e  75 6d 62 65 72 0a 20 20  |1=port number.  |
00003930  20 20 20 20 72 32 3d 73  70 65 65 64 20 74 6f 20  |    r2=speed to |
00003940  73 65 74 20 6f 72 20 2d  31 20 74 6f 20 72 65 61  |set or -1 to rea|
00003950  64 0a 0a 20 20 20 20 20  20 52 65 74 75 72 6e 73  |d..      Returns|
00003960  20 77 69 74 68 20 72 30  3d 73 70 65 65 64 2e 0a  | with r0=speed..|
00003970  0a 72 30 3d 31 34 20 52  58 20 53 70 65 65 64 0a  |.r0=14 RX Speed.|
00003980  20 20 20 20 20 20 2d 2d  2d 2d 2d 2d 2d 2d 0a 20  |      --------. |
00003990  20 20 20 20 20 72 31 3d  70 6f 72 74 20 6e 75 6d  |     r1=port num|
000039a0  62 65 72 0a 20 20 20 20  20 20 72 32 3d 73 70 65  |ber.      r2=spe|
000039b0  65 64 20 74 6f 20 73 65  74 20 6f 72 20 2d 31 20  |ed to set or -1 |
000039c0  74 6f 20 72 65 61 64 0a  0a 20 20 20 20 20 20 52  |to read..      R|
000039d0  65 74 75 72 6e 73 20 77  69 74 68 20 72 30 3d 73  |eturns with r0=s|
000039e0  70 65 65 64 2e 0a 0a 72  30 3d 31 35 20 53 65 74  |peed...r0=15 Set|
000039f0  20 77 6f 72 64 20 66 6f  72 6d 61 74 0a 20 20 20  | word format.   |
00003a00  20 20 20 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |   -------------|
00003a10  2d 2d 0a 20 20 20 20 20  20 72 31 3d 70 6f 72 74  |--.      r1=port|
00003a20  20 6e 75 6d 62 65 72 0a  20 20 20 20 20 20 72 32  | number.      r2|
00003a30  3d 77 6f 72 64 20 66 6f  72 6d 61 74 20 74 6f 20  |=word format to |
00003a40  73 65 74 20 6f 72 20 2d  31 20 74 6f 20 72 65 61  |set or -1 to rea|
00003a50  64 0a 0a 20 20 20 20 20  20 52 65 74 75 72 6e 73  |d..      Returns|
00003a60  20 77 69 74 68 20 72 30  3d 77 6f 72 64 20 66 6f  | with r0=word fo|
00003a70  72 6d 61 74 2e 0a 0a 72  30 3d 31 36 20 53 65 74  |rmat...r0=16 Set|
00003a80  20 66 6c 6f 77 20 63 6f  6e 74 72 6f 6c 0a 20 20  | flow control.  |
00003a90  20 20 20 20 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |    ------------|
00003aa0  2d 2d 2d 2d 0a 20 20 20  20 20 20 72 31 3d 70 6f  |----.      r1=po|
00003ab0  72 74 20 6e 75 6d 62 65  72 0a 20 20 20 20 20 20  |rt number.      |
00003ac0  72 32 3d 66 6c 6f 77 20  63 6f 6e 74 72 6f 6c 20  |r2=flow control |
00003ad0  6d 65 74 68 6f 64 20 74  6f 20 73 65 74 20 6f 72  |method to set or|
00003ae0  20 2d 31 20 74 6f 20 72  65 61 64 0a 0a 20 20 20  | -1 to read..   |
00003af0  20 20 20 52 65 74 75 72  6e 73 20 77 69 74 68 20  |   Returns with |
00003b00  72 30 3d 6d 65 74 68 6f  64 0a 0a 20 20 20 20 20  |r0=method..     |
00003b10  20 30 3d 6e 6f 20 66 6c  6f 77 20 63 6f 6e 74 72  | 0=no flow contr|
00003b20  6f 6c 0a 20 20 20 20 20  20 31 3d 68 61 72 64 77  |ol.      1=hardw|
00003b30  61 72 65 0a 20 20 20 20  20 20 32 3d 78 6f 6e 2f  |are.      2=xon/|
00003b40  78 6f 66 66 0a 20 20 20  20 20 20 33 3d 62 6f 74  |xoff.      3=bot|
00003b50  68 0a 0a 72 30 3d 31 37  20 49 6e 69 74 69 61 6c  |h..r0=17 Initial|
00003b60  69 73 65 20 64 72 69 76  65 72 0a 20 20 20 20 20  |ise driver.     |
00003b70  20 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  | ---------------|
00003b80  2d 2d 0a 20 20 20 20 20  20 72 31 3d 70 6f 72 74  |--.      r1=port|
00003b90  20 6e 75 6d 62 65 72 0a  20 20 20 20 20 20 72 32  | number.      r2|
00003ba0  3d 70 61 72 61 6d 65 74  65 72 20 73 74 72 69 6e  |=parameter strin|
00003bb0  67 20 28 6f 70 74 69 6f  6e 61 6c 29 0a 0a 20 20  |g (optional)..  |
00003bc0  20 20 20 20 72 32 20 6f  70 74 69 6f 6e 61 6c 6c  |    r2 optionall|
00003bd0  79 20 70 6f 69 6e 74 73  20 74 6f 20 61 20 6e 75  |y points to a nu|
00003be0  6c 6c 20 74 65 72 6d 69  6e 61 74 65 64 20 73 74  |ll terminated st|
00003bf0  72 69 6e 67 20 77 68 69  63 68 20 63 61 6e 20 73  |ring which can s|
00003c00  70 65 63 69 66 79 0a 20  20 20 20 20 20 64 65 76  |pecify.      dev|
00003c10  69 63 65 20 6f 70 74 69  6f 6e 73 2e 0a 0a 20 20  |ice options...  |
00003c20  20 20 20 20 52 65 74 75  72 6e 73 20 77 69 74 68  |    Returns with|
00003c30  20 72 30 20 70 6f 69 6e  74 69 6e 67 20 74 6f 20  | r0 pointing to |
00003c40  65 72 72 6f 72 20 73 74  72 69 6e 67 20 69 66 0a  |error string if.|
00003c50  20 20 20 20 20 20 69 6e  69 74 69 61 6c 69 73 61  |      initialisa|
00003c60  74 69 6f 6e 20 75 6e 73  75 63 65 73 73 66 75 6c  |tion unsucessful|
00003c70  2c 20 6f 74 68 65 72 77  69 73 65 20 72 30 3d 30  |, otherwise r0=0|
00003c80  2e 0a 0a 20 20 20 20 20  20 4e 4f 54 45 21 20 44  |...      NOTE! D|
00003c90  6f 20 6e 6f 74 20 72 65  61 64 20 74 68 65 20 62  |o not read the b|
00003ca0  61 75 64 20 72 61 74 65  20 74 61 62 6c 65 73 20  |aud rate tables |
00003cb0  6f 72 20 64 72 69 76 65  72 20 66 6c 61 67 73 20  |or driver flags |
00003cc0  55 4e 54 49 4c 20 41 46  54 45 52 0a 20 20 20 20  |UNTIL AFTER.    |
00003cd0  20 20 74 68 65 20 69 6e  74 69 61 6c 69 73 65 20  |  the intialise |
00003ce0  64 72 69 76 65 72 20 65  6e 74 72 79 20 68 61 73  |driver entry has|
00003cf0  20 62 65 65 6e 20 63 61  6c 6c 65 64 2e 20 54 68  | been called. Th|
00003d00  69 73 20 61 6c 6c 6f 77  73 20 66 6f 72 20 64 72  |is allows for dr|
00003d10  69 76 65 72 73 0a 20 20  20 20 20 20 74 6f 20 63  |ivers.      to c|
00003d20  6f 6e 66 69 67 75 72 65  20 74 68 65 6d 73 65 6c  |onfigure themsel|
00003d30  76 65 73 20 74 6f 20 74  68 65 20 61 76 61 69 6c  |ves to the avail|
00003d40  61 62 6c 65 20 68 61 72  64 77 61 72 65 20 61 6e  |able hardware an|
00003d50  64 20 61 64 6a 75 73 74  20 74 68 65 0a 20 20 20  |d adjust the.   |
00003d60  20 20 20 73 65 72 76 69  63 65 73 20 6f 66 66 65  |   services offe|
00003d70  72 65 64 20 61 63 63 6f  72 64 69 6e 67 6c 79 2e  |red accordingly.|
00003d80  0a 0a 20 20 20 20 20 20  52 65 6c 65 61 73 65 20  |..      Release |
00003d90  31 30 3a 20 54 68 65 72  65 20 69 73 20 6e 6f 77  |10: There is now|
00003da0  20 61 20 66 6c 61 67 2c  20 27 73 75 70 70 6f 72  | a flag, 'suppor|
00003db0  74 73 20 69 6e 71 75 69  72 79 20 69 6e 69 74 69  |ts inquiry initi|
00003dc0  61 6c 69 73 65 27 20 28  73 65 65 0a 20 20 20 20  |alise' (see.    |
00003dd0  20 20 61 62 6f 76 65 29  20 77 68 69 63 68 20 61  |  above) which a|
00003de0  6c 6c 6f 77 73 20 79 6f  75 20 74 6f 20 63 61 6c  |llows you to cal|
00003df0  6c 20 74 68 65 20 69 6e  69 74 69 61 6c 69 73 65  |l the initialise|
00003e00  20 65 6e 74 72 79 20 77  69 74 68 20 72 31 3d 2d  | entry with r1=-|
00003e10  31 2c 0a 20 20 20 20 20  20 77 68 69 63 68 20 77  |1,.      which w|
00003e20  69 6c 6c 20 6e 6f 74 20  74 6f 75 63 68 20 61 6e  |ill not touch an|
00003e30  79 20 68 61 72 64 77 61  72 65 2c 20 6a 75 73 74  |y hardware, just|
00003e40  20 73 65 74 20 61 6c 6c  20 74 68 65 20 62 61 75  | set all the bau|
00003e50  64 20 74 61 62 6c 65 73  2c 0a 20 20 20 20 20 20  |d tables,.      |
00003e60  64 72 69 76 65 72 20 66  6c 61 67 73 2c 20 61 6e  |driver flags, an|
00003e70  64 20 63 6f 75 6e 74 20  74 68 65 20 6e 75 6d 62  |d count the numb|
00003e80  65 72 20 6f 66 20 70 6f  72 74 73 20 69 6e 73 74  |er of ports inst|
00003e90  61 6c 6c 65 64 20 28 69  66 20 6e 65 63 65 73 73  |alled (if necess|
00003ea0  61 72 79 29 2c 0a 20 20  20 20 20 20 73 6f 20 79  |ary),.      so y|
00003eb0  6f 75 20 63 61 6e 20 72  65 61 64 20 74 68 65 6d  |ou can read them|
00003ec0  20 61 6e 64 20 73 65 74  20 75 70 20 6d 65 6e 75  | and set up menu|
00003ed0  73 2c 20 65 74 63 2e 0a  0a 72 30 3d 31 38 20 43  |s, etc...r0=18 C|
00003ee0  6c 6f 73 65 20 64 6f 77  6e 20 64 72 69 76 65 72  |lose down driver|
00003ef0  0a 20 20 20 20 20 20 2d  2d 2d 2d 2d 2d 2d 2d 2d  |.      ---------|
00003f00  2d 2d 2d 2d 2d 2d 2d 2d  0a 20 20 20 20 20 20 72  |--------.      r|
00003f10  31 3d 70 6f 72 74 20 6e  75 6d 62 65 72 0a 0a 72  |1=port number..r|
00003f20  30 3d 31 39 20 50 6f 6c  6c 20 64 72 69 76 65 72  |0=19 Poll driver|
00003f30  0a 20 20 20 20 20 20 2d  2d 2d 2d 2d 2d 2d 2d 2d  |.      ---------|
00003f40  2d 2d 0a 20 20 20 20 20  20 72 31 3d 70 6f 72 74  |--.      r1=port|
00003f50  20 6e 75 6d 62 65 72 0a  0a 20 20 20 20 20 20 54  | number..      T|
00003f60  68 69 73 20 73 68 6f 75  6c 64 20 62 65 20 63 61  |his should be ca|
00003f70  6c 6c 65 64 20 72 65 67  75 6c 61 72 6c 79 20 28  |lled regularly (|
00003f80  65 67 20 69 6e 20 61 20  70 6f 6c 6c 69 6e 67 20  |eg in a polling |
00003f90  6c 6f 6f 70 29 20 66 6f  72 20 74 68 65 20 64 72  |loop) for the dr|
00003fa0  69 76 65 72 0a 20 20 20  20 20 20 74 6f 20 70 65  |iver.      to pe|
00003fb0  72 66 6f 72 6d 20 70 6f  6c 6c 69 6e 67 20 74 61  |rform polling ta|
00003fc0  73 6b 73 20 2d 20 65 67  20 74 68 65 20 65 63 6f  |sks - eg the eco|
00003fd0  6e 65 74 20 64 72 69 76  65 72 20 6e 65 65 64 73  |net driver needs|
00003fe0  20 74 6f 20 63 68 65 63  6b 20 69 6e 74 65 72 6e  | to check intern|
00003ff0  61 6c 0a 20 20 20 20 20  20 62 75 66 66 65 72 73  |al.      buffers|
00004000  20 61 6e 64 20 70 6f 6c  6c 20 65 63 6f 6e 65 74  | and poll econet|
00004010  20 70 72 6f 74 6f 63 6f  6c 20 74 61 73 6b 73 2e  | protocol tasks.|
00004020  20 50 6f 6c 6c 73 20 63  61 6e 20 62 65 20 61 73  | Polls can be as|
00004030  20 69 6e 66 72 65 71 75  65 6e 74 20 61 73 0a 20  | infrequent as. |
00004040  20 20 20 20 20 74 68 72  65 65 20 6f 72 20 66 6f  |     three or fo|
00004050  75 72 20 74 69 6d 65 73  20 61 20 73 65 63 6f 6e  |ur times a secon|
00004060  64 20 3a 20 69 66 20 61  20 64 72 69 76 65 72 20  |d : if a driver |
00004070  6e 65 65 64 73 20 70 6f  6c 6c 69 6e 67 20 6d 6f  |needs polling mo|
00004080  72 65 20 6f 66 74 65 6e  0a 20 20 20 20 20 20 74  |re often.      t|
00004090  68 61 6e 20 74 68 61 74  2c 20 69 74 20 73 68 6f  |han that, it sho|
000040a0  75 6c 64 20 69 6e 73 74  61 6c 6c 20 61 20 6d 6f  |uld install a mo|
000040b0  64 75 6c 65 20 61 6e 64  20 68 6f 6f 6b 20 6f 6e  |dule and hook on|
000040c0  74 6f 20 61 20 76 65 63  74 6f 72 20 73 6f 6d 65  |to a vector some|
000040d0  77 68 65 72 65 2e 0a                              |where..|
000040d7