Sound producing keyboard in just two lines of BASIC on the Commodore 64
Commodore 64 & 6510 retro-programming Commodore 64 & 6510 retro-programming
629 subscribers
1,226 views
35

 Published On Jun 26, 2024

A BASIC two-liner on the Commodore 64, which enables a sound each time you press a key on the keyboard. Written in BASIC, the two lines store values in the memory and creates an IRQ driven routine.

The result is rather disappointing but the interesting thing about this two-liner is the process used through the instruction PRINT to write a short routine in machine language at $C031/49201. The screen RAM is indeed used to store values, which are 6502's opcodes modifying the values in the SID registers and the vector pointing to the interrupt handler $314/$315. This is something that might be obvious for experienced programmers, but not so much for beginners

#c64
#basic
#6502
#commodore64

show more

Share/Embed