Re: A83: Re: Interrupt routines
[Prev][Next][Index][Thread]
Re: A83: Re: Interrupt routines
Oops, I made a mistake in my last email about the MirageOS interrupt routine
(which is moderately humorous, since I wrote the MirageOS interrupt
routine). It uses the address in (custintaddr) not in hl for setupint. So
the code would be:
ld a,40
ld hl,InterruptStart
ld (custintaddr),hl
call setupint
Custintaddr and setupint are defined in mirage.inc
About the forty in the accumulator and the length of the routine, I suppose
I should have made that more clear. MirageOS has as built in interrupt
routine that has many different functions that can be enabled or disabled as
the program likes. By default, the only one that is enabled is the tasker
interrupt (which allows things like contrast changing, speed changing,
screen shots, etc while the program is running). To change which interrupts
are running, you load a number into register A and call the setupint
routine. Here's how to determine the A you want:
bit 0 = timer interrupt - Keeps track of a 3 counter timer system
bit 1 = getkey interrupt - Disables 2nd+off in _getkey call
bit 2 = apd interrupt - Will APD after about 3 minutes if no keys
are pressed
bit 3 = task interrupt - Allows in program on+hotkey combinations
bit 4 = keydelay interrupt - Removes first delay when arrow keys are
pressed
bit 5 = custom interrupt - Enables a custom interrupt routine.
So assuming you wanted the tasker (default) interrupt and the custom
interrupt, you have 101000b, which is 40d. Setupint does not need to know
how long your routine is because it doesn't copy the routine anywhere. It
just reads the value from (custintaddr) and modifies the interrupt it loads
into memory to call that address. So for your custom routine, you wouldn't
need any of the exx \ ex af,af' stuff that are generally in interrupt
routines, since this is already done before your routine is called. For an
interrupt routine in Ion, you'd have to worry about that stuff.
-Dan Englender
----- Original Message -----
From: "John" <tankrshr77@yahoo.com>
To: <assembly-83@lists.ticalc.org>
Sent: Monday, September 04, 2000 2:52 PM
Subject: Re: A83: Re: Interrupt routines
>
> Thank you.
> Two questions: for the routine in MirageOS, what does
> the 40 loaded into the accumulator do, and how does
> the routine know where the end of your code is?
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Mail - Free email you can access from anywhere!
> http://mail.yahoo.com/
>
References: