Two new words

17 views
Skip to first unread message

The Beez

unread,
Oct 29, 2023, 7:19:48 PM10/29/23
to 4tH-compiler
Hi 4tHers!

You know I always thought that expressing your intensions is important. For that reason I added two new words, SPIN and CLIP.

CLIP is the opposite of CHOP. It already exists in uBasic and removes a character from the end. It is an alias for 1-, but ut better expresses your intention IMHO.

SPIN is equivalent to SWAP ROT. Its stack diagram is a b c -- c b a
You now how hard it us to reach element 3. Thus one makes it change places with TOS - almost like paging registers on a Z80. I think it's a useful abstraction - like TUCK and NIP.

It formalizes a stack operation in a sense. All code is available in SVN.

Hans Bezemer

Phillip Kelly

unread,
Oct 29, 2023, 10:54:42 PM10/29/23
to 4th-co...@googlegroups.com
Thanks for the update Hans!

--
You received this message because you are subscribed to the Google Groups "4tH-compiler" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 4th-compiler...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/4th-compiler/8a3375f2-4d89-4b53-a275-3ce81d3414c4n%40googlegroups.com.


--
Yours Sincerely
Mr. Phillip Kelly
 

Reply all
Reply to author
Forward
0 new messages