User`s manual

BL1600 System Development s 45
Software Support
This section describes functions for Port 0 of the Z180. Similar functions
are available for the XP8700 expansion card. For the XP8700, substitute
uart for z0 in the function name. For Z180 Port 1, substitute z1
for z0 in the function name. For example, the initialization routine for
Z180 Port 0 is called Dinit_z0. The equivalent function for the XP8700
would be Dinit_uart and the equivalent function for Z180 Port 1 would
be Dinit_z1.
Refer to the XP8700 and XP8800 Users Manual for more
information on the XP8700 expansion board.
Interrupt Handling for Z180 Port 0
Normally, a serial interrupt service routine would be declared with the
following compiler directive.
#INT
_
VEC SER0
_
VEC routine
However, if you use the same serial port for Dynamic C programming,
your program has to be downloaded first with Dynamic C before the
address of the serial interrupt service routine is loaded into the interrupt
vector table. That is, the service routine must be loaded at run-time. The
function
reload
_
vec( int vector, int(*serv
_
function)() )
will load the address of the service function into the specified location in
the interrupt vector table. In this case, do not use the #INT
_
VEC directive.
Once your service routine has taken over, Dynamic C cannot be used to
debug your program.
When executable programs are generated for EPROM or for download to
RAM, there will be no need for communication with Dynamic C. Then,
the compile-time directive #INT
_
VEC can be used freely.
$