Arm_n_Legs
- Joined Mar 7, 2007
- 186
Simply treat the registers in the register banks as memory locations for data storage. They are named as R0 to R7 for each of the bank. Some examples of instructions involving the registers:
MOV A,R1
MOV R2,A
MOV R7,#34H
Since there are 4 banks of R0 to R7, so which R1 is referred to in the instruction MOV A,R1? You will then need to refer to the register selection flags in RS0 and RS1 which reside in the PSW register.
If RS1:RS0 is 00, then all references are made to registers in bank0.
MOV A,R1
MOV R2,A
MOV R7,#34H
Since there are 4 banks of R0 to R7, so which R1 is referred to in the instruction MOV A,R1? You will then need to refer to the register selection flags in RS0 and RS1 which reside in the PSW register.
If RS1:RS0 is 00, then all references are made to registers in bank0.