Interrupt Enable Register ($911e)

Basic and Machine Language

Moderator: Moderators

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

Interrupt Enable Register ($911e)

Post by chysn »

Based on my reading of Mapping the VIC, bit 7 of $911e specifies whether you're enabling or disabling the interrupt types.

For example,

Code: Select all

lda #%00000010 ; Disables RESTORE
sta $911e
...
lda #%10000010; Enables it again
sta $911e
So based on this, I would expect

Code: Select all

lda #%01000000
sta $911e
to disable the Timer 1 interrupt. I would expect the cursor to stop flashing with this interrupt disabled.

But it persists in flashing. Why? And what is the proper way to signal that I want to ignore that interrupt?
VIC-20 Projects: wAx Assembler, TRBo: Turtle RescueBot, Helix Colony, Sub Med, Trolley Problem, Dungeon of Dance, ZEPTOPOLIS, MIDI KERNAL, The Archivist, Ed for Prophet-5

WIP: MIDIcast BASIC extension

he/him/his
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Interrupt Enable Register ($911e)

Post by Mike »

The KERNAL IRQ (jiffy clock/cursor/keyboard) 'sits' on the VIA #2 Timer 1, so LDA #%01000000:STA $912E does what you want.
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 Enable Register ($911e)

Post by chysn »

Mike wrote: Wed Sep 15, 2021 8:18 am The KERNAL IRQ (jiffy clock/cursor/keyboard) 'sits' on the VIA #2 Timer 1, so LDA #%01000000:STA $912E does what you want.
Yes it does, wrong VIA. Thanks!
Last edited by chysn on Wed Sep 15, 2021 8:47 am, edited 1 time in total.
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 Enable Register ($911e)

Post by chysn »

Disabling the VIA#2 Timer 1 interrupt stopped my data reception from working, so I had to delve into why.

Interrupts coming into VIA#2 use the IRQ vector at $0314/5, while interrupts coming into VIA#1 use the NMI vector at $0318/9.

So my code was only working "accidentally" until now. It also explains the speed problems I had. I only gained speed when I bypassed the BIT $9124 at the end of the service routine.

This is all falling into place. I have to go back to the lab, but I think I understand what I need to do...
Post Reply