Re: A86: Reset opcodes
[Prev][Next][Index][Thread]
Re: A86: Reset opcodes
On Mon, 1 Sep 1997 Steve86Asm@aol.com wrote:
> I've seen in many previous mails mention of the commands "rst 20h \ rst 10h"
> and I somewhat understand what they do. However, I would greatly appreciate
> it if someone could explain what a reset is and does (is it like an interrupt
> or something?), what the other ones (18h, 28h, 30h, etc.) do, if anything,
> and how a single opcode can search the entire VAT for a variable and create a
> pointer to it.
When the Z80 sees one of the RST (reset) opcodes, it saves the current
value of the Program Counter on the stack and jumps to the appropriate
location (0,8,10,&c). It fetches opcodes from there until it reaches a
RETI instruction.
The RST commands are a nifty way of making calls to commonly-used routines
take up 1 byte instead of 3, and be *slightly* faster.
RST 00 : reset the calc (you don't want to call this one)
RST 08 : move OP1 to OP2
RST 10 : find var
RST 18 : not sure
RST 20 : copy var name to OP1
RST 28 : not sure
RST 30 : not sure
RST 38 : not sure
I think 38 deals with on/off. I'm pretty sure one of the others deletes
variables.
--------
Dan Eble (mailto:eble@cis.ohio-state.edu)
(http://www.cis.ohio-state.edu/~eble)
References: