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


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

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




I'm not exactly sure why that would return to the TIOS. If the 83 port 3 is
the same as the 86's, then that code first checks to see if the screen is
updating (?! - this shouldn't matter on 83..) and then secondly does stuff
with port 3 so that the ON key doesn't crash the calculator. However since
you're calling the TIOS interrupt (presumably for the GetCSC support), it
already does the second thing with port 3 for you. And I'm not sure whether
the first thing with port 3 makes sense in light of the way the 83 updates
its screen.

-----Original Message-----
From: assembly-83-bounce@lists.ticalc.org
[mailto:assembly-83-bounce@lists.ticalc.org]On Behalf Of Henk Poley
Sent: Saturday, July 07, 2001 3:29 AM
To: assembly-83@lists.ticalc.org
Subject: [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





References: