Handle linebreaks

This commit is contained in:
Devine Lu Linvega 2023-04-26 15:53:03 -07:00
parent 95345d5941
commit 712ea57e81
1 changed files with 17 additions and 4 deletions

View File

@ -293,11 +293,14 @@ JMP2r
#0018 .Screen/y DEO2
;mem
&while
LDAk #0a NEQ ?&no-lb
draw-linebreak
INC2 LDAk walk-on AND ?&while JMP2r
&no-lb
( wrap )
LDAk #20 NEQ ?&no-wrap
DUP2 word-length .Screen/x DEI2 ADD2 #00d0 LTH2 ?&no-wrap
#0008 .Screen/x DEO2
.Screen/y DEI2k #0010 ADD2 ROT DEO2
draw-linebreak
INC2 LDAk walk-on AND ?&while JMP2r
&no-wrap
LDAk #20 SUB #00 SWP ;font ADD2 LDA #00 SWP .Screen/x DEI2 ADD2
@ -383,11 +386,14 @@ JMP2r
#15 .Screen/auto DEO
&while
LDAk #0a NEQ ?&no-lb
draw-linebreak
INC2 LDAk walk-on AND ?&while JMP2r
&no-lb
( wrap )
LDAk #20 NEQ ?&no-wrap
DUP2 word-length .Screen/x DEI2 ADD2 #00d0 LTH2 ?&no-wrap
#0008 .Screen/x DEO2
.Screen/y DEI2k #0010 ADD2 ROT DEO2
draw-linebreak
INC2 LDAk ?&while
&no-wrap
@ -440,6 +446,13 @@ JMP2r
JMP2r
@draw-linebreak ( -- )
#0008 .Screen/x DEO2
.Screen/y DEI2k #0010 ADD2 ROT DEO2
JMP2r
@is-selected ( addr* -- f )
DUP2 .selection/from LDZ2 LTH2 ?&false