From 4be183387c96547cfa8277892b36c9205db10f7a Mon Sep 17 00:00:00 2001 From: Nihilazo Date: Sat, 15 May 2021 13:42:57 +0100 Subject: [PATCH] display octaves --- main.usm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.usm b/main.usm index f604701..e4bba97 100644 --- a/main.usm +++ b/main.usm @@ -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