Re: A86: interrupt test program


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

Re: A86: interrupt test program




At 12:10 AM 12/17/97 -0600, you wrote:
>
>that is damn kewl! only problem is i dunno how the hell u(whoever made
>it) did it. can you please email me or the list explaining what each
>part of the code (besides the xoring pixels) does? thanks
>   
Alright, it's pretty simple, really. If bit 2,(iy+$23) (35 decimal) is set,
the interrupt routine (rst 38h) will call a user interrupt routine every
time it gets called (200 times a second, or something). The interrupt
routine goes in a special 200 byte area of the ram, $d2fe-$d3c5.

So you just res 2,(iy+$23), then copy your interrupt routine to $d2fe. The
byte at $d2fd is a checksum byte of sorts, you have to set it to
($d2fe)+($d325)+($d34d)+($d375)+($d39d)+($d3c5). Then you set 2,(iy+$23),
and the routine gets called every time an interrupt happens.

Actually, you don't even have to write the code yourself - just use testint
and replace everything after the int: label with your own routine.
Variables after the int label be declared like this:
var equ $-int+_user_int_ram+1
   .db (or .dw)
instead of like this:
var:
   .db

--Joshua


Follow-Ups: References: