Files
player/Project/Src/MyApp/c_asm.c

23 lines
233 B
C
Raw Normal View History

2025-06-27 00:32:57 +08:00
#include "stm32f4xx.h"
2025-06-28 22:15:49 +08:00
void *get_r9(void) {
void *r0;
__asm volatile (
"MOV %0, r9" : "=r" (r0)
);
return r0;
2025-06-27 00:32:57 +08:00
}
2025-06-28 22:15:49 +08:00
void set_r9(void *r9) {
__asm volatile (
"MOV r9, %0" : : "r" (r9)
);
2025-06-27 00:32:57 +08:00
}