~rabbits/uxnlin

0a1bb7db9663b4cc1f6a66de74e25a1114deb373 — neauoire 4 months ago 4b483d0
Minor opt
1 files changed, 13 insertions(+), 12 deletions(-)

M src/uxnlin.tal
M src/uxnlin.tal => src/uxnlin.tal +13 -12
@@ 138,31 138,32 @@ JMP2

@is-arithmetic ( token* -- flag )

	STH2
	,&t STR2
	;ariopcodes/end ;ariopcodes
	&loop
		DUP2 STH2kr ;scmp3 JSR2 ,&found JCN
		DUP2 [ LIT2 &t $2 ] ;scmp3 JSR2 ,&found JCN
		#0004 ADD2 GTH2k ,&loop JCN
	POP2 POP2
	POP2r
	#00 
	#00

JMP2r
	&found POP2 POP2 POP2r #01 JMP2r
	&found POP2 POP2 #01 JMP2r

@is-litbyte ( str* -- flag )

	STH2k ;slen JSR2 #0003 EQU2
	STH2r LDA LIT "# EQU
	AND
	LDAk LIT "# EQU ,&continue JCN
		POP2 #00 JMP2r
		&continue
	;slen JSR2 #0003 EQU2

JMP2r

@is-litshort ( str* -- flag )

	STH2k ;slen JSR2 #0005 EQU2
	STH2r LDA LIT "# EQU
	AND
	LDAk LIT "# EQU ,&continue JCN
		POP2 #00 JMP2r
		&continue
	;slen JSR2 #0005 EQU2

JMP2r



@@ 310,7 311,7 @@ JMP2r
	&lines-txt "lines $1

(
@|errors )
@|hints )

@redundance "Redundance $1 ( opcode effects cancel each other )
@static "Static-Arithmetic $1 ( arithmetic opcode on two static literals )