Colby-CPU-Sim / CPUSim

GNU General Public License v3.0
52 stars 18 forks source link

Changing the number of bits in a field to or from 0 needs to cause the field to be added or removed from the instruction #115

Open djskrien opened 7 years ago

djskrien commented 7 years ago

If a field is of length 0 (that is, 0 bits) then it is treated as punctuation in an assembly instruction and so does not appear as a field in the corresponding machine instruction. If that field is later edited so that it has positive length, it needs to be added as a field in the corresponding machine instruction. That addition currently doesn't happen. A similar thing needs to happen if a positive-length field is edited to have length 0. That is, it needs to be removed as a field from the machine instruction.