~rabbits/drifblim

0b77b9662e563c8e21c90c5dadb100a92b9d07e2 — neauoire 1 year, 4 months ago 292a61d
Use a single File device
1 files changed, 11 insertions(+), 12 deletions(-)

M src/drifblim.tal
M src/drifblim.tal => src/drifblim.tal +11 -12
@@ 2,7 2,6 @@

|10 @Console &vector $2 &read $1 &pad $4 &type $1 &write $1 &error $1
|a0 @File1 &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2
|b0 @File2 &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2

|0000



@@ 58,8 57,8 @@

@<assemble> ( -- )
	( | setup export )
	;dst/buf .File2/name DEO2
	[ LIT2 01 -File2/delete ] DEO
	;dst/buf .File1/name DEO2
	[ LIT2 01 -File1/delete ] DEO
	( | clear memory )
	;<create-symbol>/ptr LDA2 ;memory <mclr>
	( | cleanup cache )


@@ 70,7 69,7 @@
	( write pass ) #00 handle-top ?&when-error
	save-result save-symbols !<print-summary>
	&when-error ( -- )
		[ LIT2 01 -File2/delete ] DEO
		[ LIT2 01 -File1/delete ] DEO
		JMP2r

@handle-top ( scan -- err )


@@ 333,23 332,23 @@

@save-symbols ( -- )
	;dst/buf DUP2 scap/ ;dict/sym-ext OVR2 <scpy>
	SWP2 .File2/name DEO2
	SWP2 .File1/name DEO2
	;memory/symbols
	&w ( -- )
		( | addr )
		#0002 .File2/length DEO2
		DUP2 .File2/write DEO2
		#0002 .File1/length DEO2
		DUP2 .File1/write DEO2
		( | name )
		#0003 ADD2 DUP2 slen INC2 STH2k .File2/length DEO2
		DUP2 .File2/write DEO2
		#0003 ADD2 DUP2 slen INC2 STH2k .File1/length DEO2
		DUP2 .File1/write DEO2
		STH2r ADD2 DUP2 #0003 ADD2 LDA ?&w
	POP2 #00 ROT ROT STA
	JMP2r

@save-result ( -- )
	;dst/buf .File2/name DEO2
	.length LDZ2 #00ff SUB2 .File2/length DEO2
	;rom/output .File2/write DEO2
	;dst/buf .File1/name DEO2
	.length LDZ2 #00ff SUB2 .File1/length DEO2
	;rom/output .File1/write DEO2
	JMP2r

@read-eof ( addr* -- f )