Work is progressing nicely on the new assembler. This also allows me to find some corner cases that I didn't consider carefully yet. Let's look at the existing disassembler:
if OPC=Op_CALL and SND=Reg_PC then if Imm9="111111111" then result(1 to 3):="HLT"; else result(1 to 7):="OVL " & SLV_to_Hex(Imm8) & "h"; -- /!\ bit 11 not used ? end if; return; end if;
The HLT (halt) opcode uses all the 9 bits but the OVL (overlay) only uses 8, since only a byte can be managed by the overly register.
The 11th bit is not handled so there are 3 ideas that come to mind :
- extend the immediate field to work with IMM9 like IN/OUT (simplest)
- consider the R/I bit so the OVL instruction can use a register argument as well (useful to deal with multiple or indirect overlay numbers)
- create a new instruction that provides another functionality (which ?)
The jury is still out.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.