Re:milliForth
by rep_lodsb on Monday November 06, 2023 @04:59PM
(#38169632)
You could save one byte by replacing "0=" with "0<>" (well, except for the name, maybe use "0#"?):
And another two bytes in DOCOL:
Maybe even free up a word register to always hold the address of DOCOL, then you only need two bytes at each colon definition. If it's possible without adding any extra instructions, this should save 4 bytes in total (one stosw in COLON, the DOCOL.addr variable, one lodsw in the above version of DOCOL)
[ Parent
| on HN ]
Re:milliForth
by fuzzballcat on Monday November 06, 2023 @06:41PM
(#38170917)
Good thinking! I wouldn't have thought of that `xchg` one in DOCOL, very clever.
I'll futz around with making DOCOL's address as a word and see if I can make that work.