From cb042ee2fb574c77f9ff9f83f55af3d049aa644a Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 25 Aug 2024 19:12:10 -0700 Subject: [PATCH] (m291) Optimized message object --- gui/m291/src/assets.tal | 2 +- gui/m291/src/m291.tal | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gui/m291/src/assets.tal b/gui/m291/src/assets.tal index 9eebc8e..25cd596 100644 --- a/gui/m291/src/assets.tal +++ b/gui/m291/src/assets.tal @@ -354,5 +354,5 @@ &roms $200 &misc $200 -@message &buf $200 &pos $2 +@message &buf $200 diff --git a/gui/m291/src/m291.tal b/gui/m291/src/m291.tal index 5a5ac1c..4402147 100644 --- a/gui/m291/src/m291.tal +++ b/gui/m291/src/m291.tal @@ -38,8 +38,8 @@ ( | play something ) message/ ;dict/mpg-cmd .Console/addr DEO2 - #03 .Console/mode DEO - #01 .Console/exec DEO + [ LIT2 03 -Console/mode ] DEO + [ LIT2 01 -Console/exec ] DEO BRK @meta $1 @@ -106,9 +106,9 @@ @|message ) @message/ ( -- ) - #0000 ;message/pos LDA2 STA2 + #00 / ( | parse line ) - ;message/buf LDAk [ LIT "@ ] EQU ?{ POP2 JMP2r } + ;&buf LDAk [ LIT "@ ] EQU ?{ POP2 JMP2r } ( INC2k LDA LIT "F EQU ?on-frame | INC2k LDA LIT "H EQU ?on-help | INC2k LDA LIT "I EQU ?on-id3 @@ -120,12 +120,12 @@ ( >> ) @message/ ( -- ) - ( reset ) ;message/buf ;message/pos STA2 + ( reset ) ;&buf ,&ptr STR2 JMP2r @message/ ( c -- ) - POP ;message/pos LDA2k STH2k .Console/read DEI STH2r STA - INC2 SWP2 STA2 + [ LIT2 &ptr =&buf ] INC2k ,&ptr STR2 + STA JMP2r (