[A83] interrupt trouble


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

[A83] interrupt trouble




Are there any other interrupts than Timer and [ON] ??
Take a look at this piece of code from Cheatyreset:

;	in	a,(3)
;	bit	2,a
;	jp	nz,00B1h ;if bit 2 set =>$B1 (timer int happened)
;	rra
;	jp	c,0072h ;if carry fom bit 0 =>$72 (on int happened)
;	rra
;	jp	nc,004Bh ;if no carry from bit 1 =>$4B (LCD is off)

This is executed as an im 2 interrupt.
First it checks wether that interrupt was an timer one =>$B1.
Then check if it was an [ON] interrupt => $72.
And then it checks wether the LCD is on or off???
I always thaught that an interrupt was either timer or [ON],
so it could not be possible to check the LCD, because the
calc would always go to either $B1 or $72.
So there must be an other kind of interrrupt.
Or am I missing something?



Read port 3
-----------

Bit 3 = 1: ON not pressed
        0: ON pressed now
Bit 2 = 1: Timer interrupt happened
        0: timer interrupts hasn't happened
Bit 1 = 1: LCD is on
        0: LCD is off
Bit 0 = 1: ON interrupt has happened
        0: ON interrupt hasn't happened



      SUCKER [Pieter Van Nuffel]


_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com