~rabbits/dexe

beb29d7f0563a307a84f2128866941c11906ed1b — neauoire a month ago ae1ec11
Implemented Console/vector
1 files changed, 25 insertions(+), 2 deletions(-)

M src/main.tal
M src/main.tal => src/main.tal +25 -2
@@ 93,6 93,8 @@
	#0fc7 .System/g DEO2 
	#0f97 .System/b DEO2

	;on-console .Console/vector DEO2

	( vectors ) 
	;untrap JSR2



@@ 139,6 141,27 @@

BRK

@on-console ( -- )

	#00 ;draw-filepath JSR2
	.Console/read DEI DUP 
	#0a = ,&counter LDR #20 = #0000 == ,&no-end JCN
		( set length ) ,&counter LDR .path/length STZ
		( null char ) #00 .path ,&counter LDR INC + STZ
		( reset counter ) #00 ,&counter STR 
		( load ) ;load-file JSR2
		POP BRK
		&no-end
	,&counter LDR 
		( length ) DUP .path/length STZ
		INC 
			( inc counter ) DUP ,&counter STR 
			( write ) .path + STZ
	#01 ;draw-filepath JSR2

BRK
	&counter $1

@untrap ( -- )

	( vectors ) 


@@ 255,7 278,7 @@ BRK
		;redraw JSR2 POP BRK &no-new
	DUP [ LIT 'o ] ! ,&no-open JCN
		;load-file JSR2
		;redraw JSR2 POP BRK &no-open
		POP BRK &no-open
	DUP [ LIT 's ] ! ,&no-save JCN
		;path/name ;save-file JSR2 
		POP BRK  &no-save


@@ 834,7 857,7 @@ RTN
	MEMORY       .File/load DEO2
	.File/success DEI2 .data/length STZ2
	RESET-STATE
	;redraw JSR2
	;reset-selection JSR2

RTN