Skip to main content
Renesas Electronics America - Knowledgebase

Symbol in an instruction for access to an SFR in assembler (CC-RL)

Last Updated:04/17/2017


I am using the CC-RL compiler for RL78 devices, and developing in assembly language. In the sample program which is available on the Web site, I found the statements “MOV!SFRregister, value” and “MOV SFRregister.value”. What is the difference in processing between “!SFR register” and “SFR register”?


Products of the RL78 family have two sets of SFRs, one being the special function registers (SFRs) in the range from FFF00H to FFFFFH, and the other being the extended special function registers (2nd SFRs) in the range from F0000H to F07FFh.
Write the name of the SFR without “!” when access is to an SFR, and with “!” when access is to a 2nd SFR.  
Check whether any SFR to be accessed is an SFR or a 2nd SFR before writing related statements.  

Note that the forms of addressing in instructions depend on the set of registers. “sfr” and “sfrp” can be used with instructions for SFRs, and “!addr16” can be used with 2nd SFRs.
Suitable Products
e² studio
CS+ (formerly CubeSuite+)
C Compiler Package for RL78 Family