Having fun coding a new Forth interpreter/compiler in Z80 assembly for the MSX. Making it wicked fast, based on Forth850 that I wrote for the Sharp PC850. MSX Pico+ is a *fantastic* cartridge to get my files over wifi. No AI coding assistance needed, thank you. #MSX #forth
1
2
14
I've been working through the classic book, "Starting Forth" and I have questions.

Like, why does Forth have a separate set of words for comparing to 0? That is 0= 0< 0> . I mean, can't you just do:

0 = 0 < and 0 > - that is, push zero on the stack and use the normal ops that compare the top 2 ?
3
0
0
Hope this helps: I wrote a Forth introduction and manual for newbies to Forth, for a 2012 standard Forth implementation which is more up to date than the vintage textbook introductions github.com/Robert-van-Engelen/Forth500/blob/main/manual.md
1
0
1
Combinations of words are included for performance, such as 1+ 2* 2/ 0= to perform two sequential operations with one word, but there are also a few to perform two operations simultaneously like /MOD (div mod) to return two results. Because most vintage Forth do not optimize code, these are useful.
0
0
0
Is it like a performance optimization because, maybe a lot of CPUs have a machine instruction for zero-comparisons that will shave off a few machine language instructions by not having to first push 0 on the stack, then pop the top-2, instead only pop the top 1 and compare?
0
0
0