Re: A86: interrupts


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

Re: A86: interrupts





On Thu, 30 Apr 1998 20:55:02 -0400 Dux Gregis <assets@eden.rutgers.edu>
writes:
>
>I have two questions:
>
>Will the disable interrupt instruction disable the interrupt in
>interrupt mode 2?
should, don't know for sure.

>And, if instead of pushing the registers in an interrupt routine you 
>did
><pop hl>, would you have the program counter in hl from where the
>routine was called?  I don't think this would be possible using the
>regular interrupt because you would destroy the registers, but maybe
>using interrupt mode 2?
>
yes, you'd get the return address in hl.  there are ways to save the
registers and get this.  you could save sp to memory:
	ld (save_sp),sp
	push hl
	push de
	etc..
	ld hl,save_sp
	ld e,(hl)
	inc hl
	ld d,(hl)

or the register(s):
	ld (save_hl),hl
	pop hl
	push hl	;you do want to return there?

or use exchange, but i don't know if those registers are used for
anything:
	exx
	ex af,af'
	pop hl
	push hl

	exx
	ex af,af'	

-josh

_____________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
Or call Juno at (800) 654-JUNO [654-5866]


Follow-Ups: References: