Re: LZ: RST
[Prev][Next][Index][Thread]
Re: LZ: RST
On Wed, 31 Jul 1996, David Kristensen wrote:
> What exactly does the RST instruction mean/stand for/do, etc? I haven't come
> across it in computer assembly (but I know less about that than I do z80, so
> that doesn't say much). Does it just call a function on rom page 0? (oh
> yeah, if it does, do I need to make sure that the rom page is on 0, or will
> it do that automatically?). Any answers would be appreciated (well, almost
> any answers...:)
What's the difference in computer assembly and Z80?
RST is a software interrupt. It stands for ReSTart according
to my book. There are 8 addresses in lower memory that
correspond to the RST numbers. When RST is encountered
the PC is pushed onto the stack and execution continues at
one of the 8 addresses, depending on the RST number.
Those addresses are in rom and usually contain jumps
to other rom areas. Just what each RST does is dependant
on the rom.
When I did some Z80 programming around 79 or 80, this was
called BRK, if I remember correctly. It was just a different
mnemonic for the same instruction. I'm not 100% sure I'm
not confusing this with another cpu though.
Barry
References: