~rabbits/orca-toy

440466cc7ce758d46f48fabe40433fcb907b9b54 — neauoire 1 year, 8 months ago 7ee83ad
Implemented lc bang
1 files changed, 26 insertions(+), 6 deletions(-)

M orca.tal
M orca.tal => orca.tal +26 -6
@@ 3,8 3,9 @@
	TODO
		- Catch ports that overflow out of grid
		- Display character on cursor head
		- lowcase/upcase bang
		- Scale selection
		- Get case from right-side port
		- Display short timer
		- Rename file
		- Save file
		- Copy/Paste


@@ 285,6 286,14 @@ BRK

@get-bang ( x y -- bang )

	DUP2 #01 + GET-CELL CHAR-BANG = ,&bang JCN
	DUP2 #01 - GET-CELL CHAR-BANG = ,&bang JCN
	DUP2 INCR GET-CELL CHAR-BANG = ,&bang JCN
	DUP2 DECR GET-CELL CHAR-BANG = ,&bang JCN
	POP2 #00 RTN
	&bang
		POP2 #01 

RTN

@get-cell-type ( x y -- type )


@@ 725,14 734,25 @@ RTN
		POP POP2 RTN &not-locked
	ROT

	( is uppercase )
	( lowercase )
	DUP #60 < ,&no-lc JCN
	DUP #7b > ,&no-lc JCN
		STH DUP2 ;get-bang JSR2 ,&run JCN 
		POPr POP2 RTN
		&no-lc

	( uppercase )
	DUP #40 < ,&no-uc JCN
	DUP #5a > ,&no-uc JCN
		STH DUP2 OPERATOR-TYPE SET-TYPE STHr 
		DUP GET-VALUE #0a - #02 * TOS ;operations ++ LDA2 JSR2
		RTN &no-uc
		STH DUP2 OPERATOR-TYPE SET-TYPE &run STHr 
		DUP GET-VALUE #0a - #02 * TOS ;operations ++ LDA2 JMP2
		&no-uc

	( special )
	DUP CHAR-BANG = ;op-bang JCN2
	DUP CHAR-HASH = ;op-comment JCN2

	( TODO: lowercase )
	( unknown )
	POP2 POP

RTN