好!!!
鄙人也补充一点点,嘻嘻
1、第一部分 keil 启动代码Startup Code
Startup code is executed immediately upon reset of the target system. The Keil startup code performs (optionally) the following operations in order:
启动代码是单片机复位后最先执行的代码,keil 中的启动代码通常按顺序 完成以下操作
• Clears internal data memory (清空内部数据内存)
• Clears external data memory (清空外部数据内存)
• Clears paged external data memory (清空分页的外部数据内存)
• Initializes the small model reentrant stack and pointer (初始化小模型可重入栈和指针)
• Initializes the large model reentrant stack and pointer
• Initializes the compact model reentrant stack and pointer
• Initializes the 8051 hardware stack pointer 初始化8051硬件栈指针
• Transfers control to code that initializes global variables or to the main C function if there are no initialized global variables
将控制权交给全局变量初始代码段,或者如果没有全局代码初始段时交给c语言的main 函数
Following is a list of the startup files that are available. (keil 中可用的启动代码文件)
Startup File Description
STARTUP.A51 Startup code for classic 8051 devices. (这个就是8051系列的启动代码文件了)
START_AD.A51 Startup code for Analog Devices MicroConverter devices.
START390.A51 Startup code for Dallas DS80C390/400/41x/5240/5250 contiguous mode devices.
START4XX.A51 Startup code for Dallas DS89C420/430/440/450 devices.
STARTLPC.A51 Startup code for NXP LPC700 devices series.
START900.A51 Startup code for NXP LPC90x - LPC93x devices series.
START950.A51 Startup code for NXP LPC95x - LPC99x devices series.
START_MX.A51 Startup code for NXP 80C51MX devices.
START751.A51 Startup code for NXP 80C75x devices.
START_XC.A51 Startup code for Infineon XC800 devices.
STARTUP32.A51 Startup code for ST uPSD32xx devices.
STARTUP34.A51 Startup code for ST uPSD33xx devices.
STARTUP34.A51 Startup code for ST uPSD34xx devices.
Copy the appropriate startup file from the \KEIL\C51\LIB\ folder into your project folder and make any changes to the copy.
Each startup file provides assembly constants you may change to control the operations performed at startup.
启动代码文件位于 \KEIL\C51\LIB\ , 你可以通过修改启动代码文件里的如下常量来匹配自己的程序
2、keil c51 拓展关键字
To facilitate many of the features of the 8051, the Cx51 Compiler adds a number of new keywords to the scope of the C language:
为了帮助8051实现某些功能,CX51编译器增加了在C语言范围内的一系列关键词。
• _at_
• alien
• bdata
• bit
• code
• compact
• data
• far
• idata
• interrupt
• large
• pdata
• _priority_
• reentrant
• sbit
• sfr
• sfr16
• small
• _task_
• using
• xdata
|