Department of Computer Scien
ce and Information Engineering
National Cheng Kung University, TAIWAN
8051 HANEL
REGISTER BANKS AND STACKRegister Banks (cont’)
We can switch to other banks by use of the PSW register
¾Bits D4 and D3 of the PSW are used to select the desired register bank¾Use the bit-addressable instructions SETB and CLR to access PSW.4 and PSW.3
1
1
Bank 3
0
1
Bank 2
1
0
Bank 1
0
0
Bank 0
RS0(PSW.3)
RS1(PSW.4)
PSW bank selection