aboutsummaryrefslogtreecommitdiff
path: root/src/bell.s
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-03-09 02:03:42 -0400
committerB. Watson <urchlay@slackware.uk>2026-03-09 02:03:42 -0400
commit9dba8f52b61b1d56d9cf8e63bd1dde2b31b25a5d (patch)
tree91b01698979cfeae507eb820cd5e7f3027043b41 /src/bell.s
parent7cada3864c10b14dec18a0efc768f3455004166b (diff)
downloadfujinet-chat-9dba8f52b61b1d56d9cf8e63bd1dde2b31b25a5d.tar.gz
audible and visual bell on hilite.
Diffstat (limited to 'src/bell.s')
-rw-r--r--src/bell.s45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/bell.s b/src/bell.s
new file mode 100644
index 0000000..6a27503
--- /dev/null
+++ b/src/bell.s
@@ -0,0 +1,45 @@
+
+ .include "atari.inc"
+
+ .import _bell_type
+ .export _bell
+
+DISTVOL = $a8
+PITCH = $40
+JIFFIES = $03
+
+_bell:
+ lda #<bell_callback
+ sta CDTMA2
+ lda #>bell_callback
+ sta CDTMA2+1
+ lda _bell_type
+ beq done
+ lda #JIFFIES
+ sta CDTMV2
+ lda _bell_type
+ and #1
+ beq check_flash
+ lda #DISTVOL
+ sta AUDC1
+ lda #PITCH
+ sta AUDF1
+check_flash:
+ lda _bell_type
+ and #2
+ beq done
+ lda #$08
+ sta COLOR4
+ lda #JIFFIES
+ sta CDTMV2
+done:
+ rts
+
+bell_callback:
+ lda #0
+ sta AUDC1
+ sta AUDF1
+ sta COLOR4
+ lda #JIFFIES
+ sta CDTMV2
+ rts