From c0f9dc2b8e3a0f90d7b7eba2bfa72777c6d788b0 Mon Sep 17 00:00:00 2001 From: neauoire Date: Sat, 22 Oct 2022 17:13:51 -0700 Subject: [PATCH] Removed ptr to last line --- src/basic.tal | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/basic.tal b/src/basic.tal index 3fa5991..f783a54 100644 --- a/src/basic.tal +++ b/src/basic.tal @@ -14,7 +14,6 @@ @cursor &x $2 &y $2 @variables $34 ( 26 * 2 ) @interrupt $2 ( ptr to resume ) - @last $2 ( ptr to last line ) @queue-ptr $1 @queue-mem $10 @stack-ptr $1 @stack-mem $20 @pen-ptr $1 @pen-mem $10 @@ -138,7 +137,7 @@ JMP2r ;walk-statement JSR2 ,&statement STR ;walk-blank JSR2 DUP2 ,&body STR2 - ;slen JSR2 #0006 ADD2 .last LDZ2 ADD2 + ;slen JSR2 #0006 ADD2 ,&addr LDR2 ADD2 DUP2 ,&link STR2 ,&next STR2 @@ -146,15 +145,15 @@ JMP2r ,&id LDR2 ;find-line-to JSR2 DUP2 #ffff EQU2 ,&no-replace JCN ( this->to ) LDA2k LDA2 ,&link STR2 - ( from->this ) .last LDZ2 OVR2 STA2 + ( from->this ) ,&addr LDR2 OVR2 STA2 &no-replace POP2 ( TODO:insertion ) LIT "> #18 DEO - .last LDZ2 ;phex JSR2 #0a18 DEO + ,&addr LDR2 ;phex JSR2 #0a18 DEO - .last LDZ2 ;phex JSR2 #2018 DEO + ,&addr LDR2 ;phex JSR2 #2018 DEO LIT "/ #18 DEO ,&addr LDR2 ;phex JSR2 #0a18 DEO [ LIT2r &addr :mem/prg ] @@ -163,9 +162,7 @@ JMP2r [ LIT2 &id $2 ] STH2kr STA2 INC2r INC2r [ LIT &statement $1 ] STH2kr STA INC2r [ LIT2 &body $2 ] STH2r ;scpy JSR2 - [ LIT2 &next $2 ] - DUP2 .last STZ2 - ,&addr STR2 + [ LIT2 &next $2 ] ,&addr STR2 JMP2r @@ -433,8 +430,8 @@ JMP2r @clear-program ( -- ) ;mem/prg - DUP2 .last LDZ2 ;mem/prg SUB2 ;mclr JSR2 - .last STZ2 + DUP2 ;store-line/addr LDA2 ;mem/prg SUB2 ;mclr JSR2 + ;store-line/addr STA2 ;mem/prg ;mem/root STA2 ;variables #0034 ;mclr JSR2 @@ -796,7 +793,7 @@ JMP2 @do-make ( str* -- ) ;require-file JSR2 .File/name DEO2 - .last LDZ2 #0100 SUB2 .File/length DEO2 + ;store-line/addr LDA2 #0100 SUB2 .File/length DEO2 #0100 .File/write DEO2 ;draw-ready ( .. ) @@ -878,7 +875,7 @@ JMP2 @draw-welcome ( -- ) - ;mem/prg .last STZ2 + ;mem/prg ;store-line/addr STA2 ;dict/varvara ;draw-str JSR2 ;draw-lb JSR2 ;draw-lb JSR2 ;dict/ram ;draw-str JSR2 -- 2.45.2