APPENDIX ELEVEN After this is done, POKE 53769,0 ($D209). Now enable the inter- rupt: POKE 16 with PEEK(16) plus the number of the interrupt you're using (1 = timer 1 interrupt, 2 = timer 2, 4 = timer 4-- there's no timer 3!). POKE the same value into 53774. Your inter- rupt routine will begin; it will generate an interrupt when the timer counts down to zero. The timer is reloaded with the orig- inal value you POKEd there, and the process begins all over again. There are several problems to watch for: First, the OS pushes the A register onto the stack before jumping through the vector address. If you need the X and Y registers, push them on as well. Before you return from the interrupt, pull the X and Y back off, PLA, and clear the interrupt with CLI. If you don't need the screen display, POKE 559,0 to turn it off; DMA steals clock cycles from the timer, This means you'll have to make any commands which deal with shadow registers (like SETCOLOR and GRAPHICS) first. DMA also turns off the keyboard repeat and realtime clock. Disable the keyboard to gain a bit more time if necessary. Refer to Micro and ROM, December 1984, for more information about POKEY timers. 555 22B SRTIMR Each time you read this location, you get a different number. That's because it's counting down from when a key is de- pressed to time the delay before repeating the key. 558 22E CDTMF5 Set when location 544,545 ($220,$221) counts down to zero. From Joe Gelman, Atari SIG, CompuServe. 570 23A CDEVIC The current SIO bus ID (device) number. 632 278 STICK0 The pins on the joystick port are mapped as follows: _______________________________ \ / \ 1 2 3 4 5 / \ / \ 6 7 8 9 / \_____________________/ 1 Stick forward 2 Stick back 3 Stick left