robcfg Posted April 5, 2018 Share Posted April 5, 2018 Hello everyone! I'm trying to code something for my 800XL, as I couldn't do any assembler when I got it loooong time ago, and already manages to initialize a graphics mode and draw some stuff. Problem is, when I hit any key, the display goes to hell and I suspect that the code execution too. I've tried to hook a routine to VKEYBD which just does a RTI (for now, just ignoring the keyboard input is fine), but I haven't managed to get rid of the problem. Can I just do an RTI or do I have to clear any other memory location? Thanks! Quote Link to comment Share on other sites More sharing options...
Wrathchild Posted April 5, 2018 Share Posted April 5, 2018 I think you need to PLA before the RTI to keep the stack correct 1 Quote Link to comment Share on other sites More sharing options...
ivop Posted April 5, 2018 Share Posted April 5, 2018 Or perhaps you can just disable all keyboard/break key interrupts by writing 0 to IRQEN ($d20e) ? 1 Quote Link to comment Share on other sites More sharing options...
robcfg Posted April 6, 2018 Author Share Posted April 6, 2018 Thank you guys! You both were right. I didn't know that I had to do a PLA before the RTI and setting IRQEN to 0 makes the problem go away. Cheers, Rob 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.