Keil Logo

SFR Assembler Statement

sfr  sfr_symbol = address;

The sfr statement defines a special function register:


sfr_symbol is the name of the Special Function Register (SFR) symbol to define.
address is the address of the SFR.

The sfr statement allows you to define SFR data in a consistent manner with the C251 compiler. With this statement you may use a generic SFR register definition file for the C251 compiler and the A251 assembler.

sfr  P0 = 0x80;
sfr  P1 = 0x90;
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.