Page 1 of 1

Interrupt handling Tutorial

Posted: Mon Jun 19, 2023 9:33 am
by MartinC
Hi all,

Could anyone recommend a good tutorial for interrupt handling on the Vic? What I want to do is regularly check a memory location and then update the screen based on what I find, then carry on with normal processing. At a later point I will be wanting to check for keyboard input and processing that.

I've searched this forum and googled, but haven't found a good beginners guide to this based on the Vic 20.

Any help appreciated, as always.

Thanks

Martin

Re: Interrupt handling Tutorial

Posted: Mon Jun 19, 2023 10:40 am
by D-Type
Post deleted

Re: Interrupt handling Tutorial

Posted: Tue Jun 20, 2023 5:32 am
by Mike
MartinC wrote:Could anyone recommend a good tutorial for interrupt handling on the Vic? [...] I've searched this forum and googled, but haven't found a good beginners guide to this based on the Vic 20. [...]
You might want to check out this posting of mine from 2004.
What I want to do is regularly check a memory location and then update the screen based on what I find, then carry on with normal processing. At a later point I will be wanting to check for keyboard input and processing that.
Neither of those two tasks necessarily require the use of interrupts to do the job and for the latter, the KERNAL already provides routines to read the keyboard for application use.

Re: Interrupt handling Tutorial

Posted: Tue Jun 20, 2023 8:57 am
by MartinC
Thanks Mike, I'll take a look at that. I'm emulating a peripheral, that's why I wanted to explore this approach.

Re: Interrupt handling Tutorial

Posted: Mon Aug 07, 2023 1:21 am
by srowe
For my own satisfaction (because I can never remember what happens where) I've written a short guide to how interrupts work on the VIC-20 & C64.

https://eden.mose.org.uk/download/Commo ... rrupts.pdf

Re: Interrupt handling Tutorial

Posted: Wed Aug 09, 2023 7:40 am
by chysn
srowe wrote: Mon Aug 07, 2023 1:21 am For my own satisfaction (because I can never remember what happens where) I've written a short guide to how interrupts work on the VIC-20 & C64.

https://eden.mose.org.uk/download/Commo ... rrupts.pdf
It's nice to have everything in one place, thanks!

BRK increments PC by 2 bytes, not 1 as stated in the Software Interrupts section.

Re: Interrupt handling Tutorial

Posted: Wed Aug 09, 2023 8:48 am
by srowe
chysn wrote: Wed Aug 09, 2023 7:40 am It's nice to have everything in one place, thanks!

BRK increments PC by 2 bytes, not 1 as stated in the Software Interrupts section.
I meant to say that the PC is incremented 1 byte after the actual instruction but that isn't clear from the wording. I'll fix that.