UPI-41A/41AH/42/42AH USER’S MANUAL
SEL RB0
Select Register Bank 0
Opcode:
1 1 0 0
0 1 0 1
PSW BIT 4 is set to zero. References to working registers 0 – 7 address data memory locations
0 – 7. This is the recommended setting for normal program execution.
(BS)
w
0
SEL RB1
Select Register Bank 1
Opcode:
1 1 0 1
0 1 0 1
PSW bit 4 is set to one. References to working registers 0 – 7 address data memory locations
24 – 31. This is the recommended setting for interrupt service routines, since locations 0 – 7 are
left intact. The setting of PSW bit 4 in effect at the time of an interrupt is restored by the
RETR instruction when the interrupt service routine is completed.
Example:
Assume an IBF interrupt has occurred, control has passed to program memory location 3, and
PSW bit 4 was zero before the interrupt.
LOC3: JMP INIT
;JUMP TO ROUTINE ‘INIT’
.
.
.
INIT: MOV R7,A
;MOV ACC CONTENTS TO
;LOCATION 7
SEL RB1
;SELECT REG BANK 1
MOV R7,
Ý
OFAH
;MOVE ‘FA’ HEX TO LOCATION 31
.
.
.
SEL RB0
;SELECT REG BANK 0
MOV A,R7
;RESTORE ACC FROM LOCATION 7
RETR
;RETURNÐÐRESTORE PC AND PSW
49