~rabbits/uxnbal

274e7772a2ab6bd945be689421f03b817f973833 — Devine Lu Linvega 3 months ago f5e0236
Housekeeping
1 files changed, 20 insertions(+), 20 deletions(-)

M src/uxnbal.tal
M src/uxnbal.tal => src/uxnbal.tal +20 -20
@@ 598,28 598,12 @@
	POP2 POP2 JMP2r

@chex ( c -: ~val )
	LIT "0 SUB DUP #0a LTH ?&end
	[ LIT "0 ] SUB DUP #0a LTH ?&end
	#27 SUB DUP #10 LTH ?&end
	POP #ff
	&end ( -- )
		JMP2r

@<scpy> ( src* dst* -: )
	STH2
	&w ( src* `dst* -- )
		LDAk #00 STH2kr STA2
		INC2r INC2 LDAk ?&w
	POP2 POP2r JMP2r

@scap ( str* -: end* )
	INC2 & LDAk ?scap
	JMP2r

@<sput> ( chr str* -: )
	STH2
	#00 STH2r scap/ STA2
	JMP2r

@skey ( key buf -: proc )
	OVR #21 LTH ?&eval
	#00 SWP <sput>


@@ 627,15 611,31 @@
	&eval ( key buf -- proc )
		POP2 #01 JMP2r

@slen ( str* -: len* )
	DUP2 scap/ SWP2 SUB2 JMP2r

@scmp3 ( a* b* -: f )
	STH2
	LDAkr LDAk STHr NEQ ?&>end
		INC2r INC2 &>end
	LDA2r LDA2 STH2r EQU2 JMP2r

@scap ( str* -: end* )
	INC2 & LDAk ?scap
	JMP2r

@slen ( str* -: len* )
	DUP2 scap/ SWP2 SUB2 JMP2r

@<scpy> ( src* dst* -: )
	STH2
	&w ( src* `dst* -- )
		LDAk #00 STH2kr STA2
		INC2r INC2 LDAk ?&w
	POP2 POP2r JMP2r

@<sput> ( chr str* -: )
	STH2
	#00 STH2r scap/ STA2
	JMP2r

@<sclr> ( str* -: )
	STH2
	#00 STH2r