adumont / hrm-cpu

Human Resource Machine - CPU Design #HRM
https://twitter.com/i/moments/1017515777610649601
GNU General Public License v3.0
71 stars 8 forks source link

Support compact instructions #37

Open adumont opened 4 years ago

adumont commented 4 years ago

For memory instructions, use the two unused bits to encode 3 values of the operand, so the instructions can be written in only 1 byte (instead of two that it should normally be)

For example COPYTO 0 (or 1 or 2) would fit in only 1 byte, encoding the operand (0, 1, or 2) in the two unused bits of the opcode.

That involves changes in the FSM (faster as we bypass the steps of reading the Operand).

Also involves changes in the assembler obviously.

IMG_20190827_185619