2025-07-06
In getnum, allow underscore separator in /L= and /J= numbers, and reject hexits >= A if reading a decimal number. These changes were picked from LZEXE's COMTOEXE.
Optimise the Done code and optimise BinToStr. The latter now has two entrypoints. The first accepts a table made of a dword field (at dword [di - 5]
), a byte field at byte [di - 1]
, and di -> the message. The byte field gives the offset in the message of the 10 blanks which represent the slot for writing the decimal number as a string. The second entrypoint doesn't take a dword field but rather reads dx:ax as the input number.
The new BinToStr can pick up the number, format it, and finally display the resulting string all in one go. This saves a lot of code in the callers. Except for one case, the variables used were moved from their original places into the message tables.
I did experiment with a further optimisation to drop the blanks from the message templates. However, trading these for some code led to increased file sizes once x2b2.com was converted to an .exe and compressed using LZEXE. The current revision compresses to exactly 2560 Bytes (5 sectors).
cmp sp, imm16
to automatically set minimum sp.I am planning to add support for MZ EXE files to the COMLOADER. This would allow loading LZEXE compressed files.
There are some hurdles:
My plan is to:
This should solve all the problems. I considered previously to allocate a separate memory block, but this may require setting up the UMB link and would need more logic to ensure that the minimum allocation is met. Splitting the process MCB on our own would be a possibility but would make it less portable.