When I new a project in Keil, It give me a LPC2400.s which contain the following code: Vectors LDR PC, Reset_Addr LDR PC, Undef_Addr LDR PC, SWI_Addr LDR PC, PAbt_Addr LDR PC, DAbt_Addr NOP ; Reserved Vector ; LDR PC, IRQ_Addr LDR PC, [PC, #-0x0120] ; Vector from VicVectAddr LDR PC, FIQ_Addr why the default startup code use "LDR PC, [PC, #-0x0120]" instead of "LDR PC, IRQ_Addr",
![]() |
0 |
![]() |
My main code is very simple ( an LED Blink program ) I found that : For my program, there is no difference between "LDR PC, IRQ_Addr" and "LDR PC, [PC, #-0x0120]". WHY? int main(void) { PINSEL7=0x00000000; FIO3DIR = LED9 | LED10; while(1) { FIO3CLR=LED10; FIO3CLR=LED9; sysDelayNS(600); FIO3SET=LED9; sysDelayNS(600); FIO3SET=LED10; FIO3CLR=LED9; sysDelayNS(600); FIO3SET=LED9; sysDelayNS(600); } return 0; } On Mar 30, 11:29 am, adroit <adroitadroit2...@hotmail.com> wrote: > When I new a project in Keil, It give me a LPC2400.s which contain the > following code: > > Vectors LDR PC, Reset_Addr > LDR PC, Undef_Addr > LDR PC, SWI_Addr > LDR PC, PAbt_Addr > LDR PC, DAbt_Addr > NOP ; Reserved Vector > ; LDR PC, IRQ_Addr > LDR PC, [PC, #-0x0120] ; Vector from > VicVectAddr > LDR PC, FIQ_Addr > > why the default startup code use > > "LDR PC, [PC, #-0x0120]" > > instead of > > "LDR PC, IRQ_Addr",
![]() |
0 |
![]() |
From the comment of LPC2400.s, I know that LDR PC, [PC, #-0x0120]" ; Vector from VicVectAddr means goto Vector from VicVectAddr. But I do NOT provide any code for Interrupt Service Routine, So, My question is 1. Where is Vector from VicVectAddr? 2. What is in Vector from VicVectAddr? On Mar 30, 2:39 pm, adroit <adroitadroit2...@hotmail.com> wrote: > My main code is very simple ( an LED Blink program ) > > I found that : For my program, there is no difference between "LDR > PC, IRQ_Addr" and "LDR PC, [PC, #-0x0120]". > > WHY? > > int main(void) > { > PINSEL7=0x00000000; > FIO3DIR = LED9 | LED10; > > while(1) > { > FIO3CLR=LED10; > > FIO3CLR=LED9; > sysDelayNS(600); > FIO3SET=LED9; > sysDelayNS(600); > > FIO3SET=LED10; > > FIO3CLR=LED9; > sysDelayNS(600); > FIO3SET=LED9; > sysDelayNS(600); > } > > return 0; > > } > > On Mar 30, 11:29 am, adroit <adroitadroit2...@hotmail.com> wrote: > > > > > When I new a project in Keil, It give me a LPC2400.s which contain the > > following code: > > > Vectors LDR PC, Reset_Addr > > LDR PC, Undef_Addr > > LDR PC, SWI_Addr > > LDR PC, PAbt_Addr > > LDR PC, DAbt_Addr > > NOP ; Reserved Vector > > ; LDR PC, IRQ_Addr > > LDR PC, [PC, #-0x0120] ; Vector from > > VicVectAddr > > LDR PC, FIQ_Addr > > > why the default startup code use > > > "LDR PC, [PC, #-0x0120]" > > > instead of > > > "LDR PC, IRQ_Addr",- Hide quoted text - > > - Show quoted text -
![]() |
0 |
![]() |
Op Mon, 30 Mar 2009 08:45:21 +0200 schreef adroit <adroitadroit2006@hotmail.com>: > 1. Where is Vector from VicVectAddr? It can usually be found in VicVectAddr. > 2. What is in Vector from VicVectAddr? Whatever was programmed in it, probably either by you or by the startup code. -- Gemaakt met Opera's revolutionaire e-mailprogramma: http://www.opera.com/mail/
![]() |
0 |
![]() |