Watchdog (&0000)
This value is initially set to 255
(&
FF) and it is continually
decremented by the 50Hz ticker. Upon such time that this value
ever reaches zero, the BIOS will reset all hardware,
fast-flash all LEDs, and enter a recursive loop (effectively
locking out the application).
At 50Hz, it will take 510
centiseconds for the watchdog to 'expire' (or about five
seconds). Sometime during this period, the application
must reset the watchdog to its 255 value.
BIOS area (&0001-&005F)
This
area of Page Zero is reserved for use by the BIOS. Application
code should not read or write any of the BIOS data. If you
need to know what lies where, for any reason, then please
refer to the firmware source
code(s).
Vector area
(&0060-&007F)
When
certain events happen, the BIOS calls certain vectors.
Normally these vectors will point back into the BIOS for
handling, though in some cases you will be expected to pick up
on the vector.
You can choose to pre-process the vector,
post-process it, pre-and-post process it, or entirely replace
it.
All vectors are called using JMP
(indirect).
As the BIOS
has not yet been written, it is not possible to state the
processor flags or stacked data at point of vector
call!
Vectors in
black are provided purely as
ways to alter or intercept normal BIOS activities. These
vectors are not necessarily to be hooked in to
(i.e. if you pick up Serial RXByteLF you may not be
interested in Serial RXByte).
Vectors in
blue are intended for the
application code
to do something; but again this is
optional.
IRQ vector &0060
This is called as soon as
an interrupt occurs.
It is not
recommended that you use this, unless you intend to
completely replace Amélie's interrupt
system.
Normal behaviour is to call BIOS
interrupt dispatch code, which may call further
vectors.
Ticker vector &0062
This is
called every time the 50Hz ticker interrupt occurs.
Code attached to this vector must be
quick.
Normal behaviour is the BIOS code that
maintains the ticker events, then only bit 6 of the IFR
will be reset.
Many internal service routines
rely upon the ticker vector, so if you intercept this
vector you should be sure to call the original handler
before or after your own handler.
VIA IRQ &0064
This is called for a VIA interrupt
that was not
the 50Hz ticker. You use this to implement custom
responses to specific events, i.e. a "panic button" or
"crash" sensor. Refer to the VIA
description for further details of the IFR.
Normal
behaviour is for the BIOS to write zero to the IFR
and return (i.e. ignoring the interrupt).
Unused1 &0066
This vector is unused, and will point to the
processor reset vector.
Serial
buffer full &0068
This vector is called if the serial
input buffer (128 bytes) is full. At this time, the BIOS
will automatically
deassert CTS so the connected machine
should cease sending data. Amélie uses hardware
handshaking, it does not support XON/XOFF. The BIOS does not re-assert CTS, you
must instruct it
to do this when you are ready to continue serial
reception.
If serial reception does
not cease, any further data received will be
discarded.
Serial RXByte &006A
This is called when the ACIA tells us a
byte has been received, and is present in the ACIA's receive
register.
Normal behaviour is the BIOS will retrieve the byte and push
it to the serial buffer.
Serial RXByteLF&006B
This is called, after RXByte,
if the byte received is a linefeed (ASCII 10, hex &0A). This is to allow for
line-based command entry. Note that Amélie uses the
RISC OS convention of a single LF to mark newlines, rather
than the DOS convention of a CRLF
combination.
Serial TXByte &006C
This is called when the ACIA tells us
that the transmit buffer is empty.
Normal behaviour is for the BIOS to
send the next byte, if there is one
waiting.
Serial Other &006E
This is calls for other ACIA interrupt
reasons - DCD detected, or DSR status change.
Either of
these can be wired to allow Amélie to detect if a
serial link is connected. Amélie holds !DTR low to
signify that the serial functions are active. A
suitably-wired 'basic' serial lead would connect !DTR to
!DSR so that Amélie can detect if the lead is
connected. Refer to the ACIA
description for more details.
Normal behaviour is to
clear the interrupt and return (i.e. ignoring
it).
WatchFail &0070
This is called by the watchdog code
immediately prior to device reset and application
lock-out.
NOTE THAT THIS VECTOR
SHOULD NOT BE USED INSTEAD OF RESETTING THE WATCHDOG
PERIODICALLY.
Normal
behaviour is to point to the watchdog handling
code.
NewMin &0072
This is
called when the internal time rolls over to a new
minute.
In the case of new hour or new day,
this vector is also called,
afterwards.
Normal behaviour is to do
nothing.
NewHour &0074
This is called when the internal time
rolls over to a new hour.
In the case of new day, this vector
is also called, afterwards.
Normal behaviour is to do
nothing.
NewDay &0076
This is called when the internal time
rolls over to a new day.
Normal behaviour is to do
nothing.
Unused2 -
Unused5 &0078 - &007E
These
vectors are unused, and point to the processor reset
vector.
Application area
(&0080-&00BF)
This is an allocation of 64 bytes that may
be used by the application code.
BIOS reserved
(&00C0-&00FF)
This area is reserved for future use by
the BIOS.