Anonymous user
ARM System Calls: Difference between revisions
no edit summary
[unchecked revision] | [unchecked revision] |
No edit summary |
No edit summary |
||
Line 38:
void __attribute__ ((interrupt ("SWI"))) swi_handler (int r0, int r1, int r2, int r3) {}
</source>
You
<source lang="c">
uint8_t int_vector = 0;
asm volatile ("ldrb %0, [lr, #-2]" : "=r" (int_vector));
</source>
This loads the high 8 bits (16-23) of the argument into <span style="font-family:monospace">int_vector</span>, as loading the full 24-bits won't work using Thumb.
[[Category:ARM]]
[[Category:In Progress]]
|