ARM System Calls: Difference between revisions
Jump to navigation
Jump to search
[unchecked revision] | [unchecked revision] |
Content deleted Content added
m ARM System Calss moved to ARM System Calls |
No edit summary |
||
Line 40: | Line 40: | ||
You have probably noticed from the first example "swi 42", that the "swi" instruction takes an integer as an argument. To get this argument from the C code, you do: |
You have probably noticed from the first example "swi 42", that the "swi" instruction takes an integer as an argument. To get this argument from the C code, you do: |
||
<source lang="c"> |
<source lang="c"> |
||
uint32_t int_vector = 0; |
|||
asm volatile ("ldr %0, [lr, #-8]" : "=r" (int_vector)); |
asm volatile ("ldr %0, [lr, #-8]" : "=r" (int_vector)); |
||
int_vector &= 0xFFFFFF; |
int_vector &= 0xFFFFFF; |