 | A166 User's Guide |  |
|
|
| REGBANK Assembler Statement| Arguments |
name REGBANK <[>range<]> <[>, ...<]>
| | Description | All sixteen of the XC16x/C16x/ST10 General Purpose Registers (GPRs) are mapped to on-chip RAM. This allows register context switching by setting the Context Pointer (CP) Register to point to a new register bank (which may be created using the REGBANK statement). The REGBANK statement creates a register bank with name and an optional range of registers used. If the range is not specified, the assembler automatically supplies the registers actually used in the source module. The range may be specified as: Rm <[>-Rn<]> <[>, ...<]> Where | Rm | is the starting register (R0-R15). | | Rn | is the ending register (R0-R15) which must be greater than Rm. |
The linker processes register banks as data sections located in internal RAM (0FA00h-0FDFFh). | | See Also | REGDEF | | Example |
1 $SEGMENTED
2
3 BANK1 REGBANK R0-R15
4
-------- 5 C100 SECTION CODE PUBLIC 'ROM1'
6 INIT PROC FAR
7 ASSUME DPP3: SYSTEM
00000000 E6030300 8 MOV DPP3,#PAG CP
00000004 CC00 9 NOP
00000006 C608???? R 10 SCXT CP,#BANK1 ; Switch context pointer
0000000A CC00 11 NOP ; Pipeline delay
0000000C E6FF3412 12 MOV R15,#1234H ; Access to GPR's now valid
00000010 DB00 13 RET
14 INIT ENDP
-------- 15 C100 ENDS
16
17 END
|
|
|