Explain the use of the following registers:
i) PC ii) SP iii) HL pair
Answers
Answer: PC: The Program Counter is one of the most important registers in the CPU. A program is a series of instructions stored in the memory. These instructions tell the CPU exactly how to get the desired result. It is important that these instructions must be executed in a proper order to get the correct result. This sequence of instruction execution is monitored by the program counter. It keeps track of which instruction is being executed and what the next instruction will be.
SP: Stack pointer (SP) is used to point to the top activation record on the run-time stack. The run-time stack contains one activation record for each function or procedure invocation that is currently unfinished in the program. The top activation record corresponds to the current function invocation. When a function call is made an activation record is pushed onto the run-time stack. When a function returns, the activation record is popped by decrementing the stack pointer to point to the previous activation record.
HL pair is the most important register pair, whose contents can be loaded in more ways than any other register pair.
Answer:
೫ಪಸೀಿಕ೬ೀಮಲಗ೬೩ೈ್ುುೈೈಪರಕಕ