1
0
mirror of https://github.com/cc65/cc65.git synced 2024-10-31 04:04:49 +00:00
cc65/libsrc/creativision/psg.s

31 lines
520 B
ArmAsm
Raw Normal View History

; void __fastcall__ psg_outb (unsigned char b);
; void __fastcall__ psg_delay (unsigned char b);
; void psg_silence (void);
2013-12-05 11:40:44 +00:00
.export _psg_outb, _psg_silence, _psg_delay
2017-02-01 18:46:04 +00:00
.include "creativision.inc"
;* Let BIOS output the value.
_psg_outb := BIOS_POKE_PSG
2013-12-05 11:40:44 +00:00
2017-02-01 18:46:04 +00:00
_psg_silence := BIOS_QUIET_PSG
2017-02-01 18:46:04 +00:00
2013-12-05 11:40:44 +00:00
_psg_delay:
2017-02-01 18:46:04 +00:00
tay
l1: lda #200
l2: sbc #1
bne l2
2017-02-01 18:46:04 +00:00
lda #200
l3: sbc #1
bne l3
2017-02-01 18:46:04 +00:00
dey
bne l1
2017-02-01 18:46:04 +00:00
rts