| Z88 Developers' Notes | ||
|---|---|---|
| Contents | Contents of System Calls | |
EXTCALL, call subroutine in external bank
RST 10H
This routine is executed by the RST 10H vector. Both RST 10H and
this routine is located in LOWRAM. The 24bit address is available in
low byte - high byte order following the RST 10H instruction opcode.
The segment specifier (bits 15,14) of the lower 16bit address
automatically identifies where the bank will be bound into the Z80
address space. The bank number of the 24bit address may be specified as absolute or as slot relative ($00 - $3F).
In Z80 assembler, Mpm notation: EXTCALL $C000,$FE (a RST 10H
followed by 24bit address) execute code in bank $FE at address $C000
bound into segment 3 (the instruction opcode sequence in memory is $D7,
$00, $C0, $FE). This call instruction uses an absolute bank (located in
slot 3) in the 24bit address, ie. a piece of code in slot 2 might want
to execute a subroutine in slot 3.
Slot relative subroutine calls defines the bank number in the range $00 - $3F (same principle as for DOR pointers in application cards). An instantiated large application using more than 32K code space (that typically needs the remaining free segments in the Z80 address space for dynamic data structure management) would use the 24bit slot relative call to execute subroutines in banks that are not bound in the Z80 address by default as defined by the Application DOR).
Registers changed after return: AFBCDEHL/IXIY same
......../.... different
Related calls:
None