mirror of
https://github.com/cc65/cc65.git
synced 2026-04-25 22:18:27 +00:00
Add beep for apple2
This commit is contained in:
committed by
Oliver Schmidt
parent
6c7106c9d9
commit
2ba176372e
@@ -0,0 +1,20 @@
|
||||
;
|
||||
; Colin Leroy-Mira, 2024
|
||||
;
|
||||
; void beep(void)
|
||||
;
|
||||
|
||||
.export _beep
|
||||
.import BELL
|
||||
|
||||
.include "apple2.inc"
|
||||
|
||||
.segment "LOWCODE"
|
||||
|
||||
_beep:
|
||||
lda CH ; Bell scrambles CH in 80col mode on IIgs, storing
|
||||
pha ; it in OURCH and resetting CH to 0. Save it.
|
||||
jsr BELL
|
||||
pla
|
||||
sta CH ; Restore CH
|
||||
rts
|
||||
@@ -0,0 +1,20 @@
|
||||
;
|
||||
; Colin Leroy-Mira, 2024
|
||||
;
|
||||
; BELL routine
|
||||
;
|
||||
|
||||
.export BELL
|
||||
|
||||
.include "apple2.inc"
|
||||
|
||||
.segment "LOWCODE"
|
||||
|
||||
BELL:
|
||||
; Switch in ROM and call BELL
|
||||
bit $C082
|
||||
jsr $FF3A ; BELL
|
||||
|
||||
; Switch in LC bank 2 for R/O and return
|
||||
bit $C080
|
||||
rts
|
||||
Reference in New Issue
Block a user