jeapostrophe / mic1

mic1
Other
21 stars 5 forks source link

A couple of bugs in mic1 #2

Closed shemphill closed 5 years ago

shemphill commented 5 years ago

mic1-patch.txt

If the last instruction in the microcode control does not contain an explicit goto, then execution will fall through to the next MicroPc, etc., which all contain zeros, which are effectively no-ops. However, after the MicroPc steps through 255, it will next go to 256, which will cause an illegal memory reference. control.c has been modified to truncate higher bits in the MicroPc.

Since the symbol table produced by masm now is being correctly written at the end of the binary output, mic1 fails to find it. driver.c has been modified to find the entries, wherever they might occur in the binary. Also, the allocated memory for the symbol table entries was not big enough to account for the nulls at the end of the strings. That has also been fixed.

jeapostrophe commented 5 years ago

Thank you!