Interrupt handling Tutorial

Basic and Machine Language

Moderator: Moderators

Post Reply
MartinC
Vic 20 Drifter
Posts: 33
Joined: Tue Oct 25, 2022 12:18 pm
Website: https://winterfam.co.uk
Location: Kent,uk
Occupation: Author

Interrupt handling Tutorial

Post 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
User avatar
D-Type
Vic 20 Drifter
Posts: 23
Joined: Sun Jul 05, 2020 4:07 am
Location: Zurich, Switzerland

Re: Interrupt handling Tutorial

Post by D-Type »

Post deleted
Last edited by D-Type on Tue Jun 20, 2023 9:58 am, edited 1 time in total.
P*h*i*l*l*i*p EEaattoon in real life
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Interrupt handling Tutorial

Post 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.
MartinC
Vic 20 Drifter
Posts: 33
Joined: Tue Oct 25, 2022 12:18 pm
Website: https://winterfam.co.uk
Location: Kent,uk
Occupation: Author

Re: Interrupt handling Tutorial

Post 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.
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: Interrupt handling Tutorial

Post 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
User avatar
chysn
Vic 20 Scientist
Posts: 1205
Joined: Tue Oct 22, 2019 12:36 pm
Website: http://www.beigemaze.com
Location: Michigan, USA
Occupation: Software Dev Manager

Re: Interrupt handling Tutorial

Post 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.
User avatar
srowe
Vic 20 Scientist
Posts: 1340
Joined: Mon Jun 16, 2014 3:19 pm

Re: Interrupt handling Tutorial

Post 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.
Post Reply