more progress

This commit is contained in:
~d6 2023-01-23 14:48:29 -05:00
parent 6128d558cd
commit 7c14b78e6d
2 changed files with 24 additions and 13 deletions

View File

@ -157,6 +157,18 @@
#30 SUB JMP2r
&letter #57 SUB JMP2r
@negate ( num$ -> negated$ )
DUP2 #7fff ;negate-short JCN2
@negate-short ( n$ -> negated$ )
DUP2 #c000 EQU ,&need-alloc JCN ( n$ )
#7fff EOR2 INC2 JMP2r ( (n^7fff)+1 )
&need-alloc #c000 ;u16-to-num JMP2 ( -16384 )
@negate-long ( n$ -> negated$ )
@negate-big ( n$ -> negated$ )
@lshift-16 ( num$ -> res$ )
#0000 ;shift-and-add JMP2

View File

@ -208,14 +208,17 @@
@exec-erase-line
POP #0000 ;read-arg-1 JSR2
DUP2 #0000 ,&erase-to-end JCN
DUP2 #0001 ,&erase-from-start JCN
;bol-addr JSR2 ;eol-addr JSR2 ;erase JSR2 BRK
DUP2 #0000 EQU2 ,&erase-to-end JCN
DUP2 #0001 EQU2 ,&erase-from-start JCN
DUP2 #0002 EQU2 ,&erase-full JCN
POP2 BRK
( #010f DEO BRK ( FIXME ) )
&erase-full
POP2 ;bol-addr JSR2 ;eol-addr JSR2 ;erase JSR2 BRK
&erase-to-end
;cur-addr JSR2 INC2 ;eol-addr JSR2 ;erase JSR2 BRK
POP2 ;cur-addr JSR2 INC2 ;eol-addr JSR2 ;erase JSR2 BRK
&erase-from-start
;bol-addr JSR2 ;cur-addr JSR2 INC2 ;erase JSR2 BRK
POP2 ;bol-addr JSR2 ;cur-addr JSR2 INC2 ;erase JSR2 BRK
( TODO: needs to be smarter -- need to redraw tiles and keep x/y coords )
@ -225,7 +228,9 @@
&loop
STAk INC2r
STH2kr ORA ,&loop JCN
POP2r POP2 POP JMP2r
POP2r POP2 POP
#01 .dirty? STZ ( FIXME )
JMP2r
@exec-move ( c^ -> )
POP LIT2r ffff
@ -321,9 +326,6 @@
&zero POP2 POP2 #0000
&done .cur-x STZ2 ;show-cursor JMP2
( @back ( -> )
#0001 ,back-n JMP )
@up-n ( n* -> )
;hide-cursor JSR2
.cur-y LDZ2 GTH2k ,&zero JCN
@ -331,9 +333,6 @@
&zero POP2 POP2 #0000
&done .cur-y STZ2 ;show-cursor JMP2
( @up ( -> )
#0001 ,up-n JMP )
@down-n ( n* -> )
;hide-cursor JSR2
.cur-y LDZ2 ADD2 .max-y LDZ2 ;min JSR2 .cur-y STZ2