fix some bugs
This commit is contained in:
parent
7fce584588
commit
ed20ad7865
19
femto.tal
19
femto.tal
|
@ -440,6 +440,7 @@
|
||||||
&noop JMP2r
|
&noop JMP2r
|
||||||
|
|
||||||
@refresh
|
@refresh
|
||||||
|
;rel-line-error ;error! JMP2 ( FIXME )
|
||||||
;draw-all JSR2 BRK
|
;draw-all JSR2 BRK
|
||||||
|
|
||||||
@debug
|
@debug
|
||||||
|
@ -522,6 +523,9 @@
|
||||||
|
|
||||||
@draw-cursor ( -> )
|
@draw-cursor ( -> )
|
||||||
;cur-w-col JSR2 .term/lmargin LDZ2 ADD2
|
;cur-w-col JSR2 .term/lmargin LDZ2 ADD2
|
||||||
|
DUP2 .term/cols LDZ2 LTH2 ,&ok JCN
|
||||||
|
( TODO: handle long line here )
|
||||||
|
&ok
|
||||||
;cur-rel-row JSR2
|
;cur-rel-row JSR2
|
||||||
;term-move-cursor JMP2
|
;term-move-cursor JMP2
|
||||||
|
|
||||||
|
@ -546,7 +550,7 @@
|
||||||
;messages/lines ;print JSR2
|
;messages/lines ;print JSR2
|
||||||
#20 emit
|
#20 emit
|
||||||
LIT '( emit
|
LIT '( emit
|
||||||
;cur-col JSR2 INC ;emit-dec JSR2
|
;cur-col JSR2 INC2 ;emit-dec2 JSR2
|
||||||
LIT ', emit
|
LIT ', emit
|
||||||
;cur-abs-row JSR2 INC2 ;emit-dec2 JSR2
|
;cur-abs-row JSR2 INC2 ;emit-dec2 JSR2
|
||||||
LIT ') emit
|
LIT ') emit
|
||||||
|
@ -586,9 +590,6 @@
|
||||||
&bol
|
&bol
|
||||||
ADD2kr STH2r ;draw-linenum JSR2
|
ADD2kr STH2r ;draw-linenum JSR2
|
||||||
.term/lmargin LDZ2 INC2 ,&x STR2
|
.term/lmargin LDZ2 INC2 ,&x STR2
|
||||||
( TODO: use this for cursor-line highlighting and long line support )
|
|
||||||
( STH2kr .cursor/row LDZ2 INC2 NEQ2 ,&loop JCN
|
|
||||||
;emit-color-reverse JSR2 )
|
|
||||||
&loop ( offset [k line-offset] )
|
&loop ( offset [k line-offset] )
|
||||||
LDAk #00 EQU ,&eof JCN
|
LDAk #00 EQU ,&eof JCN
|
||||||
LDAk #0a EQU ,&eol JCN
|
LDAk #0a EQU ,&eol JCN
|
||||||
|
@ -597,14 +598,14 @@
|
||||||
GTH2 ,&skip JCN
|
GTH2 ,&skip JCN
|
||||||
;emit-red-dollar JSR2 ,&x LDR2 INC2 ,&x STR2
|
;emit-red-dollar JSR2 ,&x LDR2 INC2 ,&x STR2
|
||||||
&skip INC2
|
&skip INC2
|
||||||
,&loop JMP
|
,&loop JMP
|
||||||
&ok POP2 POP2
|
&ok POP2 POP2
|
||||||
LDAk #09 EQU ,&do-tab JCN
|
LDAk #09 EQU ,&do-tab JCN
|
||||||
LDAk emit INC2 ,&x LDR2 INC2 ,&x STR2
|
LDAk emit INC2 ,&x LDR2 INC2 ,&x STR2
|
||||||
,&loop JMP
|
,&loop JMP
|
||||||
&eol INC2r
|
&eol INC2r
|
||||||
STH2kr .term/rows LDZ2 GTH2 ,&done JCN
|
STH2kr .term/rows LDZ2 GTH2 ,&done JCN
|
||||||
cr nl INC2 ,&bol JMP
|
cr nl INC2 ,&bol JMP
|
||||||
&do-tab ;emit-tab JSR2 INC2
|
&do-tab ;emit-tab JSR2 INC2
|
||||||
.config/tab-width LDZ2 ,&x LDR2 ADD2 ,&x STR2
|
.config/tab-width LDZ2 ,&x LDR2 ADD2 ,&x STR2
|
||||||
,&loop JMP
|
,&loop JMP
|
||||||
|
@ -759,10 +760,10 @@
|
||||||
JMP2r
|
JMP2r
|
||||||
|
|
||||||
@inc-row ( -> )
|
@inc-row ( -> )
|
||||||
.cursor/row LDZ2k INC2 SWP2 STA2 JMP2r
|
.cursor/row LDZ2 INC2 .cursor/row STZ2 JMP2r
|
||||||
|
|
||||||
@dec-row ( -> )
|
@dec-row ( -> )
|
||||||
.cursor/row LDZ2k #0001 SUB2 SWP2 STA2
|
.cursor/row LDZ2 #0001 SUB2 .cursor/row STZ2 JMP2r
|
||||||
|
|
||||||
@last-pos ( -> addr* )
|
@last-pos ( -> addr* )
|
||||||
.buffer/limit LDZ2 #0001 SUB2 JMP2r
|
.buffer/limit LDZ2 #0001 SUB2 JMP2r
|
||||||
|
|
Loading…
Reference in New Issue