mirror of
https://github.com/mgcaret/rom4x.git
synced 2024-12-22 03:29:18 +00:00
22 lines
708 B
ArmAsm
22 lines
708 B
ArmAsm
; Hijack the BELL1 monitor routine to do our bidding.
|
|
; BELL1 implements the beep sound heard on reset or
|
|
; Ctrl-G, etc. It starts with
|
|
; LDA #$40
|
|
; JSR WAIT ; delay .1 sec
|
|
; followed by code to actually beep the speaker
|
|
; In our case, BELL1 always loads the accumulator with
|
|
; a fixed number, and executes a 3-byte instruction
|
|
; Well, it turns out that to switch banks we need
|
|
; 3 bytes, and as luck would have it the other bank
|
|
; is empty here.
|
|
; So the routine on the other side is the ROM 5X
|
|
; dispatcher. It will take what is in the accumulator
|
|
; and use that to determine the next action.
|
|
; Obviously, $40 should beep the speaker, anything
|
|
; else can do whatever we want.
|
|
|
|
.text
|
|
* = $fbdf
|
|
sta $c028
|
|
|