This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

org 0000h how to specify in keil c

Hi
all iam working c8051f020 ,iam new to microcontroller field ,
In assembly we specify org 0000h ,
but how it can be specified in keil c why bcos as soon as iam doing single stepping my programme the control is jumping to 0FA2H,instead of 0000h
how can i run programme from 0000h in C(keil c)
kidnly provide some solution

regards
james

  • The 8051 hardware will ALWAYS begin execution at address 0x0000 - that's the way the hardware works.

    When you write in 'C', it will place code at 0x0000 to jump to the startup code in startup.a51 - see the C51 Manual for details.

    When it's finished, startup.a51 jumps to Keil's runtime startup code - and it is this startup code that eventually calls your main() function.

    Thus you can see that "run programme from 0000h in C(keil c)" is actually meaningless.

  • hi
    neil thanks for your valuable reply .

    regards
    james d