Home » Personal collection » Acorn ADFS disks » Greaseweazled » adfs_RiscOs_Apps_2.adf » !65Host/ReadMe

!65Host/ReadMe

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 » Personal collection » Acorn ADFS disks » Greaseweazled » adfs_RiscOs_Apps_2.adf
Filename: !65Host/ReadMe
Read OK:
File size: 28DC bytes
Load address: FFFFFF41
Exec address: EACCAB98
Duplicates

There is 1 duplicate copy of this file in the archive:

File contents
This is 65Host, version 1.40

Documentation on how to use 65Host can be found in Edition 2 of the
Archimedes User Guide.

The following remarks should be noted about this version of 65Host and its
documentation.

65Host provides a limited emulation of a BBC Model B Microcomputer only.
Versions of programs which run on the BBC Master 128 or Master Compact may
use facilities not available on the BBC Model B, and so may not work under
this emulation.

Full emulation of the parallel (Centronics) printer port is provided, via
the Archimedes parallel printer socket. The parallel printer is selected by
default (the selection can be changed using FX 5). Printing is enabled and
disabled in the normal way, usually via CTRL-B and CTRL-C respectively.

No emulation of the serial port, or of the Econet printer interface, is
provided.

The User VIA chip is only accessible to the emulator when an I/O Expansion
Card is present. If a program uses the User VIA timers, it will not operate
correctly without an I/O Expansion Card being fitted.

If an I/O Expansion Card is fitted, then timer interrupts generated from the
6522 may be handled by 6502 programs. However, the timers are driven at
2MHz, rather than the 1MHz on the Model B.

Full sound chip emulation is provided. In conjunction with the 6502
operating system, this allows use of the SOUND and ENVELOPE keywords from
BASIC, and the associated OSWORD calls. This gives the usual 3 tone channels
(square waves) and a noise/pulse wave channel.

Screen accessing has been speeded up since version 1.00.

Keyboard handling has been modified so that characters inserted into the
RISC OS keyboard buffer are later transferred into the 6502 keyboard buffer,
via the normal insert mechanism. This means that programs which use INSV
should now work. Also, OSBYTE calls &79 and &7A, which scan a range of keys,
now work correctly. The pound key now generates the correct code (&60).

However, the keyboard interrupt (which is generated when any keys are
depressed on a selected row) is not supported. There may also be problems
which result from the differing layouts of the Model B and Archimedes
keyboards, especially programs which attempt to do their own SHIFT key
processing (some legends are paired differently on the two keyboards).

The FX 247 mechanism, which allows a 6502 application to intercept reset (ie
the Break key), now works correctly.

Hardware scrolling in MODE 7, followed by a CLS, now works correctly.

Only limited 6845 programming is permitted:-
 Registers 0..8         not supported
 Register  9            limited support (for implementing modes 0/3, 4/6)
 Registers 10,11        supported
 Registers 12,13        limited to vertical scrolling of the screen
 Registers 14,15        cursor positioning only to resolution of 1 character

There is no emulation of the disc controller. As a consequence,
copy-protected programs or those which attempt direct access to DFS
directory sectors are unlikely to operate correctly.

However, OSWORD &72 (read/write sectors off ADFS) is implemented. The call
gets translated into a call to ADFS_DiscOp. This allows some software
written for the Electron Plus 3 or the Master Compact to work, although
there may be machine differences which cause other problems.
Current limitations: if a disc error occurs, an error is generated, rather
than the error type being returned at offset 0 in the block. OSWORD &73
(Read last error information) is not supported.

The OSARGS call with A=1,Y=0 (Return address of rest of command line) now
functions correctly (both on ARFS and on the emulated DFS (see below)).

The *-commands described in the User Guide (*ListROMs, *SwapROMs, *CacheROM,
*LinkROM, *EmulateBBC) are RISC OS *-commands provided by the emulator
module. *Quit, on the other hand, is provided within the emulated BBC
Microcomputer.

In addition the following *-commands are provided within the emulation:

*Reset [<number>]
Performs a 6502 reset, like CALL !-4.
If number=1, a power-on reset is performed.

*Go [<address>]
Branch the emulated 6502 to the specified address.

*OS
Provide a *-prompt loop within the 6502 emulator.

The paged ROM image 'UtilsROM' provides various extra commands:

*Build, *Dump, *List, *Type perform the same functions as the commands of
the same name provided in the Model B DNFS ROM.

*ROMs lists the loaded paged ROM images.

It also provides a number of commands for controlling sideways RAM (type
*Help SRAM inside the emulator for a list of them). These commands operate
in the same way as on the Master. However, by default, the emulator starts
up with no sideways RAM allocated (the original Model B had no sideways
RAM).

This setup can be changed to that of the Master (four banks of sideways
RAM in sockets 4,5,6 and 7) by editing the !Run file inside the !65Host
application directory (see that file for instructions). Note that this
uses an extra 64K of module workspace (16K for each bank).

Note also that software written for the Master which makes use of sideways
RAM may also make use of other facilities which are available on the Master,
but not on the Model B, eg shadow RAM.

In the emulator the Break key emulates the Break key on the emulated
computer, but the reset button resets Archimedes.

A limited emulation of the disc filing system (DFS) is provided, in order to
allow software to run which assumes DFS file naming conventions (ie
non-hierarchical, single character qualifiers).

Note that this does NOT allow the direct use of 5.25" DFS format floppies,
even with an appropriate disc drive and interface.

Instead it uses the current RISC OS filing system with a translation applied
to the filenames, as follows:-

A DFS name consists of:

  drive - one of '0', '1', '2', '3'
  qualifier - a single character, default '$'
  name - 7 characters long.

This is passed to RISC OS as:

  drive, dot, qualifier, name

eg a DFS name of ':2.A.Fred' would be translated to '2.AFred'.

However, certain qualifiers which are allowed on DFS (eg the default '$'),
are reserved characters in RISC OS filenames, so these are substituted by
other characters, as follows:-

        '$' is translated into '['
        ' ' ---------""------- '`'
        '@' ---------""------- '<'
        '|' ---------""------- '>'
        '"' ---------""------- ']'
        '%' ---------""------- '}'
        '&' ---------""------- '{'
        '^' ---------""------- ')'

eg a DFS name of ':1.$.Jim' would be translated to '1.[Jim'.

Typically this would be used by setting up an ADFS disc containing
directories named 0, 1, 2 and 3 and ensuring that their parent is the current
directory when 65Host is started. These are then used as drives by the DFS
emulation. Within each of these directories, a name such as 'CSheila'
represents the DFS file 'C.Sheila'.

All of this is to allow accurate emulation of such DFS commands as *Drive,
*Dir and *Lib. Using the ADFS or Net filing systems directly is often
simpler.

*ADFS and *Net can be used to make the named RISC OS filing systems current.
Alternatively, *ARFS gives access to the current RISC OS filing system.
*Disc selects the DFS emulation, using the current RISC OS filing system.

*Tape is provided (in case an application issues this command), but cannot
load or save files.

 Information for software developers
 -----------------------------------

An interface has been added to allow 6502 paged ROM images to be developed
which make access to RISC OS SWIs. The SWI is called by executing a
previously undefined 6502 opcode.

 6502 Opcode &07 - Issue SWI call
 --------------------------------

in:     XY (X lo-byte, Y hi-byte) points to control block (cb)

cb?0..2 = SWI number (lo..hi) (bit 17 set => return errors with V set)

cb?3    = number of registers to put back into block on exit, starting at R0

cb?4    = bit set of registers to relocate on entry to SWI
          (bit n set => relocate Rn from 6502 to ARM address space)

cb?5    = bit set of registers to unrelocate on exit from SWI
          (bit n set => unrelocate Rn from ARM to 6502 address space)

cb?6,7  = address (lo,hi) of error buffer (in 6502 space)
          only relevant if bit 17 of SWI number set

cb?8    = length of error buffer (can be zero)

cb!9    = register R0

cb!13   = register R1

..

cb!37   = register R7

out:    A,X,Y preserved
        N,Z,C,V as returned by the ARM on exit from the SWI
        Some or all of the register block is updated with the
        values on exit (possibly relocated), as controlled by cb?3,4,5

        If bit 17 of the SWI number was clear, and an error occurs, then
        control will not returned to the 6502 code - instead the error
        block is copied to &100 in 6502 format (ie zero byte, 1 byte error
        number, followed by zero terminated error string) and then it jumps
        to &100, which causes a BRK. If no error occurred, control will be
        returned and V will be clear.

        If bit 17 of the SWI number was set, then the X form of the SWI
        is issued; if this returns with V set, then the error block is
        copied into the specified error buffer in 6502 format, truncated
        to the length of the error buffer (if truncated the terminating
        zero will be in the last byte of the error buffer).

Support has also been added for selecting a filing system and running a
file, when the emulator is started.

On any reset, system variable 65Host$BootOptions is read.

Bits 2..7, 16..31 are reserved and should be set to 0.

Bits 8..15 contain the number of the filing system to be started up.

 0  => default ie ADFS
 1  => TAPE (of little use!)
 4  => DFS emulation
 5  => NET
 8  => ADFS
 11 => ARFS (ie the current RISC OS filing system)

Bits 0..1 are the boot option (the equivalent of the *OPT 4 setting)

 0 => do nothing, 1 => *Load, 2 => *Run, 3 => *Exec

On a power-on reset this boot option is used in conjunction with the
filename specified by the system variable 65Host$BootFile to 'run' a
program.

eg the following sequence enters the emulator, selects the ADFS filing
system and *Runs a file called Game :-

        *Set 65Host$BootOptions &802
        *Set 65Host$BootFile Game
        *EmulateBBC

The !Run file sets up these variables from the rest of the command line
passed to it. The syntax is

        *Run !65Host <BootOptions> <BootFile>

eg to load the emulator and perform the above operation, you might do :-

        *Run !65Host &802 Game
00000000  54 68 69 73 20 69 73 20  36 35 48 6f 73 74 2c 20  |This is 65Host, |
00000010  76 65 72 73 69 6f 6e 20  31 2e 34 30 0a 0a 44 6f  |version 1.40..Do|
00000020  63 75 6d 65 6e 74 61 74  69 6f 6e 20 6f 6e 20 68  |cumentation on h|
00000030  6f 77 20 74 6f 20 75 73  65 20 36 35 48 6f 73 74  |ow to use 65Host|
00000040  20 63 61 6e 20 62 65 20  66 6f 75 6e 64 20 69 6e  | can be found in|
00000050  20 45 64 69 74 69 6f 6e  20 32 20 6f 66 20 74 68  | Edition 2 of th|
00000060  65 0a 41 72 63 68 69 6d  65 64 65 73 20 55 73 65  |e.Archimedes Use|
00000070  72 20 47 75 69 64 65 2e  0a 0a 54 68 65 20 66 6f  |r Guide...The fo|
00000080  6c 6c 6f 77 69 6e 67 20  72 65 6d 61 72 6b 73 20  |llowing remarks |
00000090  73 68 6f 75 6c 64 20 62  65 20 6e 6f 74 65 64 20  |should be noted |
000000a0  61 62 6f 75 74 20 74 68  69 73 20 76 65 72 73 69  |about this versi|
000000b0  6f 6e 20 6f 66 20 36 35  48 6f 73 74 20 61 6e 64  |on of 65Host and|
000000c0  20 69 74 73 0a 64 6f 63  75 6d 65 6e 74 61 74 69  | its.documentati|
000000d0  6f 6e 2e 0a 0a 36 35 48  6f 73 74 20 70 72 6f 76  |on...65Host prov|
000000e0  69 64 65 73 20 61 20 6c  69 6d 69 74 65 64 20 65  |ides a limited e|
000000f0  6d 75 6c 61 74 69 6f 6e  20 6f 66 20 61 20 42 42  |mulation of a BB|
00000100  43 20 4d 6f 64 65 6c 20  42 20 4d 69 63 72 6f 63  |C Model B Microc|
00000110  6f 6d 70 75 74 65 72 20  6f 6e 6c 79 2e 0a 56 65  |omputer only..Ve|
00000120  72 73 69 6f 6e 73 20 6f  66 20 70 72 6f 67 72 61  |rsions of progra|
00000130  6d 73 20 77 68 69 63 68  20 72 75 6e 20 6f 6e 20  |ms which run on |
00000140  74 68 65 20 42 42 43 20  4d 61 73 74 65 72 20 31  |the BBC Master 1|
00000150  32 38 20 6f 72 20 4d 61  73 74 65 72 20 43 6f 6d  |28 or Master Com|
00000160  70 61 63 74 20 6d 61 79  0a 75 73 65 20 66 61 63  |pact may.use fac|
00000170  69 6c 69 74 69 65 73 20  6e 6f 74 20 61 76 61 69  |ilities not avai|
00000180  6c 61 62 6c 65 20 6f 6e  20 74 68 65 20 42 42 43  |lable on the BBC|
00000190  20 4d 6f 64 65 6c 20 42  2c 20 61 6e 64 20 73 6f  | Model B, and so|
000001a0  20 6d 61 79 20 6e 6f 74  20 77 6f 72 6b 20 75 6e  | may not work un|
000001b0  64 65 72 0a 74 68 69 73  20 65 6d 75 6c 61 74 69  |der.this emulati|
000001c0  6f 6e 2e 0a 0a 46 75 6c  6c 20 65 6d 75 6c 61 74  |on...Full emulat|
000001d0  69 6f 6e 20 6f 66 20 74  68 65 20 70 61 72 61 6c  |ion of the paral|
000001e0  6c 65 6c 20 28 43 65 6e  74 72 6f 6e 69 63 73 29  |lel (Centronics)|
000001f0  20 70 72 69 6e 74 65 72  20 70 6f 72 74 20 69 73  | printer port is|
00000200  20 70 72 6f 76 69 64 65  64 2c 20 76 69 61 0a 74  | provided, via.t|
00000210  68 65 20 41 72 63 68 69  6d 65 64 65 73 20 70 61  |he Archimedes pa|
00000220  72 61 6c 6c 65 6c 20 70  72 69 6e 74 65 72 20 73  |rallel printer s|
00000230  6f 63 6b 65 74 2e 20 54  68 65 20 70 61 72 61 6c  |ocket. The paral|
00000240  6c 65 6c 20 70 72 69 6e  74 65 72 20 69 73 20 73  |lel printer is s|
00000250  65 6c 65 63 74 65 64 20  62 79 0a 64 65 66 61 75  |elected by.defau|
00000260  6c 74 20 28 74 68 65 20  73 65 6c 65 63 74 69 6f  |lt (the selectio|
00000270  6e 20 63 61 6e 20 62 65  20 63 68 61 6e 67 65 64  |n can be changed|
00000280  20 75 73 69 6e 67 20 46  58 20 35 29 2e 20 50 72  | using FX 5). Pr|
00000290  69 6e 74 69 6e 67 20 69  73 20 65 6e 61 62 6c 65  |inting is enable|
000002a0  64 20 61 6e 64 0a 64 69  73 61 62 6c 65 64 20 69  |d and.disabled i|
000002b0  6e 20 74 68 65 20 6e 6f  72 6d 61 6c 20 77 61 79  |n the normal way|
000002c0  2c 20 75 73 75 61 6c 6c  79 20 76 69 61 20 43 54  |, usually via CT|
000002d0  52 4c 2d 42 20 61 6e 64  20 43 54 52 4c 2d 43 20  |RL-B and CTRL-C |
000002e0  72 65 73 70 65 63 74 69  76 65 6c 79 2e 0a 0a 4e  |respectively...N|
000002f0  6f 20 65 6d 75 6c 61 74  69 6f 6e 20 6f 66 20 74  |o emulation of t|
00000300  68 65 20 73 65 72 69 61  6c 20 70 6f 72 74 2c 20  |he serial port, |
00000310  6f 72 20 6f 66 20 74 68  65 20 45 63 6f 6e 65 74  |or of the Econet|
00000320  20 70 72 69 6e 74 65 72  20 69 6e 74 65 72 66 61  | printer interfa|
00000330  63 65 2c 20 69 73 0a 70  72 6f 76 69 64 65 64 2e  |ce, is.provided.|
00000340  0a 0a 54 68 65 20 55 73  65 72 20 56 49 41 20 63  |..The User VIA c|
00000350  68 69 70 20 69 73 20 6f  6e 6c 79 20 61 63 63 65  |hip is only acce|
00000360  73 73 69 62 6c 65 20 74  6f 20 74 68 65 20 65 6d  |ssible to the em|
00000370  75 6c 61 74 6f 72 20 77  68 65 6e 20 61 6e 20 49  |ulator when an I|
00000380  2f 4f 20 45 78 70 61 6e  73 69 6f 6e 0a 43 61 72  |/O Expansion.Car|
00000390  64 20 69 73 20 70 72 65  73 65 6e 74 2e 20 49 66  |d is present. If|
000003a0  20 61 20 70 72 6f 67 72  61 6d 20 75 73 65 73 20  | a program uses |
000003b0  74 68 65 20 55 73 65 72  20 56 49 41 20 74 69 6d  |the User VIA tim|
000003c0  65 72 73 2c 20 69 74 20  77 69 6c 6c 20 6e 6f 74  |ers, it will not|
000003d0  20 6f 70 65 72 61 74 65  0a 63 6f 72 72 65 63 74  | operate.correct|
000003e0  6c 79 20 77 69 74 68 6f  75 74 20 61 6e 20 49 2f  |ly without an I/|
000003f0  4f 20 45 78 70 61 6e 73  69 6f 6e 20 43 61 72 64  |O Expansion Card|
00000400  20 62 65 69 6e 67 20 66  69 74 74 65 64 2e 0a 0a  | being fitted...|
00000410  49 66 20 61 6e 20 49 2f  4f 20 45 78 70 61 6e 73  |If an I/O Expans|
00000420  69 6f 6e 20 43 61 72 64  20 69 73 20 66 69 74 74  |ion Card is fitt|
00000430  65 64 2c 20 74 68 65 6e  20 74 69 6d 65 72 20 69  |ed, then timer i|
00000440  6e 74 65 72 72 75 70 74  73 20 67 65 6e 65 72 61  |nterrupts genera|
00000450  74 65 64 20 66 72 6f 6d  20 74 68 65 0a 36 35 32  |ted from the.652|
00000460  32 20 6d 61 79 20 62 65  20 68 61 6e 64 6c 65 64  |2 may be handled|
00000470  20 62 79 20 36 35 30 32  20 70 72 6f 67 72 61 6d  | by 6502 program|
00000480  73 2e 20 48 6f 77 65 76  65 72 2c 20 74 68 65 20  |s. However, the |
00000490  74 69 6d 65 72 73 20 61  72 65 20 64 72 69 76 65  |timers are drive|
000004a0  6e 20 61 74 0a 32 4d 48  7a 2c 20 72 61 74 68 65  |n at.2MHz, rathe|
000004b0  72 20 74 68 61 6e 20 74  68 65 20 31 4d 48 7a 20  |r than the 1MHz |
000004c0  6f 6e 20 74 68 65 20 4d  6f 64 65 6c 20 42 2e 0a  |on the Model B..|
000004d0  0a 46 75 6c 6c 20 73 6f  75 6e 64 20 63 68 69 70  |.Full sound chip|
000004e0  20 65 6d 75 6c 61 74 69  6f 6e 20 69 73 20 70 72  | emulation is pr|
000004f0  6f 76 69 64 65 64 2e 20  49 6e 20 63 6f 6e 6a 75  |ovided. In conju|
00000500  6e 63 74 69 6f 6e 20 77  69 74 68 20 74 68 65 20  |nction with the |
00000510  36 35 30 32 0a 6f 70 65  72 61 74 69 6e 67 20 73  |6502.operating s|
00000520  79 73 74 65 6d 2c 20 74  68 69 73 20 61 6c 6c 6f  |ystem, this allo|
00000530  77 73 20 75 73 65 20 6f  66 20 74 68 65 20 53 4f  |ws use of the SO|
00000540  55 4e 44 20 61 6e 64 20  45 4e 56 45 4c 4f 50 45  |UND and ENVELOPE|
00000550  20 6b 65 79 77 6f 72 64  73 20 66 72 6f 6d 0a 42  | keywords from.B|
00000560  41 53 49 43 2c 20 61 6e  64 20 74 68 65 20 61 73  |ASIC, and the as|
00000570  73 6f 63 69 61 74 65 64  20 4f 53 57 4f 52 44 20  |sociated OSWORD |
00000580  63 61 6c 6c 73 2e 20 54  68 69 73 20 67 69 76 65  |calls. This give|
00000590  73 20 74 68 65 20 75 73  75 61 6c 20 33 20 74 6f  |s the usual 3 to|
000005a0  6e 65 20 63 68 61 6e 6e  65 6c 73 0a 28 73 71 75  |ne channels.(squ|
000005b0  61 72 65 20 77 61 76 65  73 29 20 61 6e 64 20 61  |are waves) and a|
000005c0  20 6e 6f 69 73 65 2f 70  75 6c 73 65 20 77 61 76  | noise/pulse wav|
000005d0  65 20 63 68 61 6e 6e 65  6c 2e 0a 0a 53 63 72 65  |e channel...Scre|
000005e0  65 6e 20 61 63 63 65 73  73 69 6e 67 20 68 61 73  |en accessing has|
000005f0  20 62 65 65 6e 20 73 70  65 65 64 65 64 20 75 70  | been speeded up|
00000600  20 73 69 6e 63 65 20 76  65 72 73 69 6f 6e 20 31  | since version 1|
00000610  2e 30 30 2e 0a 0a 4b 65  79 62 6f 61 72 64 20 68  |.00...Keyboard h|
00000620  61 6e 64 6c 69 6e 67 20  68 61 73 20 62 65 65 6e  |andling has been|
00000630  20 6d 6f 64 69 66 69 65  64 20 73 6f 20 74 68 61  | modified so tha|
00000640  74 20 63 68 61 72 61 63  74 65 72 73 20 69 6e 73  |t characters ins|
00000650  65 72 74 65 64 20 69 6e  74 6f 20 74 68 65 0a 52  |erted into the.R|
00000660  49 53 43 20 4f 53 20 6b  65 79 62 6f 61 72 64 20  |ISC OS keyboard |
00000670  62 75 66 66 65 72 20 61  72 65 20 6c 61 74 65 72  |buffer are later|
00000680  20 74 72 61 6e 73 66 65  72 72 65 64 20 69 6e 74  | transferred int|
00000690  6f 20 74 68 65 20 36 35  30 32 20 6b 65 79 62 6f  |o the 6502 keybo|
000006a0  61 72 64 20 62 75 66 66  65 72 2c 0a 76 69 61 20  |ard buffer,.via |
000006b0  74 68 65 20 6e 6f 72 6d  61 6c 20 69 6e 73 65 72  |the normal inser|
000006c0  74 20 6d 65 63 68 61 6e  69 73 6d 2e 20 54 68 69  |t mechanism. Thi|
000006d0  73 20 6d 65 61 6e 73 20  74 68 61 74 20 70 72 6f  |s means that pro|
000006e0  67 72 61 6d 73 20 77 68  69 63 68 20 75 73 65 20  |grams which use |
000006f0  49 4e 53 56 0a 73 68 6f  75 6c 64 20 6e 6f 77 20  |INSV.should now |
00000700  77 6f 72 6b 2e 20 41 6c  73 6f 2c 20 4f 53 42 59  |work. Also, OSBY|
00000710  54 45 20 63 61 6c 6c 73  20 26 37 39 20 61 6e 64  |TE calls &79 and|
00000720  20 26 37 41 2c 20 77 68  69 63 68 20 73 63 61 6e  | &7A, which scan|
00000730  20 61 20 72 61 6e 67 65  20 6f 66 20 6b 65 79 73  | a range of keys|
00000740  2c 0a 6e 6f 77 20 77 6f  72 6b 20 63 6f 72 72 65  |,.now work corre|
00000750  63 74 6c 79 2e 20 54 68  65 20 70 6f 75 6e 64 20  |ctly. The pound |
00000760  6b 65 79 20 6e 6f 77 20  67 65 6e 65 72 61 74 65  |key now generate|
00000770  73 20 74 68 65 20 63 6f  72 72 65 63 74 20 63 6f  |s the correct co|
00000780  64 65 20 28 26 36 30 29  2e 0a 0a 48 6f 77 65 76  |de (&60)...Howev|
00000790  65 72 2c 20 74 68 65 20  6b 65 79 62 6f 61 72 64  |er, the keyboard|
000007a0  20 69 6e 74 65 72 72 75  70 74 20 28 77 68 69 63  | interrupt (whic|
000007b0  68 20 69 73 20 67 65 6e  65 72 61 74 65 64 20 77  |h is generated w|
000007c0  68 65 6e 20 61 6e 79 20  6b 65 79 73 20 61 72 65  |hen any keys are|
000007d0  0a 64 65 70 72 65 73 73  65 64 20 6f 6e 20 61 20  |.depressed on a |
000007e0  73 65 6c 65 63 74 65 64  20 72 6f 77 29 20 69 73  |selected row) is|
000007f0  20 6e 6f 74 20 73 75 70  70 6f 72 74 65 64 2e 20  | not supported. |
00000800  54 68 65 72 65 20 6d 61  79 20 61 6c 73 6f 20 62  |There may also b|
00000810  65 20 70 72 6f 62 6c 65  6d 73 0a 77 68 69 63 68  |e problems.which|
00000820  20 72 65 73 75 6c 74 20  66 72 6f 6d 20 74 68 65  | result from the|
00000830  20 64 69 66 66 65 72 69  6e 67 20 6c 61 79 6f 75  | differing layou|
00000840  74 73 20 6f 66 20 74 68  65 20 4d 6f 64 65 6c 20  |ts of the Model |
00000850  42 20 61 6e 64 20 41 72  63 68 69 6d 65 64 65 73  |B and Archimedes|
00000860  0a 6b 65 79 62 6f 61 72  64 73 2c 20 65 73 70 65  |.keyboards, espe|
00000870  63 69 61 6c 6c 79 20 70  72 6f 67 72 61 6d 73 20  |cially programs |
00000880  77 68 69 63 68 20 61 74  74 65 6d 70 74 20 74 6f  |which attempt to|
00000890  20 64 6f 20 74 68 65 69  72 20 6f 77 6e 20 53 48  | do their own SH|
000008a0  49 46 54 20 6b 65 79 0a  70 72 6f 63 65 73 73 69  |IFT key.processi|
000008b0  6e 67 20 28 73 6f 6d 65  20 6c 65 67 65 6e 64 73  |ng (some legends|
000008c0  20 61 72 65 20 70 61 69  72 65 64 20 64 69 66 66  | are paired diff|
000008d0  65 72 65 6e 74 6c 79 20  6f 6e 20 74 68 65 20 74  |erently on the t|
000008e0  77 6f 20 6b 65 79 62 6f  61 72 64 73 29 2e 0a 0a  |wo keyboards)...|
000008f0  54 68 65 20 46 58 20 32  34 37 20 6d 65 63 68 61  |The FX 247 mecha|
00000900  6e 69 73 6d 2c 20 77 68  69 63 68 20 61 6c 6c 6f  |nism, which allo|
00000910  77 73 20 61 20 36 35 30  32 20 61 70 70 6c 69 63  |ws a 6502 applic|
00000920  61 74 69 6f 6e 20 74 6f  20 69 6e 74 65 72 63 65  |ation to interce|
00000930  70 74 20 72 65 73 65 74  20 28 69 65 0a 74 68 65  |pt reset (ie.the|
00000940  20 42 72 65 61 6b 20 6b  65 79 29 2c 20 6e 6f 77  | Break key), now|
00000950  20 77 6f 72 6b 73 20 63  6f 72 72 65 63 74 6c 79  | works correctly|
00000960  2e 0a 0a 48 61 72 64 77  61 72 65 20 73 63 72 6f  |...Hardware scro|
00000970  6c 6c 69 6e 67 20 69 6e  20 4d 4f 44 45 20 37 2c  |lling in MODE 7,|
00000980  20 66 6f 6c 6c 6f 77 65  64 20 62 79 20 61 20 43  | followed by a C|
00000990  4c 53 2c 20 6e 6f 77 20  77 6f 72 6b 73 20 63 6f  |LS, now works co|
000009a0  72 72 65 63 74 6c 79 2e  0a 0a 4f 6e 6c 79 20 6c  |rrectly...Only l|
000009b0  69 6d 69 74 65 64 20 36  38 34 35 20 70 72 6f 67  |imited 6845 prog|
000009c0  72 61 6d 6d 69 6e 67 20  69 73 20 70 65 72 6d 69  |ramming is permi|
000009d0  74 74 65 64 3a 2d 0a 20  52 65 67 69 73 74 65 72  |tted:-. Register|
000009e0  73 20 30 2e 2e 38 20 20  20 20 20 20 20 20 20 6e  |s 0..8         n|
000009f0  6f 74 20 73 75 70 70 6f  72 74 65 64 0a 20 52 65  |ot supported. Re|
00000a00  67 69 73 74 65 72 20 20  39 20 20 20 20 20 20 20  |gister  9       |
00000a10  20 20 20 20 20 6c 69 6d  69 74 65 64 20 73 75 70  |     limited sup|
00000a20  70 6f 72 74 20 28 66 6f  72 20 69 6d 70 6c 65 6d  |port (for implem|
00000a30  65 6e 74 69 6e 67 20 6d  6f 64 65 73 20 30 2f 33  |enting modes 0/3|
00000a40  2c 20 34 2f 36 29 0a 20  52 65 67 69 73 74 65 72  |, 4/6). Register|
00000a50  73 20 31 30 2c 31 31 20  20 20 20 20 20 20 20 73  |s 10,11        s|
00000a60  75 70 70 6f 72 74 65 64  0a 20 52 65 67 69 73 74  |upported. Regist|
00000a70  65 72 73 20 31 32 2c 31  33 20 20 20 20 20 20 20  |ers 12,13       |
00000a80  20 6c 69 6d 69 74 65 64  20 74 6f 20 76 65 72 74  | limited to vert|
00000a90  69 63 61 6c 20 73 63 72  6f 6c 6c 69 6e 67 20 6f  |ical scrolling o|
00000aa0  66 20 74 68 65 20 73 63  72 65 65 6e 0a 20 52 65  |f the screen. Re|
00000ab0  67 69 73 74 65 72 73 20  31 34 2c 31 35 20 20 20  |gisters 14,15   |
00000ac0  20 20 20 20 20 63 75 72  73 6f 72 20 70 6f 73 69  |     cursor posi|
00000ad0  74 69 6f 6e 69 6e 67 20  6f 6e 6c 79 20 74 6f 20  |tioning only to |
00000ae0  72 65 73 6f 6c 75 74 69  6f 6e 20 6f 66 20 31 20  |resolution of 1 |
00000af0  63 68 61 72 61 63 74 65  72 0a 0a 54 68 65 72 65  |character..There|
00000b00  20 69 73 20 6e 6f 20 65  6d 75 6c 61 74 69 6f 6e  | is no emulation|
00000b10  20 6f 66 20 74 68 65 20  64 69 73 63 20 63 6f 6e  | of the disc con|
00000b20  74 72 6f 6c 6c 65 72 2e  20 41 73 20 61 20 63 6f  |troller. As a co|
00000b30  6e 73 65 71 75 65 6e 63  65 2c 0a 63 6f 70 79 2d  |nsequence,.copy-|
00000b40  70 72 6f 74 65 63 74 65  64 20 70 72 6f 67 72 61  |protected progra|
00000b50  6d 73 20 6f 72 20 74 68  6f 73 65 20 77 68 69 63  |ms or those whic|
00000b60  68 20 61 74 74 65 6d 70  74 20 64 69 72 65 63 74  |h attempt direct|
00000b70  20 61 63 63 65 73 73 20  74 6f 20 44 46 53 0a 64  | access to DFS.d|
00000b80  69 72 65 63 74 6f 72 79  20 73 65 63 74 6f 72 73  |irectory sectors|
00000b90  20 61 72 65 20 75 6e 6c  69 6b 65 6c 79 20 74 6f  | are unlikely to|
00000ba0  20 6f 70 65 72 61 74 65  20 63 6f 72 72 65 63 74  | operate correct|
00000bb0  6c 79 2e 0a 0a 48 6f 77  65 76 65 72 2c 20 4f 53  |ly...However, OS|
00000bc0  57 4f 52 44 20 26 37 32  20 28 72 65 61 64 2f 77  |WORD &72 (read/w|
00000bd0  72 69 74 65 20 73 65 63  74 6f 72 73 20 6f 66 66  |rite sectors off|
00000be0  20 41 44 46 53 29 20 69  73 20 69 6d 70 6c 65 6d  | ADFS) is implem|
00000bf0  65 6e 74 65 64 2e 20 54  68 65 20 63 61 6c 6c 0a  |ented. The call.|
00000c00  67 65 74 73 20 74 72 61  6e 73 6c 61 74 65 64 20  |gets translated |
00000c10  69 6e 74 6f 20 61 20 63  61 6c 6c 20 74 6f 20 41  |into a call to A|
00000c20  44 46 53 5f 44 69 73 63  4f 70 2e 20 54 68 69 73  |DFS_DiscOp. This|
00000c30  20 61 6c 6c 6f 77 73 20  73 6f 6d 65 20 73 6f 66  | allows some sof|
00000c40  74 77 61 72 65 0a 77 72  69 74 74 65 6e 20 66 6f  |tware.written fo|
00000c50  72 20 74 68 65 20 45 6c  65 63 74 72 6f 6e 20 50  |r the Electron P|
00000c60  6c 75 73 20 33 20 6f 72  20 74 68 65 20 4d 61 73  |lus 3 or the Mas|
00000c70  74 65 72 20 43 6f 6d 70  61 63 74 20 74 6f 20 77  |ter Compact to w|
00000c80  6f 72 6b 2c 20 61 6c 74  68 6f 75 67 68 0a 74 68  |ork, although.th|
00000c90  65 72 65 20 6d 61 79 20  62 65 20 6d 61 63 68 69  |ere may be machi|
00000ca0  6e 65 20 64 69 66 66 65  72 65 6e 63 65 73 20 77  |ne differences w|
00000cb0  68 69 63 68 20 63 61 75  73 65 20 6f 74 68 65 72  |hich cause other|
00000cc0  20 70 72 6f 62 6c 65 6d  73 2e 0a 43 75 72 72 65  | problems..Curre|
00000cd0  6e 74 20 6c 69 6d 69 74  61 74 69 6f 6e 73 3a 20  |nt limitations: |
00000ce0  69 66 20 61 20 64 69 73  63 20 65 72 72 6f 72 20  |if a disc error |
00000cf0  6f 63 63 75 72 73 2c 20  61 6e 20 65 72 72 6f 72  |occurs, an error|
00000d00  20 69 73 20 67 65 6e 65  72 61 74 65 64 2c 20 72  | is generated, r|
00000d10  61 74 68 65 72 0a 74 68  61 6e 20 74 68 65 20 65  |ather.than the e|
00000d20  72 72 6f 72 20 74 79 70  65 20 62 65 69 6e 67 20  |rror type being |
00000d30  72 65 74 75 72 6e 65 64  20 61 74 20 6f 66 66 73  |returned at offs|
00000d40  65 74 20 30 20 69 6e 20  74 68 65 20 62 6c 6f 63  |et 0 in the bloc|
00000d50  6b 2e 20 4f 53 57 4f 52  44 20 26 37 33 0a 28 52  |k. OSWORD &73.(R|
00000d60  65 61 64 20 6c 61 73 74  20 65 72 72 6f 72 20 69  |ead last error i|
00000d70  6e 66 6f 72 6d 61 74 69  6f 6e 29 20 69 73 20 6e  |nformation) is n|
00000d80  6f 74 20 73 75 70 70 6f  72 74 65 64 2e 0a 0a 54  |ot supported...T|
00000d90  68 65 20 4f 53 41 52 47  53 20 63 61 6c 6c 20 77  |he OSARGS call w|
00000da0  69 74 68 20 41 3d 31 2c  59 3d 30 20 28 52 65 74  |ith A=1,Y=0 (Ret|
00000db0  75 72 6e 20 61 64 64 72  65 73 73 20 6f 66 20 72  |urn address of r|
00000dc0  65 73 74 20 6f 66 20 63  6f 6d 6d 61 6e 64 20 6c  |est of command l|
00000dd0  69 6e 65 29 20 6e 6f 77  0a 66 75 6e 63 74 69 6f  |ine) now.functio|
00000de0  6e 73 20 63 6f 72 72 65  63 74 6c 79 20 28 62 6f  |ns correctly (bo|
00000df0  74 68 20 6f 6e 20 41 52  46 53 20 61 6e 64 20 6f  |th on ARFS and o|
00000e00  6e 20 74 68 65 20 65 6d  75 6c 61 74 65 64 20 44  |n the emulated D|
00000e10  46 53 20 28 73 65 65 20  62 65 6c 6f 77 29 29 2e  |FS (see below)).|
00000e20  0a 0a 54 68 65 20 2a 2d  63 6f 6d 6d 61 6e 64 73  |..The *-commands|
00000e30  20 64 65 73 63 72 69 62  65 64 20 69 6e 20 74 68  | described in th|
00000e40  65 20 55 73 65 72 20 47  75 69 64 65 20 28 2a 4c  |e User Guide (*L|
00000e50  69 73 74 52 4f 4d 73 2c  20 2a 53 77 61 70 52 4f  |istROMs, *SwapRO|
00000e60  4d 73 2c 20 2a 43 61 63  68 65 52 4f 4d 2c 0a 2a  |Ms, *CacheROM,.*|
00000e70  4c 69 6e 6b 52 4f 4d 2c  20 2a 45 6d 75 6c 61 74  |LinkROM, *Emulat|
00000e80  65 42 42 43 29 20 61 72  65 20 52 49 53 43 20 4f  |eBBC) are RISC O|
00000e90  53 20 2a 2d 63 6f 6d 6d  61 6e 64 73 20 70 72 6f  |S *-commands pro|
00000ea0  76 69 64 65 64 20 62 79  20 74 68 65 20 65 6d 75  |vided by the emu|
00000eb0  6c 61 74 6f 72 0a 6d 6f  64 75 6c 65 2e 20 2a 51  |lator.module. *Q|
00000ec0  75 69 74 2c 20 6f 6e 20  74 68 65 20 6f 74 68 65  |uit, on the othe|
00000ed0  72 20 68 61 6e 64 2c 20  69 73 20 70 72 6f 76 69  |r hand, is provi|
00000ee0  64 65 64 20 77 69 74 68  69 6e 20 74 68 65 20 65  |ded within the e|
00000ef0  6d 75 6c 61 74 65 64 20  42 42 43 0a 4d 69 63 72  |mulated BBC.Micr|
00000f00  6f 63 6f 6d 70 75 74 65  72 2e 0a 0a 49 6e 20 61  |ocomputer...In a|
00000f10  64 64 69 74 69 6f 6e 20  74 68 65 20 66 6f 6c 6c  |ddition the foll|
00000f20  6f 77 69 6e 67 20 2a 2d  63 6f 6d 6d 61 6e 64 73  |owing *-commands|
00000f30  20 61 72 65 20 70 72 6f  76 69 64 65 64 20 77 69  | are provided wi|
00000f40  74 68 69 6e 20 74 68 65  20 65 6d 75 6c 61 74 69  |thin the emulati|
00000f50  6f 6e 3a 0a 0a 2a 52 65  73 65 74 20 5b 3c 6e 75  |on:..*Reset [<nu|
00000f60  6d 62 65 72 3e 5d 0a 50  65 72 66 6f 72 6d 73 20  |mber>].Performs |
00000f70  61 20 36 35 30 32 20 72  65 73 65 74 2c 20 6c 69  |a 6502 reset, li|
00000f80  6b 65 20 43 41 4c 4c 20  21 2d 34 2e 0a 49 66 20  |ke CALL !-4..If |
00000f90  6e 75 6d 62 65 72 3d 31  2c 20 61 20 70 6f 77 65  |number=1, a powe|
00000fa0  72 2d 6f 6e 20 72 65 73  65 74 20 69 73 20 70 65  |r-on reset is pe|
00000fb0  72 66 6f 72 6d 65 64 2e  0a 0a 2a 47 6f 20 5b 3c  |rformed...*Go [<|
00000fc0  61 64 64 72 65 73 73 3e  5d 0a 42 72 61 6e 63 68  |address>].Branch|
00000fd0  20 74 68 65 20 65 6d 75  6c 61 74 65 64 20 36 35  | the emulated 65|
00000fe0  30 32 20 74 6f 20 74 68  65 20 73 70 65 63 69 66  |02 to the specif|
00000ff0  69 65 64 20 61 64 64 72  65 73 73 2e 0a 0a 2a 4f  |ied address...*O|
00001000  53 0a 50 72 6f 76 69 64  65 20 61 20 2a 2d 70 72  |S.Provide a *-pr|
00001010  6f 6d 70 74 20 6c 6f 6f  70 20 77 69 74 68 69 6e  |ompt loop within|
00001020  20 74 68 65 20 36 35 30  32 20 65 6d 75 6c 61 74  | the 6502 emulat|
00001030  6f 72 2e 0a 0a 54 68 65  20 70 61 67 65 64 20 52  |or...The paged R|
00001040  4f 4d 20 69 6d 61 67 65  20 27 55 74 69 6c 73 52  |OM image 'UtilsR|
00001050  4f 4d 27 20 70 72 6f 76  69 64 65 73 20 76 61 72  |OM' provides var|
00001060  69 6f 75 73 20 65 78 74  72 61 20 63 6f 6d 6d 61  |ious extra comma|
00001070  6e 64 73 3a 0a 0a 2a 42  75 69 6c 64 2c 20 2a 44  |nds:..*Build, *D|
00001080  75 6d 70 2c 20 2a 4c 69  73 74 2c 20 2a 54 79 70  |ump, *List, *Typ|
00001090  65 20 70 65 72 66 6f 72  6d 20 74 68 65 20 73 61  |e perform the sa|
000010a0  6d 65 20 66 75 6e 63 74  69 6f 6e 73 20 61 73 20  |me functions as |
000010b0  74 68 65 20 63 6f 6d 6d  61 6e 64 73 20 6f 66 0a  |the commands of.|
000010c0  74 68 65 20 73 61 6d 65  20 6e 61 6d 65 20 70 72  |the same name pr|
000010d0  6f 76 69 64 65 64 20 69  6e 20 74 68 65 20 4d 6f  |ovided in the Mo|
000010e0  64 65 6c 20 42 20 44 4e  46 53 20 52 4f 4d 2e 0a  |del B DNFS ROM..|
000010f0  0a 2a 52 4f 4d 73 20 6c  69 73 74 73 20 74 68 65  |.*ROMs lists the|
00001100  20 6c 6f 61 64 65 64 20  70 61 67 65 64 20 52 4f  | loaded paged RO|
00001110  4d 20 69 6d 61 67 65 73  2e 0a 0a 49 74 20 61 6c  |M images...It al|
00001120  73 6f 20 70 72 6f 76 69  64 65 73 20 61 20 6e 75  |so provides a nu|
00001130  6d 62 65 72 20 6f 66 20  63 6f 6d 6d 61 6e 64 73  |mber of commands|
00001140  20 66 6f 72 20 63 6f 6e  74 72 6f 6c 6c 69 6e 67  | for controlling|
00001150  20 73 69 64 65 77 61 79  73 20 52 41 4d 20 28 74  | sideways RAM (t|
00001160  79 70 65 0a 2a 48 65 6c  70 20 53 52 41 4d 20 69  |ype.*Help SRAM i|
00001170  6e 73 69 64 65 20 74 68  65 20 65 6d 75 6c 61 74  |nside the emulat|
00001180  6f 72 20 66 6f 72 20 61  20 6c 69 73 74 20 6f 66  |or for a list of|
00001190  20 74 68 65 6d 29 2e 20  54 68 65 73 65 20 63 6f  | them). These co|
000011a0  6d 6d 61 6e 64 73 20 6f  70 65 72 61 74 65 0a 69  |mmands operate.i|
000011b0  6e 20 74 68 65 20 73 61  6d 65 20 77 61 79 20 61  |n the same way a|
000011c0  73 20 6f 6e 20 74 68 65  20 4d 61 73 74 65 72 2e  |s on the Master.|
000011d0  20 48 6f 77 65 76 65 72  2c 20 62 79 20 64 65 66  | However, by def|
000011e0  61 75 6c 74 2c 20 74 68  65 20 65 6d 75 6c 61 74  |ault, the emulat|
000011f0  6f 72 20 73 74 61 72 74  73 0a 75 70 20 77 69 74  |or starts.up wit|
00001200  68 20 6e 6f 20 73 69 64  65 77 61 79 73 20 52 41  |h no sideways RA|
00001210  4d 20 61 6c 6c 6f 63 61  74 65 64 20 28 74 68 65  |M allocated (the|
00001220  20 6f 72 69 67 69 6e 61  6c 20 4d 6f 64 65 6c 20  | original Model |
00001230  42 20 68 61 64 20 6e 6f  20 73 69 64 65 77 61 79  |B had no sideway|
00001240  73 0a 52 41 4d 29 2e 0a  0a 54 68 69 73 20 73 65  |s.RAM)...This se|
00001250  74 75 70 20 63 61 6e 20  62 65 20 63 68 61 6e 67  |tup can be chang|
00001260  65 64 20 74 6f 20 74 68  61 74 20 6f 66 20 74 68  |ed to that of th|
00001270  65 20 4d 61 73 74 65 72  20 28 66 6f 75 72 20 62  |e Master (four b|
00001280  61 6e 6b 73 20 6f 66 20  73 69 64 65 77 61 79 73  |anks of sideways|
00001290  0a 52 41 4d 20 69 6e 20  73 6f 63 6b 65 74 73 20  |.RAM in sockets |
000012a0  34 2c 35 2c 36 20 61 6e  64 20 37 29 20 62 79 20  |4,5,6 and 7) by |
000012b0  65 64 69 74 69 6e 67 20  74 68 65 20 21 52 75 6e  |editing the !Run|
000012c0  20 66 69 6c 65 20 69 6e  73 69 64 65 20 74 68 65  | file inside the|
000012d0  20 21 36 35 48 6f 73 74  0a 61 70 70 6c 69 63 61  | !65Host.applica|
000012e0  74 69 6f 6e 20 64 69 72  65 63 74 6f 72 79 20 28  |tion directory (|
000012f0  73 65 65 20 74 68 61 74  20 66 69 6c 65 20 66 6f  |see that file fo|
00001300  72 20 69 6e 73 74 72 75  63 74 69 6f 6e 73 29 2e  |r instructions).|
00001310  20 4e 6f 74 65 20 74 68  61 74 20 74 68 69 73 0a  | Note that this.|
00001320  75 73 65 73 20 61 6e 20  65 78 74 72 61 20 36 34  |uses an extra 64|
00001330  4b 20 6f 66 20 6d 6f 64  75 6c 65 20 77 6f 72 6b  |K of module work|
00001340  73 70 61 63 65 20 28 31  36 4b 20 66 6f 72 20 65  |space (16K for e|
00001350  61 63 68 20 62 61 6e 6b  29 2e 0a 0a 4e 6f 74 65  |ach bank)...Note|
00001360  20 61 6c 73 6f 20 74 68  61 74 20 73 6f 66 74 77  | also that softw|
00001370  61 72 65 20 77 72 69 74  74 65 6e 20 66 6f 72 20  |are written for |
00001380  74 68 65 20 4d 61 73 74  65 72 20 77 68 69 63 68  |the Master which|
00001390  20 6d 61 6b 65 73 20 75  73 65 20 6f 66 20 73 69  | makes use of si|
000013a0  64 65 77 61 79 73 0a 52  41 4d 20 6d 61 79 20 61  |deways.RAM may a|
000013b0  6c 73 6f 20 6d 61 6b 65  20 75 73 65 20 6f 66 20  |lso make use of |
000013c0  6f 74 68 65 72 20 66 61  63 69 6c 69 74 69 65 73  |other facilities|
000013d0  20 77 68 69 63 68 20 61  72 65 20 61 76 61 69 6c  | which are avail|
000013e0  61 62 6c 65 20 6f 6e 20  74 68 65 20 4d 61 73 74  |able on the Mast|
000013f0  65 72 2c 0a 62 75 74 20  6e 6f 74 20 6f 6e 20 74  |er,.but not on t|
00001400  68 65 20 4d 6f 64 65 6c  20 42 2c 20 65 67 20 73  |he Model B, eg s|
00001410  68 61 64 6f 77 20 52 41  4d 2e 0a 0a 49 6e 20 74  |hadow RAM...In t|
00001420  68 65 20 65 6d 75 6c 61  74 6f 72 20 74 68 65 20  |he emulator the |
00001430  42 72 65 61 6b 20 6b 65  79 20 65 6d 75 6c 61 74  |Break key emulat|
00001440  65 73 20 74 68 65 20 42  72 65 61 6b 20 6b 65 79  |es the Break key|
00001450  20 6f 6e 20 74 68 65 20  65 6d 75 6c 61 74 65 64  | on the emulated|
00001460  0a 63 6f 6d 70 75 74 65  72 2c 20 62 75 74 20 74  |.computer, but t|
00001470  68 65 20 72 65 73 65 74  20 62 75 74 74 6f 6e 20  |he reset button |
00001480  72 65 73 65 74 73 20 41  72 63 68 69 6d 65 64 65  |resets Archimede|
00001490  73 2e 0a 0a 41 20 6c 69  6d 69 74 65 64 20 65 6d  |s...A limited em|
000014a0  75 6c 61 74 69 6f 6e 20  6f 66 20 74 68 65 20 64  |ulation of the d|
000014b0  69 73 63 20 66 69 6c 69  6e 67 20 73 79 73 74 65  |isc filing syste|
000014c0  6d 20 28 44 46 53 29 20  69 73 20 70 72 6f 76 69  |m (DFS) is provi|
000014d0  64 65 64 2c 20 69 6e 20  6f 72 64 65 72 20 74 6f  |ded, in order to|
000014e0  0a 61 6c 6c 6f 77 20 73  6f 66 74 77 61 72 65 20  |.allow software |
000014f0  74 6f 20 72 75 6e 20 77  68 69 63 68 20 61 73 73  |to run which ass|
00001500  75 6d 65 73 20 44 46 53  20 66 69 6c 65 20 6e 61  |umes DFS file na|
00001510  6d 69 6e 67 20 63 6f 6e  76 65 6e 74 69 6f 6e 73  |ming conventions|
00001520  20 28 69 65 0a 6e 6f 6e  2d 68 69 65 72 61 72 63  | (ie.non-hierarc|
00001530  68 69 63 61 6c 2c 20 73  69 6e 67 6c 65 20 63 68  |hical, single ch|
00001540  61 72 61 63 74 65 72 20  71 75 61 6c 69 66 69 65  |aracter qualifie|
00001550  72 73 29 2e 0a 0a 4e 6f  74 65 20 74 68 61 74 20  |rs)...Note that |
00001560  74 68 69 73 20 64 6f 65  73 20 4e 4f 54 20 61 6c  |this does NOT al|
00001570  6c 6f 77 20 74 68 65 20  64 69 72 65 63 74 20 75  |low the direct u|
00001580  73 65 20 6f 66 20 35 2e  32 35 22 20 44 46 53 20  |se of 5.25" DFS |
00001590  66 6f 72 6d 61 74 20 66  6c 6f 70 70 69 65 73 2c  |format floppies,|
000015a0  0a 65 76 65 6e 20 77 69  74 68 20 61 6e 20 61 70  |.even with an ap|
000015b0  70 72 6f 70 72 69 61 74  65 20 64 69 73 63 20 64  |propriate disc d|
000015c0  72 69 76 65 20 61 6e 64  20 69 6e 74 65 72 66 61  |rive and interfa|
000015d0  63 65 2e 0a 0a 49 6e 73  74 65 61 64 20 69 74 20  |ce...Instead it |
000015e0  75 73 65 73 20 74 68 65  20 63 75 72 72 65 6e 74  |uses the current|
000015f0  20 52 49 53 43 20 4f 53  20 66 69 6c 69 6e 67 20  | RISC OS filing |
00001600  73 79 73 74 65 6d 20 77  69 74 68 20 61 20 74 72  |system with a tr|
00001610  61 6e 73 6c 61 74 69 6f  6e 20 61 70 70 6c 69 65  |anslation applie|
00001620  64 0a 74 6f 20 74 68 65  20 66 69 6c 65 6e 61 6d  |d.to the filenam|
00001630  65 73 2c 20 61 73 20 66  6f 6c 6c 6f 77 73 3a 2d  |es, as follows:-|
00001640  0a 0a 41 20 44 46 53 20  6e 61 6d 65 20 63 6f 6e  |..A DFS name con|
00001650  73 69 73 74 73 20 6f 66  3a 0a 0a 20 20 64 72 69  |sists of:..  dri|
00001660  76 65 20 2d 20 6f 6e 65  20 6f 66 20 27 30 27 2c  |ve - one of '0',|
00001670  20 27 31 27 2c 20 27 32  27 2c 20 27 33 27 0a 20  | '1', '2', '3'. |
00001680  20 71 75 61 6c 69 66 69  65 72 20 2d 20 61 20 73  | qualifier - a s|
00001690  69 6e 67 6c 65 20 63 68  61 72 61 63 74 65 72 2c  |ingle character,|
000016a0  20 64 65 66 61 75 6c 74  20 27 24 27 0a 20 20 6e  | default '$'.  n|
000016b0  61 6d 65 20 2d 20 37 20  63 68 61 72 61 63 74 65  |ame - 7 characte|
000016c0  72 73 20 6c 6f 6e 67 2e  0a 0a 54 68 69 73 20 69  |rs long...This i|
000016d0  73 20 70 61 73 73 65 64  20 74 6f 20 52 49 53 43  |s passed to RISC|
000016e0  20 4f 53 20 61 73 3a 0a  0a 20 20 64 72 69 76 65  | OS as:..  drive|
000016f0  2c 20 64 6f 74 2c 20 71  75 61 6c 69 66 69 65 72  |, dot, qualifier|
00001700  2c 20 6e 61 6d 65 0a 0a  65 67 20 61 20 44 46 53  |, name..eg a DFS|
00001710  20 6e 61 6d 65 20 6f 66  20 27 3a 32 2e 41 2e 46  | name of ':2.A.F|
00001720  72 65 64 27 20 77 6f 75  6c 64 20 62 65 20 74 72  |red' would be tr|
00001730  61 6e 73 6c 61 74 65 64  20 74 6f 20 27 32 2e 41  |anslated to '2.A|
00001740  46 72 65 64 27 2e 0a 0a  48 6f 77 65 76 65 72 2c  |Fred'...However,|
00001750  20 63 65 72 74 61 69 6e  20 71 75 61 6c 69 66 69  | certain qualifi|
00001760  65 72 73 20 77 68 69 63  68 20 61 72 65 20 61 6c  |ers which are al|
00001770  6c 6f 77 65 64 20 6f 6e  20 44 46 53 20 28 65 67  |lowed on DFS (eg|
00001780  20 74 68 65 20 64 65 66  61 75 6c 74 20 27 24 27  | the default '$'|
00001790  29 2c 0a 61 72 65 20 72  65 73 65 72 76 65 64 20  |),.are reserved |
000017a0  63 68 61 72 61 63 74 65  72 73 20 69 6e 20 52 49  |characters in RI|
000017b0  53 43 20 4f 53 20 66 69  6c 65 6e 61 6d 65 73 2c  |SC OS filenames,|
000017c0  20 73 6f 20 74 68 65 73  65 20 61 72 65 20 73 75  | so these are su|
000017d0  62 73 74 69 74 75 74 65  64 20 62 79 0a 6f 74 68  |bstituted by.oth|
000017e0  65 72 20 63 68 61 72 61  63 74 65 72 73 2c 20 61  |er characters, a|
000017f0  73 20 66 6f 6c 6c 6f 77  73 3a 2d 0a 0a 20 20 20  |s follows:-..   |
00001800  20 20 20 20 20 27 24 27  20 69 73 20 74 72 61 6e  |     '$' is tran|
00001810  73 6c 61 74 65 64 20 69  6e 74 6f 20 27 5b 27 0a  |slated into '['.|
00001820  20 20 20 20 20 20 20 20  27 20 27 20 2d 2d 2d 2d  |        ' ' ----|
00001830  2d 2d 2d 2d 2d 22 22 2d  2d 2d 2d 2d 2d 2d 20 27  |-----""------- '|
00001840  60 27 0a 20 20 20 20 20  20 20 20 27 40 27 20 2d  |`'.        '@' -|
00001850  2d 2d 2d 2d 2d 2d 2d 2d  22 22 2d 2d 2d 2d 2d 2d  |--------""------|
00001860  2d 20 27 3c 27 0a 20 20  20 20 20 20 20 20 27 7c  |- '<'.        '||
00001870  27 20 2d 2d 2d 2d 2d 2d  2d 2d 2d 22 22 2d 2d 2d  |' ---------""---|
00001880  2d 2d 2d 2d 20 27 3e 27  0a 20 20 20 20 20 20 20  |---- '>'.       |
00001890  20 27 22 27 20 2d 2d 2d  2d 2d 2d 2d 2d 2d 22 22  | '"' ---------""|
000018a0  2d 2d 2d 2d 2d 2d 2d 20  27 5d 27 0a 20 20 20 20  |------- ']'.    |
000018b0  20 20 20 20 27 25 27 20  2d 2d 2d 2d 2d 2d 2d 2d  |    '%' --------|
000018c0  2d 22 22 2d 2d 2d 2d 2d  2d 2d 20 27 7d 27 0a 20  |-""------- '}'. |
000018d0  20 20 20 20 20 20 20 27  26 27 20 2d 2d 2d 2d 2d  |       '&' -----|
000018e0  2d 2d 2d 2d 22 22 2d 2d  2d 2d 2d 2d 2d 20 27 7b  |----""------- '{|
000018f0  27 0a 20 20 20 20 20 20  20 20 27 5e 27 20 2d 2d  |'.        '^' --|
00001900  2d 2d 2d 2d 2d 2d 2d 22  22 2d 2d 2d 2d 2d 2d 2d  |-------""-------|
00001910  20 27 29 27 0a 0a 65 67  20 61 20 44 46 53 20 6e  | ')'..eg a DFS n|
00001920  61 6d 65 20 6f 66 20 27  3a 31 2e 24 2e 4a 69 6d  |ame of ':1.$.Jim|
00001930  27 20 77 6f 75 6c 64 20  62 65 20 74 72 61 6e 73  |' would be trans|
00001940  6c 61 74 65 64 20 74 6f  20 27 31 2e 5b 4a 69 6d  |lated to '1.[Jim|
00001950  27 2e 0a 0a 54 79 70 69  63 61 6c 6c 79 20 74 68  |'...Typically th|
00001960  69 73 20 77 6f 75 6c 64  20 62 65 20 75 73 65 64  |is would be used|
00001970  20 62 79 20 73 65 74 74  69 6e 67 20 75 70 20 61  | by setting up a|
00001980  6e 20 41 44 46 53 20 64  69 73 63 20 63 6f 6e 74  |n ADFS disc cont|
00001990  61 69 6e 69 6e 67 0a 64  69 72 65 63 74 6f 72 69  |aining.directori|
000019a0  65 73 20 6e 61 6d 65 64  20 30 2c 20 31 2c 20 32  |es named 0, 1, 2|
000019b0  20 61 6e 64 20 33 20 61  6e 64 20 65 6e 73 75 72  | and 3 and ensur|
000019c0  69 6e 67 20 74 68 61 74  20 74 68 65 69 72 20 70  |ing that their p|
000019d0  61 72 65 6e 74 20 69 73  20 74 68 65 20 63 75 72  |arent is the cur|
000019e0  72 65 6e 74 0a 64 69 72  65 63 74 6f 72 79 20 77  |rent.directory w|
000019f0  68 65 6e 20 36 35 48 6f  73 74 20 69 73 20 73 74  |hen 65Host is st|
00001a00  61 72 74 65 64 2e 20 54  68 65 73 65 20 61 72 65  |arted. These are|
00001a10  20 74 68 65 6e 20 75 73  65 64 20 61 73 20 64 72  | then used as dr|
00001a20  69 76 65 73 20 62 79 20  74 68 65 20 44 46 53 0a  |ives by the DFS.|
00001a30  65 6d 75 6c 61 74 69 6f  6e 2e 20 57 69 74 68 69  |emulation. Withi|
00001a40  6e 20 65 61 63 68 20 6f  66 20 74 68 65 73 65 20  |n each of these |
00001a50  64 69 72 65 63 74 6f 72  69 65 73 2c 20 61 20 6e  |directories, a n|
00001a60  61 6d 65 20 73 75 63 68  20 61 73 20 27 43 53 68  |ame such as 'CSh|
00001a70  65 69 6c 61 27 0a 72 65  70 72 65 73 65 6e 74 73  |eila'.represents|
00001a80  20 74 68 65 20 44 46 53  20 66 69 6c 65 20 27 43  | the DFS file 'C|
00001a90  2e 53 68 65 69 6c 61 27  2e 0a 0a 41 6c 6c 20 6f  |.Sheila'...All o|
00001aa0  66 20 74 68 69 73 20 69  73 20 74 6f 20 61 6c 6c  |f this is to all|
00001ab0  6f 77 20 61 63 63 75 72  61 74 65 20 65 6d 75 6c  |ow accurate emul|
00001ac0  61 74 69 6f 6e 20 6f 66  20 73 75 63 68 20 44 46  |ation of such DF|
00001ad0  53 20 63 6f 6d 6d 61 6e  64 73 20 61 73 20 2a 44  |S commands as *D|
00001ae0  72 69 76 65 2c 0a 2a 44  69 72 20 61 6e 64 20 2a  |rive,.*Dir and *|
00001af0  4c 69 62 2e 20 55 73 69  6e 67 20 74 68 65 20 41  |Lib. Using the A|
00001b00  44 46 53 20 6f 72 20 4e  65 74 20 66 69 6c 69 6e  |DFS or Net filin|
00001b10  67 20 73 79 73 74 65 6d  73 20 64 69 72 65 63 74  |g systems direct|
00001b20  6c 79 20 69 73 20 6f 66  74 65 6e 0a 73 69 6d 70  |ly is often.simp|
00001b30  6c 65 72 2e 0a 0a 2a 41  44 46 53 20 61 6e 64 20  |ler...*ADFS and |
00001b40  2a 4e 65 74 20 63 61 6e  20 62 65 20 75 73 65 64  |*Net can be used|
00001b50  20 74 6f 20 6d 61 6b 65  20 74 68 65 20 6e 61 6d  | to make the nam|
00001b60  65 64 20 52 49 53 43 20  4f 53 20 66 69 6c 69 6e  |ed RISC OS filin|
00001b70  67 20 73 79 73 74 65 6d  73 20 63 75 72 72 65 6e  |g systems curren|
00001b80  74 2e 0a 41 6c 74 65 72  6e 61 74 69 76 65 6c 79  |t..Alternatively|
00001b90  2c 20 2a 41 52 46 53 20  67 69 76 65 73 20 61 63  |, *ARFS gives ac|
00001ba0  63 65 73 73 20 74 6f 20  74 68 65 20 63 75 72 72  |cess to the curr|
00001bb0  65 6e 74 20 52 49 53 43  20 4f 53 20 66 69 6c 69  |ent RISC OS fili|
00001bc0  6e 67 20 73 79 73 74 65  6d 2e 0a 2a 44 69 73 63  |ng system..*Disc|
00001bd0  20 73 65 6c 65 63 74 73  20 74 68 65 20 44 46 53  | selects the DFS|
00001be0  20 65 6d 75 6c 61 74 69  6f 6e 2c 20 75 73 69 6e  | emulation, usin|
00001bf0  67 20 74 68 65 20 63 75  72 72 65 6e 74 20 52 49  |g the current RI|
00001c00  53 43 20 4f 53 20 66 69  6c 69 6e 67 20 73 79 73  |SC OS filing sys|
00001c10  74 65 6d 2e 0a 0a 2a 54  61 70 65 20 69 73 20 70  |tem...*Tape is p|
00001c20  72 6f 76 69 64 65 64 20  28 69 6e 20 63 61 73 65  |rovided (in case|
00001c30  20 61 6e 20 61 70 70 6c  69 63 61 74 69 6f 6e 20  | an application |
00001c40  69 73 73 75 65 73 20 74  68 69 73 20 63 6f 6d 6d  |issues this comm|
00001c50  61 6e 64 29 2c 20 62 75  74 20 63 61 6e 6e 6f 74  |and), but cannot|
00001c60  0a 6c 6f 61 64 20 6f 72  20 73 61 76 65 20 66 69  |.load or save fi|
00001c70  6c 65 73 2e 0a 0a 20 49  6e 66 6f 72 6d 61 74 69  |les... Informati|
00001c80  6f 6e 20 66 6f 72 20 73  6f 66 74 77 61 72 65 20  |on for software |
00001c90  64 65 76 65 6c 6f 70 65  72 73 0a 20 2d 2d 2d 2d  |developers. ----|
00001ca0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00001cb0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 0a  |---------------.|
00001cc0  0a 41 6e 20 69 6e 74 65  72 66 61 63 65 20 68 61  |.An interface ha|
00001cd0  73 20 62 65 65 6e 20 61  64 64 65 64 20 74 6f 20  |s been added to |
00001ce0  61 6c 6c 6f 77 20 36 35  30 32 20 70 61 67 65 64  |allow 6502 paged|
00001cf0  20 52 4f 4d 20 69 6d 61  67 65 73 20 74 6f 20 62  | ROM images to b|
00001d00  65 20 64 65 76 65 6c 6f  70 65 64 0a 77 68 69 63  |e developed.whic|
00001d10  68 20 6d 61 6b 65 20 61  63 63 65 73 73 20 74 6f  |h make access to|
00001d20  20 52 49 53 43 20 4f 53  20 53 57 49 73 2e 20 54  | RISC OS SWIs. T|
00001d30  68 65 20 53 57 49 20 69  73 20 63 61 6c 6c 65 64  |he SWI is called|
00001d40  20 62 79 20 65 78 65 63  75 74 69 6e 67 20 61 0a  | by executing a.|
00001d50  70 72 65 76 69 6f 75 73  6c 79 20 75 6e 64 65 66  |previously undef|
00001d60  69 6e 65 64 20 36 35 30  32 20 6f 70 63 6f 64 65  |ined 6502 opcode|
00001d70  2e 0a 0a 20 36 35 30 32  20 4f 70 63 6f 64 65 20  |... 6502 Opcode |
00001d80  26 30 37 20 2d 20 49 73  73 75 65 20 53 57 49 20  |&07 - Issue SWI |
00001d90  63 61 6c 6c 0a 20 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |call. ----------|
00001da0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00001db0  2d 2d 2d 2d 2d 2d 0a 0a  69 6e 3a 20 20 20 20 20  |------..in:     |
00001dc0  58 59 20 28 58 20 6c 6f  2d 62 79 74 65 2c 20 59  |XY (X lo-byte, Y|
00001dd0  20 68 69 2d 62 79 74 65  29 20 70 6f 69 6e 74 73  | hi-byte) points|
00001de0  20 74 6f 20 63 6f 6e 74  72 6f 6c 20 62 6c 6f 63  | to control bloc|
00001df0  6b 20 28 63 62 29 0a 0a  63 62 3f 30 2e 2e 32 20  |k (cb)..cb?0..2 |
00001e00  3d 20 53 57 49 20 6e 75  6d 62 65 72 20 28 6c 6f  |= SWI number (lo|
00001e10  2e 2e 68 69 29 20 28 62  69 74 20 31 37 20 73 65  |..hi) (bit 17 se|
00001e20  74 20 3d 3e 20 72 65 74  75 72 6e 20 65 72 72 6f  |t => return erro|
00001e30  72 73 20 77 69 74 68 20  56 20 73 65 74 29 0a 0a  |rs with V set)..|
00001e40  63 62 3f 33 20 20 20 20  3d 20 6e 75 6d 62 65 72  |cb?3    = number|
00001e50  20 6f 66 20 72 65 67 69  73 74 65 72 73 20 74 6f  | of registers to|
00001e60  20 70 75 74 20 62 61 63  6b 20 69 6e 74 6f 20 62  | put back into b|
00001e70  6c 6f 63 6b 20 6f 6e 20  65 78 69 74 2c 20 73 74  |lock on exit, st|
00001e80  61 72 74 69 6e 67 20 61  74 20 52 30 0a 0a 63 62  |arting at R0..cb|
00001e90  3f 34 20 20 20 20 3d 20  62 69 74 20 73 65 74 20  |?4    = bit set |
00001ea0  6f 66 20 72 65 67 69 73  74 65 72 73 20 74 6f 20  |of registers to |
00001eb0  72 65 6c 6f 63 61 74 65  20 6f 6e 20 65 6e 74 72  |relocate on entr|
00001ec0  79 20 74 6f 20 53 57 49  0a 20 20 20 20 20 20 20  |y to SWI.       |
00001ed0  20 20 20 28 62 69 74 20  6e 20 73 65 74 20 3d 3e  |   (bit n set =>|
00001ee0  20 72 65 6c 6f 63 61 74  65 20 52 6e 20 66 72 6f  | relocate Rn fro|
00001ef0  6d 20 36 35 30 32 20 74  6f 20 41 52 4d 20 61 64  |m 6502 to ARM ad|
00001f00  64 72 65 73 73 20 73 70  61 63 65 29 0a 0a 63 62  |dress space)..cb|
00001f10  3f 35 20 20 20 20 3d 20  62 69 74 20 73 65 74 20  |?5    = bit set |
00001f20  6f 66 20 72 65 67 69 73  74 65 72 73 20 74 6f 20  |of registers to |
00001f30  75 6e 72 65 6c 6f 63 61  74 65 20 6f 6e 20 65 78  |unrelocate on ex|
00001f40  69 74 20 66 72 6f 6d 20  53 57 49 0a 20 20 20 20  |it from SWI.    |
00001f50  20 20 20 20 20 20 28 62  69 74 20 6e 20 73 65 74  |      (bit n set|
00001f60  20 3d 3e 20 75 6e 72 65  6c 6f 63 61 74 65 20 52  | => unrelocate R|
00001f70  6e 20 66 72 6f 6d 20 41  52 4d 20 74 6f 20 36 35  |n from ARM to 65|
00001f80  30 32 20 61 64 64 72 65  73 73 20 73 70 61 63 65  |02 address space|
00001f90  29 0a 0a 63 62 3f 36 2c  37 20 20 3d 20 61 64 64  |)..cb?6,7  = add|
00001fa0  72 65 73 73 20 28 6c 6f  2c 68 69 29 20 6f 66 20  |ress (lo,hi) of |
00001fb0  65 72 72 6f 72 20 62 75  66 66 65 72 20 28 69 6e  |error buffer (in|
00001fc0  20 36 35 30 32 20 73 70  61 63 65 29 0a 20 20 20  | 6502 space).   |
00001fd0  20 20 20 20 20 20 20 6f  6e 6c 79 20 72 65 6c 65  |       only rele|
00001fe0  76 61 6e 74 20 69 66 20  62 69 74 20 31 37 20 6f  |vant if bit 17 o|
00001ff0  66 20 53 57 49 20 6e 75  6d 62 65 72 20 73 65 74  |f SWI number set|
00002000  0a 0a 63 62 3f 38 20 20  20 20 3d 20 6c 65 6e 67  |..cb?8    = leng|
00002010  74 68 20 6f 66 20 65 72  72 6f 72 20 62 75 66 66  |th of error buff|
00002020  65 72 20 28 63 61 6e 20  62 65 20 7a 65 72 6f 29  |er (can be zero)|
00002030  0a 0a 63 62 21 39 20 20  20 20 3d 20 72 65 67 69  |..cb!9    = regi|
00002040  73 74 65 72 20 52 30 0a  0a 63 62 21 31 33 20 20  |ster R0..cb!13  |
00002050  20 3d 20 72 65 67 69 73  74 65 72 20 52 31 0a 0a  | = register R1..|
00002060  2e 2e 0a 0a 63 62 21 33  37 20 20 20 3d 20 72 65  |....cb!37   = re|
00002070  67 69 73 74 65 72 20 52  37 0a 0a 6f 75 74 3a 20  |gister R7..out: |
00002080  20 20 20 41 2c 58 2c 59  20 70 72 65 73 65 72 76  |   A,X,Y preserv|
00002090  65 64 0a 20 20 20 20 20  20 20 20 4e 2c 5a 2c 43  |ed.        N,Z,C|
000020a0  2c 56 20 61 73 20 72 65  74 75 72 6e 65 64 20 62  |,V as returned b|
000020b0  79 20 74 68 65 20 41 52  4d 20 6f 6e 20 65 78 69  |y the ARM on exi|
000020c0  74 20 66 72 6f 6d 20 74  68 65 20 53 57 49 0a 20  |t from the SWI. |
000020d0  20 20 20 20 20 20 20 53  6f 6d 65 20 6f 72 20 61  |       Some or a|
000020e0  6c 6c 20 6f 66 20 74 68  65 20 72 65 67 69 73 74  |ll of the regist|
000020f0  65 72 20 62 6c 6f 63 6b  20 69 73 20 75 70 64 61  |er block is upda|
00002100  74 65 64 20 77 69 74 68  20 74 68 65 0a 20 20 20  |ted with the.   |
00002110  20 20 20 20 20 76 61 6c  75 65 73 20 6f 6e 20 65  |     values on e|
00002120  78 69 74 20 28 70 6f 73  73 69 62 6c 79 20 72 65  |xit (possibly re|
00002130  6c 6f 63 61 74 65 64 29  2c 20 61 73 20 63 6f 6e  |located), as con|
00002140  74 72 6f 6c 6c 65 64 20  62 79 20 63 62 3f 33 2c  |trolled by cb?3,|
00002150  34 2c 35 0a 0a 20 20 20  20 20 20 20 20 49 66 20  |4,5..        If |
00002160  62 69 74 20 31 37 20 6f  66 20 74 68 65 20 53 57  |bit 17 of the SW|
00002170  49 20 6e 75 6d 62 65 72  20 77 61 73 20 63 6c 65  |I number was cle|
00002180  61 72 2c 20 61 6e 64 20  61 6e 20 65 72 72 6f 72  |ar, and an error|
00002190  20 6f 63 63 75 72 73 2c  20 74 68 65 6e 0a 20 20  | occurs, then.  |
000021a0  20 20 20 20 20 20 63 6f  6e 74 72 6f 6c 20 77 69  |      control wi|
000021b0  6c 6c 20 6e 6f 74 20 72  65 74 75 72 6e 65 64 20  |ll not returned |
000021c0  74 6f 20 74 68 65 20 36  35 30 32 20 63 6f 64 65  |to the 6502 code|
000021d0  20 2d 20 69 6e 73 74 65  61 64 20 74 68 65 20 65  | - instead the e|
000021e0  72 72 6f 72 0a 20 20 20  20 20 20 20 20 62 6c 6f  |rror.        blo|
000021f0  63 6b 20 69 73 20 63 6f  70 69 65 64 20 74 6f 20  |ck is copied to |
00002200  26 31 30 30 20 69 6e 20  36 35 30 32 20 66 6f 72  |&100 in 6502 for|
00002210  6d 61 74 20 28 69 65 20  7a 65 72 6f 20 62 79 74  |mat (ie zero byt|
00002220  65 2c 20 31 20 62 79 74  65 20 65 72 72 6f 72 0a  |e, 1 byte error.|
00002230  20 20 20 20 20 20 20 20  6e 75 6d 62 65 72 2c 20  |        number, |
00002240  66 6f 6c 6c 6f 77 65 64  20 62 79 20 7a 65 72 6f  |followed by zero|
00002250  20 74 65 72 6d 69 6e 61  74 65 64 20 65 72 72 6f  | terminated erro|
00002260  72 20 73 74 72 69 6e 67  29 20 61 6e 64 20 74 68  |r string) and th|
00002270  65 6e 20 69 74 20 6a 75  6d 70 73 0a 20 20 20 20  |en it jumps.    |
00002280  20 20 20 20 74 6f 20 26  31 30 30 2c 20 77 68 69  |    to &100, whi|
00002290  63 68 20 63 61 75 73 65  73 20 61 20 42 52 4b 2e  |ch causes a BRK.|
000022a0  20 49 66 20 6e 6f 20 65  72 72 6f 72 20 6f 63 63  | If no error occ|
000022b0  75 72 72 65 64 2c 20 63  6f 6e 74 72 6f 6c 20 77  |urred, control w|
000022c0  69 6c 6c 20 62 65 0a 20  20 20 20 20 20 20 20 72  |ill be.        r|
000022d0  65 74 75 72 6e 65 64 20  61 6e 64 20 56 20 77 69  |eturned and V wi|
000022e0  6c 6c 20 62 65 20 63 6c  65 61 72 2e 0a 0a 20 20  |ll be clear...  |
000022f0  20 20 20 20 20 20 49 66  20 62 69 74 20 31 37 20  |      If bit 17 |
00002300  6f 66 20 74 68 65 20 53  57 49 20 6e 75 6d 62 65  |of the SWI numbe|
00002310  72 20 77 61 73 20 73 65  74 2c 20 74 68 65 6e 20  |r was set, then |
00002320  74 68 65 20 58 20 66 6f  72 6d 20 6f 66 20 74 68  |the X form of th|
00002330  65 20 53 57 49 0a 20 20  20 20 20 20 20 20 69 73  |e SWI.        is|
00002340  20 69 73 73 75 65 64 3b  20 69 66 20 74 68 69 73  | issued; if this|
00002350  20 72 65 74 75 72 6e 73  20 77 69 74 68 20 56 20  | returns with V |
00002360  73 65 74 2c 20 74 68 65  6e 20 74 68 65 20 65 72  |set, then the er|
00002370  72 6f 72 20 62 6c 6f 63  6b 20 69 73 0a 20 20 20  |ror block is.   |
00002380  20 20 20 20 20 63 6f 70  69 65 64 20 69 6e 74 6f  |     copied into|
00002390  20 74 68 65 20 73 70 65  63 69 66 69 65 64 20 65  | the specified e|
000023a0  72 72 6f 72 20 62 75 66  66 65 72 20 69 6e 20 36  |rror buffer in 6|
000023b0  35 30 32 20 66 6f 72 6d  61 74 2c 20 74 72 75 6e  |502 format, trun|
000023c0  63 61 74 65 64 0a 20 20  20 20 20 20 20 20 74 6f  |cated.        to|
000023d0  20 74 68 65 20 6c 65 6e  67 74 68 20 6f 66 20 74  | the length of t|
000023e0  68 65 20 65 72 72 6f 72  20 62 75 66 66 65 72 20  |he error buffer |
000023f0  28 69 66 20 74 72 75 6e  63 61 74 65 64 20 74 68  |(if truncated th|
00002400  65 20 74 65 72 6d 69 6e  61 74 69 6e 67 0a 20 20  |e terminating.  |
00002410  20 20 20 20 20 20 7a 65  72 6f 20 77 69 6c 6c 20  |      zero will |
00002420  62 65 20 69 6e 20 74 68  65 20 6c 61 73 74 20 62  |be in the last b|
00002430  79 74 65 20 6f 66 20 74  68 65 20 65 72 72 6f 72  |yte of the error|
00002440  20 62 75 66 66 65 72 29  2e 0a 0a 53 75 70 70 6f  | buffer)...Suppo|
00002450  72 74 20 68 61 73 20 61  6c 73 6f 20 62 65 65 6e  |rt has also been|
00002460  20 61 64 64 65 64 20 66  6f 72 20 73 65 6c 65 63  | added for selec|
00002470  74 69 6e 67 20 61 20 66  69 6c 69 6e 67 20 73 79  |ting a filing sy|
00002480  73 74 65 6d 20 61 6e 64  20 72 75 6e 6e 69 6e 67  |stem and running|
00002490  20 61 0a 66 69 6c 65 2c  20 77 68 65 6e 20 74 68  | a.file, when th|
000024a0  65 20 65 6d 75 6c 61 74  6f 72 20 69 73 20 73 74  |e emulator is st|
000024b0  61 72 74 65 64 2e 0a 0a  4f 6e 20 61 6e 79 20 72  |arted...On any r|
000024c0  65 73 65 74 2c 20 73 79  73 74 65 6d 20 76 61 72  |eset, system var|
000024d0  69 61 62 6c 65 20 36 35  48 6f 73 74 24 42 6f 6f  |iable 65Host$Boo|
000024e0  74 4f 70 74 69 6f 6e 73  20 69 73 20 72 65 61 64  |tOptions is read|
000024f0  2e 0a 0a 42 69 74 73 20  32 2e 2e 37 2c 20 31 36  |...Bits 2..7, 16|
00002500  2e 2e 33 31 20 61 72 65  20 72 65 73 65 72 76 65  |..31 are reserve|
00002510  64 20 61 6e 64 20 73 68  6f 75 6c 64 20 62 65 20  |d and should be |
00002520  73 65 74 20 74 6f 20 30  2e 0a 0a 42 69 74 73 20  |set to 0...Bits |
00002530  38 2e 2e 31 35 20 63 6f  6e 74 61 69 6e 20 74 68  |8..15 contain th|
00002540  65 20 6e 75 6d 62 65 72  20 6f 66 20 74 68 65 20  |e number of the |
00002550  66 69 6c 69 6e 67 20 73  79 73 74 65 6d 20 74 6f  |filing system to|
00002560  20 62 65 20 73 74 61 72  74 65 64 20 75 70 2e 0a  | be started up..|
00002570  0a 20 30 20 20 3d 3e 20  64 65 66 61 75 6c 74 20  |. 0  => default |
00002580  69 65 20 41 44 46 53 0a  20 31 20 20 3d 3e 20 54  |ie ADFS. 1  => T|
00002590  41 50 45 20 28 6f 66 20  6c 69 74 74 6c 65 20 75  |APE (of little u|
000025a0  73 65 21 29 0a 20 34 20  20 3d 3e 20 44 46 53 20  |se!). 4  => DFS |
000025b0  65 6d 75 6c 61 74 69 6f  6e 0a 20 35 20 20 3d 3e  |emulation. 5  =>|
000025c0  20 4e 45 54 0a 20 38 20  20 3d 3e 20 41 44 46 53  | NET. 8  => ADFS|
000025d0  0a 20 31 31 20 3d 3e 20  41 52 46 53 20 28 69 65  |. 11 => ARFS (ie|
000025e0  20 74 68 65 20 63 75 72  72 65 6e 74 20 52 49 53  | the current RIS|
000025f0  43 20 4f 53 20 66 69 6c  69 6e 67 20 73 79 73 74  |C OS filing syst|
00002600  65 6d 29 0a 0a 42 69 74  73 20 30 2e 2e 31 20 61  |em)..Bits 0..1 a|
00002610  72 65 20 74 68 65 20 62  6f 6f 74 20 6f 70 74 69  |re the boot opti|
00002620  6f 6e 20 28 74 68 65 20  65 71 75 69 76 61 6c 65  |on (the equivale|
00002630  6e 74 20 6f 66 20 74 68  65 20 2a 4f 50 54 20 34  |nt of the *OPT 4|
00002640  20 73 65 74 74 69 6e 67  29 0a 0a 20 30 20 3d 3e  | setting).. 0 =>|
00002650  20 64 6f 20 6e 6f 74 68  69 6e 67 2c 20 31 20 3d  | do nothing, 1 =|
00002660  3e 20 2a 4c 6f 61 64 2c  20 32 20 3d 3e 20 2a 52  |> *Load, 2 => *R|
00002670  75 6e 2c 20 33 20 3d 3e  20 2a 45 78 65 63 0a 0a  |un, 3 => *Exec..|
00002680  4f 6e 20 61 20 70 6f 77  65 72 2d 6f 6e 20 72 65  |On a power-on re|
00002690  73 65 74 20 74 68 69 73  20 62 6f 6f 74 20 6f 70  |set this boot op|
000026a0  74 69 6f 6e 20 69 73 20  75 73 65 64 20 69 6e 20  |tion is used in |
000026b0  63 6f 6e 6a 75 6e 63 74  69 6f 6e 20 77 69 74 68  |conjunction with|
000026c0  20 74 68 65 0a 66 69 6c  65 6e 61 6d 65 20 73 70  | the.filename sp|
000026d0  65 63 69 66 69 65 64 20  62 79 20 74 68 65 20 73  |ecified by the s|
000026e0  79 73 74 65 6d 20 76 61  72 69 61 62 6c 65 20 36  |ystem variable 6|
000026f0  35 48 6f 73 74 24 42 6f  6f 74 46 69 6c 65 20 74  |5Host$BootFile t|
00002700  6f 20 27 72 75 6e 27 20  61 0a 70 72 6f 67 72 61  |o 'run' a.progra|
00002710  6d 2e 0a 0a 65 67 20 74  68 65 20 66 6f 6c 6c 6f  |m...eg the follo|
00002720  77 69 6e 67 20 73 65 71  75 65 6e 63 65 20 65 6e  |wing sequence en|
00002730  74 65 72 73 20 74 68 65  20 65 6d 75 6c 61 74 6f  |ters the emulato|
00002740  72 2c 20 73 65 6c 65 63  74 73 20 74 68 65 20 41  |r, selects the A|
00002750  44 46 53 20 66 69 6c 69  6e 67 0a 73 79 73 74 65  |DFS filing.syste|
00002760  6d 20 61 6e 64 20 2a 52  75 6e 73 20 61 20 66 69  |m and *Runs a fi|
00002770  6c 65 20 63 61 6c 6c 65  64 20 47 61 6d 65 20 3a  |le called Game :|
00002780  2d 0a 0a 20 20 20 20 20  20 20 20 2a 53 65 74 20  |-..        *Set |
00002790  36 35 48 6f 73 74 24 42  6f 6f 74 4f 70 74 69 6f  |65Host$BootOptio|
000027a0  6e 73 20 26 38 30 32 0a  20 20 20 20 20 20 20 20  |ns &802.        |
000027b0  2a 53 65 74 20 36 35 48  6f 73 74 24 42 6f 6f 74  |*Set 65Host$Boot|
000027c0  46 69 6c 65 20 47 61 6d  65 0a 20 20 20 20 20 20  |File Game.      |
000027d0  20 20 2a 45 6d 75 6c 61  74 65 42 42 43 0a 0a 54  |  *EmulateBBC..T|
000027e0  68 65 20 21 52 75 6e 20  66 69 6c 65 20 73 65 74  |he !Run file set|
000027f0  73 20 75 70 20 74 68 65  73 65 20 76 61 72 69 61  |s up these varia|
00002800  62 6c 65 73 20 66 72 6f  6d 20 74 68 65 20 72 65  |bles from the re|
00002810  73 74 20 6f 66 20 74 68  65 20 63 6f 6d 6d 61 6e  |st of the comman|
00002820  64 20 6c 69 6e 65 0a 70  61 73 73 65 64 20 74 6f  |d line.passed to|
00002830  20 69 74 2e 20 54 68 65  20 73 79 6e 74 61 78 20  | it. The syntax |
00002840  69 73 0a 0a 20 20 20 20  20 20 20 20 2a 52 75 6e  |is..        *Run|
00002850  20 21 36 35 48 6f 73 74  20 3c 42 6f 6f 74 4f 70  | !65Host <BootOp|
00002860  74 69 6f 6e 73 3e 20 3c  42 6f 6f 74 46 69 6c 65  |tions> <BootFile|
00002870  3e 0a 0a 65 67 20 74 6f  20 6c 6f 61 64 20 74 68  |>..eg to load th|
00002880  65 20 65 6d 75 6c 61 74  6f 72 20 61 6e 64 20 70  |e emulator and p|
00002890  65 72 66 6f 72 6d 20 74  68 65 20 61 62 6f 76 65  |erform the above|
000028a0  20 6f 70 65 72 61 74 69  6f 6e 2c 20 79 6f 75 20  | operation, you |
000028b0  6d 69 67 68 74 20 64 6f  20 3a 2d 0a 0a 20 20 20  |might do :-..   |
000028c0  20 20 20 20 20 2a 52 75  6e 20 21 36 35 48 6f 73  |     *Run !65Hos|
000028d0  74 20 26 38 30 32 20 47  61 6d 65 0a              |t &802 Game.|
000028dc
!65Host/ReadMe.m0
!65Host/ReadMe.m1
!65Host/ReadMe.m2
!65Host/ReadMe.m4
!65Host/ReadMe.m5