~rabbits/drifblim

5bad1000256750575b68a506bdf6b927acf96362 — Devine Lu Linvega a month ago bede1d3
Removed length and inc path from ZP
1 files changed, 23 insertions(+), 18 deletions(-)

M src/drifblim.tal
M src/drifblim.tal => src/drifblim.tal +23 -18
@@ 7,8 7,6 @@

	@src $30
	@dst $30
	@inc $30
	@program &length $2

|0100 ( -> )



@@ 25,19 23,7 @@ BRK
@on-ready ( -> )

	#0a18 DEO
	( pass1 )
	#0100 set-head
	;dict/reset ;scope scpy
	;src handle-file
	( pass2 )
	#0100 set-head
	;dict/reset ;scope scpy
	#00 ;write/skip STA
	;src handle-file
	( export )
	;dst .File1/name DEO2
	.program/length LDZ2 #00ff SUB2 .File1/length DEO2
	;rom/start .File1/write DEO2
	;src ;dst assemble
	save-symbols
	print-summary
	( debug ) #010e DEO


@@ 82,6 68,24 @@ JMP2r
(
@|library )

@assemble ( src* dst* -- )

	( pass1 )
	#0100 set-head
	;dict/reset ;scope scpy
	OVR2 handle-file
	( pass2 )
	#0100 set-head
	;dict/reset ;scope scpy
	#00 ;write/skip STA
	SWP2 handle-file
	( export )
	.File1/name DEO2
	[ LIT2 &length $2 ] #00ff SUB2 .File1/length DEO2
	;rom/start .File1/write DEO2

JMP2r

@parse ( t* -- )

	LDAk ,&rune STR


@@ 118,7 122,7 @@ JMP2r
&rawhex !write-hex
&rawstr INC2 !write-str
&opcode find-opcode !write
&inc INC2k ;inc STH2k scpy sclr STH2r !handle-file
&inc INC2k ;include STH2k scpy sclr STH2r !handle-file
&ignore POP2 JMP2r

(


@@ 158,7 162,7 @@ JMP2r
	[ LIT &skip 01 ] ?&no-write
		DUP ;rom ;write/head LDA2 ADD2 STA
		DUP #00 EQU ?&no-write
			[ LIT2 &head 0100 ] .program/length STZ2
			[ LIT2 &head 0100 ] ;assemble/length STA2
		&no-write
	POP
	( move )


@@ 330,7 334,7 @@ BRK
	;dst pstr
	( length )
	;dict/in pstr
	.program/length LDZ2 #0100 SUB2 pdec
	;assemble/length LDA2 #00ff SUB2 pdec
	;dict/bytes pstr
	LIT "( #18 DEO
	;create-label/count LDA2 pdec


@@ 439,6 443,7 @@ JMP2r
@token $20
@scope $20
@sublabel $20
@include $30
@symbols $4000 ( addr*, refs, name[], 00 ) &end
@rom $100 &start