From 91683d1beea288c2608833ba6df241b6c81f5c3d Mon Sep 17 00:00:00 2001 From: Nihilazo Date: Sat, 19 Jun 2021 17:07:50 +0100 Subject: [PATCH] add free memory readout remove silly file --- main.tal | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/main.tal b/main.tal index 64332d6..18a1ad7 100644 --- a/main.tal +++ b/main.tal @@ -387,6 +387,15 @@ RTN &end RTN +@draw-free-mem ( draws amount of free memory ) + ;box .Screen/addr DEO2 + #20 .Screen/color DEO + .Screen/x DEI2 #0008 ADD2 .Screen/x DEO2 + #20 .Screen/color DEO ( clear the space to draw the number in by drawing boxes over it ) + .Screen/x DEI2 #0008 SUB2 .Screen/x DEO2 ( move back into position ) + #ffff ;pattern_pointer LDA2 SUB2 ( calculate free memory ) + SWP ;draw-byte JSR2 ;draw-byte JSR2 ( draw it ) +RTN @draw ;draw-playhead JSR2 #0000 .Screen/x DEO2 @@ -395,6 +404,7 @@ RTN .Draw/pattern-x LDZ2 .Screen/x DEO2 .Draw/pattern-y LDZ2 .Screen/y DEO2 .Edit/pattern-addr LDZ2 ;draw-pattern JSR2 + ;draw-free-mem JSR2 RTN @play-line ( addr ch ) ( plays the pattern line at addr on the channel ch ) @@ -457,6 +467,7 @@ BRK ] @line [ 1818 1818 1818 1818 ] ( 8 pixel vertical bar ) +@box [ ffff ffff ffff ffff ] ( filled box sprite ) @font ( specter8-frag font ) [ 0000 0000 0000 0000 0008 0808 0800 0800