code question about AN3748

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

code question about AN3748

816 Views
carloAT
Contributor I

Hi!

 

In the main file there is this definition of a function pointer:

 

void  (* const _UserEntry[])() @0x000011E4=    // modificato @0x000011C0=
{
  0x4E714EF9,           //asm NOP(0x4E71), asm JMP(0x4EF9)         
  _startup,
};

 

What does the code inside do?

If i look at the memory with the debugger, I see that at address 0x000011C0 there is

4E 71 4E F9 00 00 12 EC

I have never seen this syntax before but I assume that 0x4E714EF9 copy this value in the memory. What's the point of saving this value in memory? There is a comment with a jump. Does it jump to this value?

 

Where 00 00 12 EC come from? Is it the address of _startup?

 

I would be happy if anyone could explain me what this code does.

 

Thanks!

CA

Labels (1)
0 Kudos
1 Reply

279 Views
carloAT
Contributor I
up :smileyhappy:
0 Kudos