From b32110419896f4d8d3db8d5bebdd2d869c5a54ea Mon Sep 17 00:00:00 2001 From: Nihilazo Date: Sat, 15 May 2021 15:48:38 +0100 Subject: [PATCH] draw note stops properly --- main.usm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/main.usm b/main.usm index 6d9a6c9..b3a2eab 100644 --- a/main.usm +++ b/main.usm @@ -171,6 +171,14 @@ 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 ) + DUP #6c LTH ,¬e JCN ( if note is in range, draw note, otherwise continue to draw a rest ) + #3b ;draw-char JSR2 + #00 ;draw-char JSR2 + #3d ;draw-char JSR2 ( draws "[ ]" ) + POPr ( remove octave from returnstack ) + POP + RTN + ¬e #0c MOD #00 SWP ;notes ADD2 LDA DUP #7f AND ;draw-char JSR2 #80 AND ,&else JCN ( if the high bit is unset ) #00 ;draw-char JSR2 ( draw a space ) @@ -329,7 +337,7 @@ RTN 52 00 20 53 00 66 54 00 66 - 55 00 66 + ff 00 66 56 00 ff 57 00 66 ]