diff --git a/src/basic.syn b/src/basic.syn index 2bddded..111bb5f 100644 --- a/src/basic.syn +++ b/src/basic.syn @@ -64,8 +64,6 @@ TOKENS { TOK_DIM, TOK_USHL # Strings TOK_COPY_STR, TOK_VAL, TOK_CMP_STR, TOK_INT_STR, TOK_STR_IDX, TOK_CAT_STR, TOK_CHR - # Sound off - could be implemented as simple POKE expressions, but it's shorter this way - TOK_SOUND_OFF TOK_PAUSE # USR, calls ML routinr TOK_USR_ADDR, TOK_USR_PARAM, TOK_USR_CALL @@ -435,7 +433,7 @@ SOUND: emit { TOK_SHL8, TOK_ADD, TOK_DPOKE, TOK_0, TOK_NUM_POKE, &AUDCTL, \ TOK_BYTE, 3, TOK_NUM_POKE, &SKCTL } SOUND_S1 emit { TOK_0, TOK_DPOKE } - emit TOK_SOUND_OFF + emit { TOK_NUM, &SOUND_OFF, TOK_USR_ADDR, TOK_USR_CALL } SOUND_S1: EXPR emit { TOK_USHL, TOK_PUSH_NUM, &AUDF1, TOK_ADD, TOK_SADDR } diff --git a/src/interp/soundoff.asm b/src/interp/soundoff.asm index 87d7b96..954eee3 100644 --- a/src/interp/soundoff.asm +++ b/src/interp/soundoff.asm @@ -27,21 +27,14 @@ ; Silence all sound channels (SOUND without parameters) ; ----------------------------------------------------- - .export sound_off + .export SOUND_OFF .importzp next_instruction .include "atari.inc" .segment "RUNTIME" -.proc EXE_SOUND_OFF - pha - jsr sound_off - pla - jmp next_instruction -.endproc - -.proc sound_off +.proc SOUND_OFF ldy #7 lda #0 : sta AUDF1, y @@ -50,7 +43,4 @@ rts .endproc - .include "../deftok.inc" - deftoken "SOUND_OFF" - ; vi:syntax=asm_ca65 diff --git a/src/interpreter.asm b/src/interpreter.asm index ea5d3f4..c6a321d 100644 --- a/src/interpreter.asm +++ b/src/interpreter.asm @@ -41,7 +41,7 @@ .import __JUMPTAB_RUN__ ; From soundoff.asm - .import sound_off + .import SOUND_OFF .include "atari.inc" @@ -144,7 +144,7 @@ interpreter_cptr = cptr .endif ; FASTBASIC_FP ; Sound off - jsr sound_off + jsr SOUND_OFF ; Store current stack position to rewind on error tsx diff --git a/src/parse.asm b/src/parse.asm index 8b10dae..bae2527 100644 --- a/src/parse.asm +++ b/src/parse.asm @@ -41,6 +41,8 @@ ; From interpreter.asm .importzp DEGFLAG, DEGFLAG_DEG, DEGFLAG_RAD .import EXE_END, saved_cpu_stack, PMGMODE, PMGBASE + ; Interpreted commands + .import SOUND_OFF ; From errors.asm .import error_msg_list .importzp ERR_PARSE, ERR_NO_ELOOP, ERR_LABEL, ERR_TOO_LONG