To study the operation of a CPU and the control unit. To enhance the ALU of the 8-bit CPU.
Read lab lecture notes.
opcode# MNEMONIC DESCRIPTION ============================================================== 00 XOR source, destination XOR the contents of source, destination, and store the result in the destination -------------------------------------------------------------- 01 AND source, destination AND the contents of source, destination, and store the result in the destination -------------------------------------------------------------- 10 NOT source, destination invert the contents of source and store the result in destination -------------------------------------------------------------- 11 OR source, destination OR the contents of source, destination, and store the result in destination --------------------------------------------------------------Please note that the ALU will need two 8-bit operands input and produce the output of the ALU.
1) Write out and hand in the microinstructions to perform this operation XOR #5,(C) including the machine code and how you load it to the memory. Pre-load the registers or memory when needed. For example: Load 00001000 to the C register Load 00000000 to the memory location 8 2) Write out and hand in the microinstructions to perform the operation OR 5, 8 including the machine code and how you load it to the memory. Pre-load the registers or memory when needed. For example: Load 00000000 to the memory location 5 Load 00001010 to the memory location 8
Describe how unconditional branches could be added to the CPU and what additional things this would require. Remember that a branch instruction uses an offset from the current location. Hand in your answer for this question.