Keyboard input problem

All aspects of programming on the Commander X16.
Post Reply
flimbo72
Posts: 3
Joined: Fri Jan 27, 2023 5:38 pm

Question Keyboard input problem

Post by flimbo72 »

Hello everyone.

I'm writing a program in assembly that requires recurrent inputs from the keyboard.
Having no idea of how to manage that directly, I used the GETIN function from the kernal and everything worked pretty well, so far.

But now I need to switch the IRQ trigger to a certain screen line, so I added this to my code:

Code: Select all

	; Make VERA generate IRQs at line 447

	LDA #$82
	STA $9F26	; IEN
	LDA #$BF
	STA $9F28	; IRQline
Result: GETIN doesn't work anymore.
No keyboard input seems to be considered.

Any idea of what's going on?
Is GETIN tied to VSYNC (line zero) IRQ trigger? If so, I wonder why...
I also tried to load IEN with $83 (which activates VSYNC IRQ as well), but nothing changes.
I'm puzzled. :? :cry:

Thanks for your help,
Giacomo
DragWx
Posts: 362
Joined: Tue Mar 07, 2023 9:07 pm

Re: Keyboard input problem

Post by DragWx »

Did you replace the IRQ handler with your own? If you did, you must make sure to call kbd_scan (FF9F) at least once before calling getin.
Post Reply