Question 2 (a) Explain the function of registers and arithmetic logic unit (ALU) flags, C, N, V and Z of a microprocesso
Posted: Tue Jul 12, 2022 8:38 am
Question 2 (a) Explain the function of registers and arithmetic logic unit (ALU) flags, C, N, V and Z of a microprocessor. (b) (iv) The initial values (in hexadecimal format) of registers, RO, R1, R2, R3 of a microprocessor as followings: (1) RO 00123456 R2 00654321 (6 marks) R1= AABBCCDD R3=000 A 5C07 Determine the contents of all the registers and arithmetic logic unit this (ALU) flags after the following instructions executed on microprocessor. Assume C = 0, N = 0, V = 0 and Z = 0 before each instruction. Please show your calculation steps. ADD.W RO, R1 instruction adds the lower 2 bytes of R0 register with the corresponding lower 2 bytes of R1 register and stores the result in R1 register. (4 marks) ADD.L R2, R3 instruction adds the content of R2 register with the content of R3 register and stores the result in R3 register. (4 marks) CL.L R3 instruction clears the content of R3 register. (2 marks) MOVE.B RO, R1 instruction moves the lower byte from R1 register to RO register.