(m291) Optimized message object
This commit is contained in:
parent
d92740530d
commit
cb042ee2fb
|
@ -354,5 +354,5 @@
|
|||
&roms $200
|
||||
&misc $200
|
||||
|
||||
@message &buf $200 &pos $2
|
||||
@message &buf $200
|
||||
|
||||
|
|
|
@ -38,8 +38,8 @@
|
|||
( | play something )
|
||||
message/<new>
|
||||
;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/<parse> ( -- )
|
||||
#0000 ;message/pos LDA2 STA2
|
||||
#00 /<append>
|
||||
( | 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/<new> ( -- )
|
||||
( reset ) ;message/buf ;message/pos STA2
|
||||
( reset ) ;&buf ,&ptr STR2
|
||||
JMP2r
|
||||
|
||||
@message/<append> ( c -- )
|
||||
POP ;message/pos LDA2k STH2k .Console/read DEI STH2r STA
|
||||
INC2 SWP2 STA2
|
||||
[ LIT2 &ptr =&buf ] INC2k ,&ptr STR2
|
||||
STA
|
||||
JMP2r
|
||||
|
||||
(
|
||||
|
|
Loading…
Reference in New Issue