欢迎来到天天文库
浏览记录
ID:12063125
大小:40.00 KB
页数:5页
时间:2018-07-15
《一个led闪烁的代码》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、$NOMOD51;------------------------------------------------------------------------------;ThisfileispartoftheC51Compilerpackage;Copyright(c)1988-2005KeilElektronikGmbHandKeilSoftware,Inc.;Version8.01;;***<<>>***;------------------------------
2、------------------------------------------------;STARTUP.A51:Thiscodeisexecutedafterprocessorreset.;;TotranslatethisfileuseA51withthefollowinginvocation:;;A51STARTUP.A51;;TolinkthemodifiedSTARTUP.OBJfiletoyourapplicationusethefollowing;Lx51invocation:;;Lx51yourobjectfilelist,S
3、TARTUP.OBJcontrols;;------------------------------------------------------------------------------;;User-definedPower-OnInitializationofMemory;;WiththefollowingEQUstatementstheinitializationofmemory;atprocessorresetcanbedefined:;;IDATALEN:IDATAmemorysize<0x0-0x100>;No
4、te:Theabsolutestart-addressofIDATAmemoryisalways0;TheIDATAspaceoverlapsphysicallytheDATAandBITareas.IDATALENEQU80H;;XDATASTART:XDATAmemorystartaddress<0x0-0xFFFF>;TheabsolutestartaddressofXDATAmemoryXDATASTARTEQU0;;XDATALEN:XDATAmemorysize<0x0-0xFFFF>;Thelengtho
5、fXDATAmemoryinbytes.XDATALENEQU0;;PDATASTART:PDATAmemorystartaddress<0x0-0xFFFF>;TheabsolutestartaddressofPDATAmemoryPDATASTARTEQU0H;;PDATALEN:PDATAmemorysize<0x0-0xFF>;ThelengthofPDATAmemoryinbytes.PDATALENEQU0H;;;----------------------------------------------
6、--------------------------------;;ReentrantStackInitialization;;ThefollowingEQUstatementsdefinethestackpointerforreentrant;functionsandinitializedit:;;StackSpaceforreentrantfunctionsintheSMALLmodel.;IBPSTACK:EnableSMALLmodelreentrantstack;Stackspaceforreentrantfunc
IBPSTACK:EnableSMALLmodelreentrantstack;Stackspaceforreentrantfunc
7、tionsintheSMALLmodel.IBPSTACKEQU0;setto1ifsmallreentrantisused.;IBPSTACKTOP:EndaddressofSMALLmodelstack<0x0-0xFF>;Setthetopofthestacktothehighestlocation.IBPSTACKTOPEQU0xFF+1;default0FFH+1;;;StackSpaceforreentrantfunctionsintheLARGEmodel.;XBPSTACK:EnableLARGEmo
XBPSTACK:EnableLARGEmo
8、delreentrantstack;StackspaceforreentrantfunctionsintheLARG
此文档下载收益归作者所有