VE: avoid spitting control chars in "bufp"
On a TRS-80 4P, spitting control chars, in addition to being visually distasteful, generated a bug where the blinking cursor would disappear, making using VE much, much harder. I had a hard time reproducing the bug: you don't trigger it by simply spitting control chars, it had to be a specific number of them in a specific order. I didn't identify the sequence, but I know that "bufp" triggered it. This commit was written on a TRS-80 4P and downloaded from my work floppies!
This commit is contained in:
parent
8992cdbbf6
commit
625afba86a
7
blk.fs
7
blk.fs
@ -804,12 +804,12 @@ CREATE PREVPOS 0 , CREATE PREVBLK 0 , CREATE xoff 0 ,
|
|||||||
BLKDTY @ IF '*' EMIT THEN 4 nspcs ;
|
BLKDTY @ IF '*' EMIT THEN 4 nspcs ;
|
||||||
: nums 17 1 DO 2 I + aty I . SPC SPC LOOP ;
|
: nums 17 1 DO 2 I + aty I . SPC SPC LOOP ;
|
||||||
( ----- 127 )
|
( ----- 127 )
|
||||||
: mode! ( c -- ) 4 col- CELL! ;
|
: mode! ( c -- ) 4 col- CELL! ; : @emit C@ 0x20 MAX EMIT ;
|
||||||
: contents
|
: contents
|
||||||
16 0 DO
|
16 0 DO
|
||||||
large? IF 3 ELSE 0 THEN I 3 + AT-XY
|
large? IF 3 ELSE 0 THEN I 3 + AT-XY
|
||||||
64 I * BLK( + ( lineaddr ) xoff @ + DUP width + SWAP
|
64 I * BLK( + ( lineaddr ) xoff @ + DUP width + SWAP
|
||||||
DO I C@ 0x20 MAX EMIT LOOP LOOP
|
DO I @emit LOOP LOOP
|
||||||
large? IF 3 16 gutter THEN ;
|
large? IF 3 16 gutter THEN ;
|
||||||
: selblk BLK> @ PREVBLK ! BLK@ contents ;
|
: selblk BLK> @ PREVBLK ! BLK@ contents ;
|
||||||
: pos! ( newpos -- ) EDPOS @ PREVPOS !
|
: pos! ( newpos -- ) EDPOS @ PREVPOS !
|
||||||
@ -877,7 +877,7 @@ CREATE PREVPOS 0 , CREATE PREVBLK 0 , CREATE xoff 0 ,
|
|||||||
DUP CMD 2+ C! CMD FIND IF EXECUTE ELSE DROP THEN
|
DUP CMD 2+ C! CMD FIND IF EXECUTE ELSE DROP THEN
|
||||||
0 ACC ! UPPER 'Q' = ;
|
0 ACC ! UPPER 'Q' = ;
|
||||||
: bufp ( buf -- )
|
: bufp ( buf -- )
|
||||||
DUP 3 col- + SWAP DO I C@ EMIT LOOP ;
|
DUP 3 col- + SWAP DO I @emit LOOP ;
|
||||||
: bufs
|
: bufs
|
||||||
1 aty ." I: " IBUF bufp
|
1 aty ." I: " IBUF bufp
|
||||||
2 aty ." F: " FBUF bufp
|
2 aty ." F: " FBUF bufp
|
||||||
@ -1053,7 +1053,6 @@ CREATE tickfactor 44 ,
|
|||||||
override. )
|
override. )
|
||||||
: LD(HL)E*, SYSVARS 0x3e + LDA(i), A ORr,
|
: LD(HL)E*, SYSVARS 0x3e + LDA(i), A ORr,
|
||||||
IFZ, (HL) E LDrr, ELSE, SYSVARS 0x3e + CALL, THEN, ;
|
IFZ, (HL) E LDrr, ELSE, SYSVARS 0x3e + CALL, THEN, ;
|
||||||
|
|
||||||
( ----- 283 )
|
( ----- 283 )
|
||||||
H@ ORG ! ( STABLE ABI )
|
H@ ORG ! ( STABLE ABI )
|
||||||
0 JP, ( 00, main ) NOP, ( unused ) NOP, NOP, ( 04, BOOT )
|
0 JP, ( 00, main ) NOP, ( unused ) NOP, NOP, ( 04, BOOT )
|
||||||
|
Loading…
Reference in New Issue
Block a user