Re: LZ: variables


[Prev][Next][Index][Thread]

Re: LZ: variables



> > No, they aren't really interrupts as such .. (you're thinking of interrupt mode 
> > 0, in which the peripheral will send an RST instruction to the 
> > processor) (I guess you coudl veiw tehm in teh same light as SWI's on 
> > later processors, but the Z80 doesn't actually treat RST's as 
> > interrupts, just calls)
> > 
> > But you are quite right, they could do different things on different 
> > roms (remember kids, RST 10h = CALL $10, etc.)
>  
> What is the difference in treating it like an interrupt or a call?
> They're both pretty much the same thing except for some incidental
> details which vary from cpu to cpu.
> 
> Or do you mean that int mode 0 actually does treat it different, like
> turning off further interrupts or pushing the flag register, etc?
> 
> The one thing all software interrupts have in common is that they
> push the PC and begin execution at a pre-determined address.  Some
> also push something else.  Some use indirection.  But the common
> ingredients seem to include the Z80.  Is it just a question of
> terminology or am I missing something?


No, interrupts toggle the IFF flags, and let peripheral know that an 
exption is in process nd must be returned from with reti or retn (to 
set the IFF flags back)


It's a very subtle differene,but.....
The RST instruction is an oddity - it's leftover from the 8080 
instruction set, in which it was specifically used by inetrrupting 
peripherals, on the z80 (when not in int mode 0) it doesn't have a 
clearly defined role.. 
 


Rob Taylor MAIL - mailto:rtaylor@rtaylor.u-net.com 
           WEB  - http://www.u-net.com/~rtaylor/    


Follow-Ups: References: