~rabbits/drifblim

bede1d3a7f49441d50d71aae3c0c18bfa211bc1a — Devine Lu Linvega a month ago 38d7a18
Removed program/head from zp
1 files changed, 8 insertions(+), 8 deletions(-)

M src/drifblim.tal
M src/drifblim.tal => src/drifblim.tal +8 -8
@@ 8,7 8,7 @@
	@src $30
	@dst $30
	@inc $30
	@program &head $2 &length $2
	@program &length $2

|0100 ( -> )



@@ 126,7 126,7 @@ JMP2r

@write-call ( str* -- )

	get-ref LDA2 .program/head LDZ2 INC2 INC2 SUB2
	get-ref LDA2 ;write/head LDA2 INC2 INC2 SUB2

!write-short



@@ 156,9 156,9 @@ JMP2r
@write ( byte -- )

	[ LIT &skip 01 ] ?&no-write
		DUP ;rom .program/head LDZ2 ADD2 STA
		DUP ;rom ;write/head LDA2 ADD2 STA
		DUP #00 EQU ?&no-write
			.program/head LDZ2 .program/length STZ2
			[ LIT2 &head 0100 ] .program/length STZ2
		&no-write
	POP
	( move )


@@ 177,7 177,7 @@ JMP2r
@get-rel ( label* -- distance )

	;write/skip LDA ?&fill
	LDA2k .program/head LDZ2 SUB2 #0003 SUB2
	LDA2k ;write/head LDA2 SUB2 #0003 SUB2
	DUP2 #0080 ADD2 POP ?&fail
	NIP2 NIP



@@ 210,7 210,7 @@ JMP2r
	( check name ) DUP2 is-opcode ?&invalid
	( check duplicate ) DUP2 find-label INC2 ORA ?&not-unique
	( check limit ) ,&ptr LDR2 ;symbols/end GTH2 ?&limit
	( save addr ) .program/head LDZ2 [ LIT2 &ptr =symbols ] STH2k STA2
	( save addr ) ;write/head LDA2 [ LIT2 &ptr =symbols ] STH2k STA2
	( move ) INC2r INC2r INC2r
	( save name ) DUP2 STH2kr scpy
	( move ) slen STH2r ADD2 INC2 ,&ptr STR2


@@ 293,11 293,11 @@ JMP2r

@move-head ( v* -- )

	.program/head LDZ2 ADD2
	;write/head LDA2 ADD2

@set-head ( v* -- )

	.program/head STZ2
	;write/head STA2

JMP2r