default values a bit saner

This commit is contained in:
Nico 2021-05-31 18:08:00 +01:00
parent 31e04e1665
commit a12ec03aca
1 changed files with 19 additions and 0 deletions

View File

@ -140,6 +140,21 @@ RTN
&end
RTN
@set-initial-value ( sets the initial value for the currently selected pattern item. )
.Edit/selection-x LDZ
DUP #00 EQU ,&note JCN
DUP #01 EQU ,&inst JCN
DUP #02 EQU ,&vol JCN
&note
#48 ,&store JMP
&inst
#01 ,&store JMP
&vol
#88
&store
;get-selected-addr JSR2 STA
RTN
@handle-editing ( key -- )
DUP #2b EQU ,&plus JCN
DUP #2d EQU ,&minus JCN
@ -149,9 +164,13 @@ RTN
&plus
POP ( pop the key )
#00 .Edit/selection-x LDZ EQU ;get-selected-addr JSR2 LDA #6c EQU AND ,&end JCN ( if we're on a note and out of bounds, skip moving )
;get-selected-addr JSR2 LDA #00 EQU ,&initial JCN
;get-selected-addr JSR2 DUP2 STH2 ( stash selection address and keep another copy on the stack )
LDA #01 ADD STH2r STA
RTN
&initial
;set-initial-value JSR2
RTN
&minus
POP
#00 .Edit/selection-x LDZ EQU ;get-selected-addr JSR2 LDA #0c EQU AND ,&end JCN ( if we're on a note and out of bounds, skip moving )