[A83] Re: Interrupt troubles [83, Ion]


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

[A83] Re: Interrupt troubles [83, Ion]




> Van: Kirk Meyer <kirk.meyer@colorado.edu>
>
> DI isn't necessary at the beginning of the interrupt (interrupts already
> disabled), and RETI can be changed to RET at the end.

Is DI unnecesairy because the hardware-that-interrupts is disabled, or
because when an interrupt occures the processor automaticaly disables it's
interrupt-port (DI) and runs the code the IV table points to?

What is the "in/out (3)" stuff needed for, I wanted to write a 'wrapper'
for the TIOS interrupt. I have now tried it together with the greyscale
interrupt; like this here, but it makes the program drop back to the TIOS:

.IntProcStart
	push	af			;
	push	hl			;
	push	de			;
	push	bc			;
					;
	in	a,(3)			; check vbl int
	and	@00000010		;
	jr	z,exit_interrupt	;
	ld	hl,intcount		; inc counter
	inc	(hl)			;
	ld	a,(hl)			;
	dec	a			; 1
	jr	z,Display_pic1		;
	dec	a			; 2
	jr	z,Display_pic2		;
	ld	(hl),0			; reset counter
.exit_interrupt				;
	in	a,(3)			; check on interrupt status
	rra				;
	ld	a,0			;
	adc	a,9			;
	out	(3),a			;
	ld	a,$0B			;
	out	(3),a			;
					;
	exx				; Swap to shadow registers.
	ex	af,af			; So the TIOS swaps back to the
	rst	$38			; normal ones... (the ones we saved
	ex	af,af			; with push/pops)
	exx				;
	pop	bc			;
	pop	de			;
	pop	hl			;
	pop	af			;
	ei				;
	ret				;

I suspect the "in/out (3)" to be the problem, what does it do?
Does it enable the "hardware-that-interrupts" again?
The TIOS is also fiddeling around with this port...

	Henk Poley




Follow-Ups: