Hi. I have ordered a "Bravo" kit and have been getting my head around the various opcodes.
It seems to me that ACB behaves differently to ADB SBB and SCB. The subtractions have specific microcode to preserve the original A in the B registers. ADB loads the added value into B and never changes A.
ACB0 (and ACB1) do the following as can be seen in the Microcode which ends up AO|RI e.g. it's copying the result from A.
I have tried it experimentally in the emulator which I presume is microcode driven (I have my own non microcode emulator) and it does indeed update A. e.g. if you do LDI 1 ACB 00 81 ACB 00 81 with zero memory A will not be 1 at the end.
* Instruction ACB0 **
PHASE 1: ---------------------------------------------------
Copy Program Counter => Memory Address Register
PHASE 2: ---------------------------------------------------
Copy Program Counter => Memory Address Register
Use High Byte MAR/PC
PHASE 3: ---------------------------------------------------
Copy RAM Memory =>
Use High Byte MAR/PC
Increment PC/MAR
PHASE 4: ---------------------------------------------------
Copy RAM Memory => B Register
Increment PC/MAR
PHASE 5: ---------------------------------------------------
Copy RAM Memory => Memory Address Register
Use High Byte MAR/PC
PHASE 6: ---------------------------------------------------
Copy B Register => Memory Address Register
PHASE 7: ---------------------------------------------------
Copy RAM Memory => B Register
PHASE 8: ---------------------------------------------------
Copy ALU A+B (Flags In) => A Register
PHASE 9: ---------------------------------------------------
Copy A Register => RAM Memory
Hi. I have ordered a "Bravo" kit and have been getting my head around the various opcodes.
It seems to me that ACB behaves differently to ADB SBB and SCB. The subtractions have specific microcode to preserve the original A in the B registers. ADB loads the added value into B and never changes A.
ACB0 (and ACB1) do the following as can be seen in the Microcode which ends up AO|RI e.g. it's copying the result from A.
I have tried it experimentally in the emulator which I presume is microcode driven (I have my own non microcode emulator) and it does indeed update A. e.g. if you do LDI 1 ACB 00 81 ACB 00 81 with zero memory A will not be 1 at the end.
* Instruction ACB0 **
PHASE 1: --------------------------------------------------- Copy Program Counter => Memory Address Register
PHASE 2: --------------------------------------------------- Copy Program Counter => Memory Address Register Use High Byte MAR/PC PHASE 3: --------------------------------------------------- Copy RAM Memory => Use High Byte MAR/PC Increment PC/MAR PHASE 4: --------------------------------------------------- Copy RAM Memory => B Register Increment PC/MAR PHASE 5: --------------------------------------------------- Copy RAM Memory => Memory Address Register Use High Byte MAR/PC PHASE 6: --------------------------------------------------- Copy B Register => Memory Address Register
PHASE 7: --------------------------------------------------- Copy RAM Memory => B Register
PHASE 8: --------------------------------------------------- Copy ALU A+B (Flags In) => A Register
PHASE 9: --------------------------------------------------- Copy A Register => RAM Memory
PHASE 10: --------------------------------------------------- Increment PC/MAR PHASE 11: --------------------------------------------------- Clear Instruction step
A Updated