Appendix a keyword in the keywords C51
uses
description
auto
storage
species descriptions to account for local variables, the default value
break for this
program statements to exit
innermost loop case
program
Switch statement in the statement
char selects an item
description
data type single-byte integer or
const char * data
storage
type descriptions during program execution cannot be changed
constant values continue
program statements to the next
default iteration
program
Switch statement in the statement
failed choices do
program statements constitute do. .. While
double loop structure
description
data type to a double-precision floating
else points
program statements constituted if … The structure
else select enum
data
enum type explanation
extern
description
stored types in other modules are described in
of global variable flost
description
data type to a single-precision
for floating-point
program statements constitute for
goto loop structure
program statements constitute
goto transfer structure if
program statements constituted if … The structure
else select int
data type description basic
long integer
description
data type long integer
register
storage
species descriptions use CPU internal storage
return of variable
p>
program statements
function returns the short
data type description short
signed integer
description
data type signed number, binary data of the MSB
as sign bit
operator sizeof
calculation expressions or data types of
static bytes
storage
static type description
struct variable
data types description structures
swicth type data
program statements constitute
switch selection structure typedef
data type description for the data
union type definition
data type describes the data
Union type unsigned
description
data type unsigned
void data
description
data type without a type
volatile data
description
data type of the variable in the program execution can be
implicitly change
while
program statements constitute while and do. .. While
loop structure Schedule 1-1 ANSIC standard keyword
Keywords
uses
description
bit
statement
-scalar declares a bit scalar or bit type
sbit of function
bit scalar statement declares a variable
bit addressing Sfr
special function register Declaration
Declare a
special function register Sfr16
special function register
statement declared a 16-bit
special function register data
memory
type descriptions directly addressed by the internal
bdata data memory
storage type description can be bit addressing internal
idata data memory
> storage type description of internal indirection
pdata data memory
memory
page description of the type of external data memory addressability
xdata
description
memory type external data memory
code
storage type description
interrupt program memory
description
interrupt functions to define a
reentrant interrupt functions
reentry
function description defines a function
reentry using
register set definition defines the chip
schedule working registers 1-2 extended keyword C51 compiler
Appendix 2-list of special function register AT89C51 (applies to the same schema chip) symbol
address
comments
*
E0H ACC
accumulator
*
F0H B
* multiply registers
D0H PSW
program status word SP
81H
DPL the stack pointer
82H
data memory pointer
low 8-bit DPH
83H
data memory pointer high
* 8-bit
A8H IE
interrupt
* allowed controller
D8H IP
interrupt priority controller *
80H P0
port
* 0
90H P1
port
* 1
A0H P2
port
* 2
B0H P3
port
PCON 3
87H
power control and
* baud rate selection
98H SCON
serial port controller SBUF
99H
serial data buffer *
88H TCON
TMOD timer control
89H
timer
TL0 means
8AH
timer 0low
TL1 8-bit
8BH
timer 1 low
TH0 8-bit
8CH
timer 0 low
TH1 8-bit
8DH
timer 1 high
8 bits * special function register can be bit addressing register Appendix III operator precedence and
level combination of
category
name
operator
combination of
1
cast
, arrays, structures,
combined type cast
()
subscript right-associative
[] access structure or
-Union Member or
>.
2
logic
logical not
!
左结合
字 位
按位取反
~
增 量
加一
++
减 量
减一
--
指 针
取地址
&
取内容
*
算 术
单目减
-
长度计算
长度计算
sizeof
3
算 术
乘
*
右结合
除
/
取模
%
4
算术和指针运算
加
+
减
-
5
字 位
左移
<<
右移
>>
6
关系
大于等于
>=
大于
>
小于等于
<=
小于
<
7
恒等于
==
不等于
!=
8
字 位
按位与
&
9
按位异或
^
10
按位或
|
11
逻 辑
逻辑与
&&
p>
左结合
12
逻辑或
||
13
条 件
条件运算
?:
14
赋 值
赋值
=
复合赋值
Op=
15
逗 号
逗号运算
,
右结合
No comments:
Post a Comment