fix a couple bugs
This commit is contained in:
parent
c7ce127aa4
commit
95e9b30810
16
term.tal
16
term.tal
|
@ -561,22 +561,25 @@
|
|||
|
||||
@exec-move-row ( c^ -> )
|
||||
POP
|
||||
#0001 read-arg-1 #0001 SUB2 ( row )
|
||||
#0001 read-arg-1 dec-floor ( row )
|
||||
.cur-x LDZ2 ( col )
|
||||
goto BRK
|
||||
|
||||
@exec-move-col ( c^ -> )
|
||||
POP
|
||||
.cur-y LDZ2 ( row )
|
||||
#0001 read-arg-2 #0001 SUB2 ( col )
|
||||
#0001 read-arg-2 dec-floor ( col )
|
||||
goto BRK
|
||||
|
||||
@exec-move ( c^ -> )
|
||||
POP
|
||||
#0001 read-arg-1 #0001 SUB2 ( row )
|
||||
#0001 read-arg-2 #0001 SUB2 ( col )
|
||||
#0001 read-arg-1 dec-floor ( row )
|
||||
#0001 read-arg-2 dec-floor ( col )
|
||||
goto BRK
|
||||
|
||||
@dec-floor ( x* -> x==0 ? 0* : x-1* )
|
||||
ORAk ?&sub JMP2r &sub #0001 SUB2 JMP2r
|
||||
|
||||
@debug-esc ( c^ -> )
|
||||
.debug LDZ ?&continue POP JMP2r &continue
|
||||
;scratch STH2
|
||||
|
@ -667,7 +670,7 @@
|
|||
POP BRK ( )
|
||||
|
||||
@read-cr ( 0d -> )
|
||||
POP clear-cursor #0000 .cur-x STZ2 BRK
|
||||
POP clear-cursor #0000 .cur-x STZ2 draw-cursor BRK
|
||||
|
||||
@at-max-y ( -> true? )
|
||||
.cur-y LDZ2 .max-y LDZ2 EQU2 JMP2r
|
||||
|
@ -677,7 +680,6 @@
|
|||
at-max-y ?scroll down BRK
|
||||
|
||||
@read-printable ( c -> )
|
||||
( DUP debug-read )
|
||||
.tint LDZ SWP DUP2 cur-addr STA2
|
||||
draw-cell
|
||||
forward BRK
|
||||
|
@ -733,7 +735,7 @@
|
|||
cur-addr STA2 JMP2r ( )
|
||||
|
||||
@forward-n-tabs ( n* -> )
|
||||
#0001 SUB2 #0008 MUL2 ( i=(n-1)8* )
|
||||
dec-floor #0008 MUL2 ( i=(n-1)8* )
|
||||
#0008 .cur-x LDZ2 #0007 AND2 SUB2 ( i* 8-cur%8* )
|
||||
ADD2 !forward-n ( )
|
||||
|
||||
|
|
Loading…
Reference in New Issue