~rabbits/uxnbal

62f59aaf04f5f4136c6b44c5faa92a8d106d8f3f — Devine Lu Linvega 4 months ago 000388f
Added meta
1 files changed, 27 insertions(+), 25 deletions(-)

M src/uxnbal.tal
M src/uxnbal.tal => src/uxnbal.tal +27 -25
@@ 33,6 33,7 @@
|0100

@on-reset ( -> )
	;meta #06 DEO2
	;on-default .Console/vector DEO2
	( | toggle interactive mode )
	.Console/type DEI ?&>has-arg


@@ 40,6 41,13 @@
		;on-interactive .Console/vector DEO2 &>has-arg
	BRK

@meta $1
	( name ) "Uxnbal 0a
	( desc ) "Uxntal 20 "Validator 0a
	( auth ) "By 20 "Devine 20 "Lu 20 "Linvega 0a
	( date ) "9 20 "Jan 20 "2023 $1
	( exts ) 00

@on-default ( -> )
	.Console/read DEI .src skey ?&eval
	BRK


@@ 54,7 62,7 @@
	&eval ( -> )
		eval
		( | output success name )
		;src DUP2 <emit-line>
		;src DUP2 <emit-line>/
		<sclr>/
		BRK



@@ 317,7 325,7 @@
		[ LIT2 "- 19 ] DEOk DEO
		#2019 DEO
		;dict/duplicate <print-str>
		<print-word>
		<print-word>/
		#0a19 DEO
		;<print-summary>/warnings LDA2 INC2 ;<print-summary>/warnings STA2
		POP POP2 JMP2r


@@ 398,10 406,10 @@
		#00 JMP2r

@make-sublabel ( sub* -: sublabel* )
	;memory/sublabel-buf <sclr>/
	;scope/no-rune ;memory/sublabel-buf <scpy>
	[ LIT "/ ] ;memory/sublabel-buf <sput>
	( entry -> ) ;memory/sublabel-buf scap/ wcpy POP2 ;memory/sublabel-buf JMP2r
	;memory/sublabel-buf STH2k <sclr>/
	;scope/no-rune STH2kr <scpy>
	[ LIT "/ ] STH2kr <sput>
	( entry -> ) STH2kr scap/ wcpy POP2 STH2r JMP2r

@make-parent ( sub* -- parent* )
	;memory/parent-buf STH2k <scpy>


@@ 503,22 511,18 @@
		POP MUL2 SUB2 JMP2r

@<print-str> ( str* -- )
	!&a
	&w ( str* -- )
		LDAk #19 DEO
		INC2 &a LDAk ?&w
	LDAk #19 DEO
	INC2 & LDAk ?<print-str>
	POP2 JMP2r

@<print-word> ( str* -- )
	!&a
	&w ( -- )
		LDAk #19 DEO
		INC2 &a LDAk #20 GTH ?&w
	LDAk #19 DEO
	INC2 & LDAk #20 GTH ?<print-word>
	POP2 JMP2r

@<print-summary> ( -: )
	;dict/balanced <print-str>
	;src <print-str>
	;src <print-str>/
	;dict/with <print-str>
	;validate/ok LDA2 <print-dec>
	[ LIT2 "/ 19 ] DEO


@@ 533,35 537,33 @@
	;<print-summary>/warnings LDA2k INC2 SWP2 STA2
	[ LIT2 "- 19 ] DEOk DEO
	#2019 DEO
	<print-str>
	<print-word>
	<print-str>/
	<print-word>/
	#2019 DEO
	JMP2r

@<warn> ( token* warning* -: )
	<print-warning>
	;dict/in <print-str>
	;scope <print-str>
	;scope <print-str>/
	#0a19 DEO
	JMP2r

@<warn-imbalance> ( bal dict* -: )
	;scope ;dict/imbalance <print-warning>
	<print-str>
	<print-str>/
	[ LIT2 "( 19 ] DEO
	<print-offset>
	[ LIT2 ") 19 ] DEO
	#2019 DEO
	;dict/in <print-str>
	;memory/pass2-buf <print-str>
	;memory/pass2-buf <print-str>/
	#0a19 DEO
	JMP2r

@<emit-line> ( str* -- )
	!&a
	&w ( str* -> )
		LDAk #18 DEO
		INC2 &a LDAk ?&w
@<emit-line> ( str* -: )
	LDAk #18 DEO
	INC2 & LDAk ?<emit-line>
	POP2 #0a18 DEO
	JMP2r