Hi, im using the armasm assembler, and i learnt what literal pools are while reading the ads assembler guide. i am using atmel`s pre-canned libraries for low level inits. i have seen that the cstartup file has code thats written in a particular way. u can see that at the end of the section, the symbols like "at91_default_fiq_handler" etc are stored nearby explicitly using DCD. we could also have used something like>ldr r0, =at91_default_fiq_handlerwhy is this being done? does it have something to do with a literal pool? --------------------------------------------------------------------------- ;- Advanced Interrupt Controller configuration ;--------------------------------------------------------------------------- ;- Set up the default vectors ;--------------------------------------------------------------------------- ;- Load the AIC Base Address and the default handler addresses> add r0, pc,#-(8+.-AicData) ; @ where to read values (relative)ldmia r0, {r1-r4} ;- Setup the Spurious Vector .. .. .. .. .. .. str r4, [r1, #AIC_SPU] ; r4 =spurious handler ;--------------------------------------------------------------------------- ;- Default Interrupt Handler ;--------------------------------------------------------------------------- AicData DCD AT91C_BASE_AIC; AIC Base Address IMPORT at91_default_fiq_handler IMPORT at91_default_irq_handler IMPORT at91_spurious_handler PtDefaultHandler DCD at91_default_fiq_handler DCD at91_default_irq_handler DCD at91_spurious_handler EndInitAic Thanx in anticipation Mayank
Armasm: Literal pools?
Started by ●January 15, 2005
Reply by ●January 15, 20052005-01-15