display octaves

This commit is contained in:
Nico 2021-05-15 13:42:57 +01:00
parent 0479f0f396
commit 4be183387c
1 changed files with 3 additions and 1 deletions

View File

@ -162,13 +162,15 @@ RTN
( draw-note draws a byte as a note name and number on the screen )
@draw-note ( byte )
DUP #0c DIV #01 SUB STH ( stash octave )
#0c MOD #00 SWP ;notes ADD2 LDA DUP #7f AND ;draw-char JSR2
#80 AND ,&else JCN ( if the high bit is unset )
#0d ;draw-char JSR2 ( draw a dash )
#00 ;draw-char JSR2 ( draw a space )
,&then JMP
&else
#03 ;draw-char JSR2 ( otherwise draw a # )
&then
STHr ;draw-nibble JSR2 ( unstash and draw octave number )
RTN