News for hackers. Stuff that matters.
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#"?):

    pop ax
    neg ax     ;sets carry flag if nonzero
    sbb ax,ax
    push ax
And another two bytes in DOCOL:

    ;add ax,4
    ;mov si,ax
    xchg ax,si
    lodsw
    lodsw
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)
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.