1 / 20
文档名称:

ARM程序示例.doc

格式:doc   大小:175KB   页数:20页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

ARM程序示例.doc

上传人:ipod0c 2019/9/24 文件大小:175 KB

下载得到文件列表

ARM程序示例.doc

相关文档

文档介绍

文档介绍:ARM程序示例————————————————————————————————作者:————————————————————————————————日期: EXAMPLE1(AboutLDR、)AREALoadcon,CODE,READONLYENTRY;MarkfirstinstructiontoexecutestartBLfunc1;BranchtofirstsubroutineBLfunc2;BranchtosecondsubroutinestopMOVr0,#0x18;angel_SWIreason_ReportExceptionLDRr1,=0x20026;ADP_Stopped_ApplicationExitSWI0x123456;ARMsemihostingSWIfunc1LDRr0,=42;=>MOVR0,#42LDRr1,=0x55555555;=>LDRR1,[PC,#offsetto;LiteralPool1]LDRr2,=0xFFFFFFFF;=>MVNR2,#0MOVpc,;LiteralPool1contains;literalOx55555555func2LDRr3,=0x55555555;=>LDRR3,[PC,#offsetto;LiteralPool1];LDRr4,=0x66666666;mentedit;fails,becauseLiteralPool2;isoutofreachMOVpc,lrLargeTableSPACE4200;Startingatthecurrentlocation,;clearsa4200byteareaofmemory;tozeroEND;LiteralPool2isemptyTheLDRpseudo-onstant:iftheconstantcanbeconstructedwithaMOVorMVNinstruction,,theassembler:placesthevalueinaliteralpool(aportionofmemoryembeddedinthecodetoholdconstantvalues)generatesanLDRinstructionwithaprogram-:LDRrn,[pc,#offsettoliteralpool];loadregisternwithoneword;fromtheaddress[pc+offset]:lessthan4KBinARMstate,,=constpseudo-instructionrequirestheconstanttobeplacedinaliteralpool,theassembler:,,-instruction,andwithin4KB(ARM)or1KB(Thumb).(ADRADRL)AREAadrlabel,CODE,READONLYENTRY;Markfirstinstru