improve paste buffer

This commit is contained in:
~d6 2023-02-10 17:47:30 -05:00
parent c0d337bb6a
commit df66f10fa3
1 changed files with 8 additions and 6 deletions

View File

@ -316,21 +316,19 @@
@paste-snarf ( -> ) @paste-snarf ( -> )
.paste LDZ #00 EQU ?&start LIT "0 ;bracket-paste JSR2 &start .paste LDZ #00 EQU ?&start LIT "0 ;bracket-paste JSR2 &start
;snarf .File2/name DEO2 ( ) ;snarf .File2/name DEO2 ( )
#0100 .File2/len DEO2 ( ) #0780 .File2/len DEO2 ( )
&loop ( ) &loop ( )
;paste-buf .File2/r DEO2 ( ) ;paste-buf .File2/r DEO2 ( )
.File2/ok DEI2 ( size* ) .File2/ok DEI2 ( size* )
DUP2 #0000 EQU2 ?&failed ( size* ) DUP2 #0000 EQU2 ?&failed ( size* )
DUP2 paste-from-buf ( size* ) DUP2 paste-from-buf ( size* )
#0100 LTH2 ?&done ( ) #0780 LTH2 ?&done ( )
!&loop ( ) !&loop ( )
&failed POP2 &failed POP2
&done &done
.paste LDZ #00 EQU ?&end LIT "1 ;bracket-paste JSR2 &end .paste LDZ #00 EQU ?&end LIT "1 ;bracket-paste JSR2 &end
JMP2r JMP2r
@snarf ".snarf 00
@lit-first-y @lit-first-y
.is-lit-flip LDZ ?&flip .lit-click-y LDZ2 JMP2r &flip .lit-drag-y LDZ2 JMP2r .is-lit-flip LDZ ?&flip .lit-click-y LDZ2 JMP2r &flip .lit-drag-y LDZ2 JMP2r
@lit-first-x @lit-first-x
@ -631,7 +629,7 @@
@end-arg ( c^ -> ) @end-arg ( c^ -> )
;on-read .Console/vect DEO2 ;on-read .Console/vect DEO2
( DUP debug-csi ) DUP debug-csi
DUP LIT "d EQU ?exec-move-row ( move cursor to row ) DUP LIT "d EQU ?exec-move-row ( move cursor to row )
DUP LIT "h EQU ?exec-set-mode ( enable line wrap ) DUP LIT "h EQU ?exec-set-mode ( enable line wrap )
DUP LIT "l EQU ?exec-reset-mode ( disable line wrap ) DUP LIT "l EQU ?exec-reset-mode ( disable line wrap )
@ -793,6 +791,7 @@
@on-read-esc ( -> ) @on-read-esc ( -> )
.Console/r DEI .Console/r DEI
DUP debug-esc
DUP LIT "[ EQU ?start-csi DUP LIT "[ EQU ?start-csi
DUP LIT "] EQU ?start-osc DUP LIT "] EQU ?start-osc
DUP LIT "( EQU ?start-charset DUP LIT "( EQU ?start-charset
@ -823,6 +822,7 @@
@on-read ( -> ) @on-read ( -> )
.Console/r DEI .Console/r DEI
DUP debug-read
DUP ?&ok POP BRK DUP ?&ok POP BRK
&ok ( #42 .tint STZ ) &ok ( #42 .tint STZ )
!read !read
@ -1113,6 +1113,8 @@
@cp437 @cp437
~cp437.tal ~cp437.tal
@snarf ".snarf 00
@meta 00 @meta 00
&name "determ 0a &name "determ 0a
&details "ansi 20 "terminal 20 "emulator 0a &details "ansi 20 "terminal 20 "emulator 0a
@ -1122,7 +1124,7 @@
( device mask ) 41 0d07 ( device mask ) 41 0d07
( paste buffer ) ( paste buffer )
@paste-buf $1000 @paste-buf $0780 ( max 80 x 24 characters )
@paste-pos $2 @paste-pos $2
( store tint+char for each screen position ) ( store tint+char for each screen position )