~rabbits/bicycle

d698b31cb558e90d3b068930a8ccb5d1bf1abd42 — neauoire 5 months ago c1e854b
Housekeepin
1 files changed, 16 insertions(+), 12 deletions(-)

M src/bicycle.tal
M src/bicycle.tal => src/bicycle.tal +16 -12
@@ 40,7 40,7 @@
	( name ) "Bicycle 0a
	( details ) "A 20 "Uxn 20 "Emulator 0a
	( author ) "By 20 "Hundred 20 "Rabbits 0a
	( date ) "14 20 "Nov 20 "2023 $1
	( date ) "1 20 "Jan 20 "2024 $1
	( ) 01
	( > icon ) 83 =appicon



@@ 269,7 269,7 @@
		;jagged-chr .Screen/addr DEO2
		[ LIT2 81 -Screen/sprite ] DEO
		INC DUP ?&spacer
	POP #00 DUP <draw-run-btn>
	POP #0000 <draw-run-btn>
	DUP <draw-step-btn>
	DUP <draw-reset-btn>
	!<draw-reset-btn>


@@ 299,7 299,8 @@
	;dict/reset ;<write>/length LDA2 #0000 NEQ2 INC #05 MUL !<draw-str-color>

@<draw-button> ( width state -- )
	STH ;button-sel-chr/a ;button-chr/a STHkr [ JMP SWP2 POP2 ] .Screen/addr DEO2
	STH
	;button-sel-chr/a ;button-chr/a STHkr [ JMP SWP2 POP2 ] .Screen/addr DEO2
	[ LIT2 85 -Screen/sprite ] DEO
	#00 SWP SUB
	&w ( -- )


@@ 325,7 326,7 @@
	.emu/time LDZ2 !<draw-dec>/>positive
	&on-error ( -- )
		;dict/error #05 <draw-str-color>
		#00 .uxn/err LDZ DUP ADD ;errors ADD2 LDA2 #0a !<draw-str-color>
		[ LIT2 00 -uxn/err ] LDZ DUP ADD ;errors ADD2 LDA2 #0a !<draw-str-color>

@<draw-stacks> ( -- )
	( | ws )


@@ 344,7 345,8 @@
	?{
		POP2 ;dict/empty #05 !<draw-str-color> }
	#0a ;<draw-char>/color STA
	STH2 #2000
	STH2
	#2000
	&l ( -- )
		DUP [ LIT &sp $1 ] EQU ?&end
		#00 OVR STH2kr ADD2 LDA2 find-symbol DUP2 #ffff EQU2 ?{


@@ 376,7 378,8 @@
	LIT2r 0000 ;source DUP2 slen #0038 LTH2 ?&>no-follow
		scap #0038 SUB2 &>no-follow
	&w ( -- )
		LITr 00 LDAk #20 SUB #00 SWP ;font ADD2 LDA STH ADD2r INC2 LDAk ?&w
		LITr 00 LDAk #20 SUB #00 SWP ;font ADD2 LDA STH
		ADD2r INC2 LDAk ?&w
	POP2 STH2r #0010 ADD2 .Screen/x DEO2
	#0010 .Screen/y DEO2
	LIT "| !<draw-char>


@@ 476,7 479,7 @@
	DUP2 #4000 AND2 #0000 EQU2 ?&>positive
		LIT "- <draw-char>
		#4000 SWP2 SUB2 #3fff AND2 &>positive
	#00 ,&z STR
	[ LIT2 00 _&z ] STR
	#2710 <draw-dec>/parse
	#03e8 <draw-dec>/parse
	#0064 <draw-dec>/parse


@@ 485,7 488,7 @@
	&parse ( -- )
		DIV2k DUPk [ LIT &z $1 ] EQU ?{
			DUP #30 ADD <draw-char>
			#ff ,&z STR }
			[ LIT2 ff _&z ] STR }
		POP MUL2 SUB2 JMP2r

@<draw-str-color> ( str* color -- )


@@ 563,7 566,8 @@
		NIP2 POP2r EQU JMP2r

@scmp3 ( a* b* -- f )
	LDA2k ROT2 LDA2k ROT2 EQU2 STH INC2 LDA2 SWP2 INC2 LDA2 EQU2 STHr AND JMP2r
	LDA2k ROT2 LDA2k ROT2 EQU2 STH
	INC2 LDA2 SWP2 INC2 LDA2 EQU2 STHr AND JMP2r

@chex ( c -- <val> )
	LIT "0 SUB DUP #0a LTH ?&end


@@ 575,14 579,14 @@
@shex ( str* -- val* )
	LIT2r 0000
	&w ( -- )
		LITr 40 SFT2r LITr 00 LDAk chex STH ADD2r INC2 LDAk ?&w
		LITr 40 SFT2r LITr 00 LDAk chex STH
		ADD2r INC2 LDAk ?&w
	POP2 STH2r JMP2r

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

@<phex> ( short* -- )