Controlling the a-bit

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Controlling the a-bit

ninmurai
I'm trying to figure out how to control the a-bit which governs the mnemonics. Looking at Figure 4.3, it implies that a=0 when there is no "A" in the comp mnemonic.

However, I'm after the mnemonic which gives cccccc = 111111 when a=0. It's blank in that figure and when I use the instruction "AMD=1;JMP", it gives 1110 1111 1111 1111, presumably because I'm forcing the a=0 mnemonic because of the "1" comp instruction.

What can I do here?



Reply | Threaded
Open this post in threaded view
|

Re: Controlling the a-bit

cadet1620
Administrator
The "a" bit in the c-instruction says to read or write to RAM instead of the A register.

The easiest way to deal with it is to consider it as the most significant bit of a 7-bit compute field. Include all the legal computations in a lookup table that returns the seven bits acccccc and merge them as a single element into the opcode that you are generating.

--Mark