goto-end + bugfix
This commit is contained in:
parent
652dac7830
commit
233e8b07f2
17
femto.tal
17
femto.tal
|
@ -280,7 +280,16 @@
|
||||||
@escape ( -> )
|
@escape ( -> )
|
||||||
#01 ;saw-esc STA BRK
|
#01 ;saw-esc STA BRK
|
||||||
|
|
||||||
@goto-end ( FIXME )
|
( TODO: small buffers )
|
||||||
|
@goto-end ( -> )
|
||||||
|
;buffer/line-count LDA2 ;term/rows LDA2 ( #00 #00 DIV ) SUB2
|
||||||
|
DUP2 ;buffer/line-offset STA2
|
||||||
|
;abs-line JSR2 ;buffer/offset STA2
|
||||||
|
height #01 SUB ;cursor/row STA
|
||||||
|
;cur-len JSR2 NIP ;cursor/col STA
|
||||||
|
;draw-all JSR2
|
||||||
|
BRK
|
||||||
|
|
||||||
@goto-start ( -> )
|
@goto-start ( -> )
|
||||||
;buffer/data ;buffer/offset STA2
|
;buffer/data ;buffer/offset STA2
|
||||||
#0000 ;buffer/line-offset STA2
|
#0000 ;buffer/line-offset STA2
|
||||||
|
@ -386,9 +395,9 @@
|
||||||
;messages/lines ;print JSR2
|
;messages/lines ;print JSR2
|
||||||
#20 emit
|
#20 emit
|
||||||
LIT '( emit
|
LIT '( emit
|
||||||
;cursor/col LDA ;emit-dec JSR2
|
;cursor/col LDA INC ;emit-dec JSR2
|
||||||
LIT ', emit
|
LIT ', emit
|
||||||
;cur-abs-row JSR2 ;emit-dec2 JSR2
|
;cur-abs-row JSR2 INC2 ;emit-dec2 JSR2
|
||||||
LIT ') emit
|
LIT ') emit
|
||||||
|
|
||||||
ansi LIT '0 emit LIT 'm emit
|
ansi LIT '0 emit LIT 'm emit
|
||||||
|
@ -441,7 +450,7 @@
|
||||||
|
|
||||||
@abs-line ( y* -> s* )
|
@abs-line ( y* -> s* )
|
||||||
#0000 SWP2 SUB2 STH2 ( [-y] )
|
#0000 SWP2 SUB2 STH2 ( [-y] )
|
||||||
;buffer/data LDA2 ( addr )
|
;buffer/data ( addr )
|
||||||
&newline ( addr [-y] )
|
&newline ( addr [-y] )
|
||||||
STH2kr ORA ,&loop JCN ,&done JMP
|
STH2kr ORA ,&loop JCN ,&done JMP
|
||||||
&loop ( addr [-y] )
|
&loop ( addr [-y] )
|
||||||
|
|
Loading…
Reference in New Issue