nshell/src/syscalls.S

41 lines
613 B
ArmAsm
Raw Normal View History

2021-09-02 19:02:54 +02:00
.global __poweroff
.global __battery
.global __battery_type
2021-09-02 19:41:13 +02:00
.global __set_backlight
2021-09-02 19:02:54 +02:00
.section ".text"
#define syscall(id) \
2021-09-02 19:14:35 +02:00
mov.l syscall_table, r2 ;\
mov.l 1f, r0 ;\
jmp @r2 ;\
nop ;\
2021-09-02 19:02:54 +02:00
.align 4 ;\
1: .long id
#ifdef FX9860G
syscall_table:
2021-09-02 19:14:35 +02:00
.long 0x80010070
2021-09-02 19:02:54 +02:00
#endif /* FX9860G */
#ifdef FXCG50
__poweroff:
2021-09-02 19:14:35 +02:00
syscall(0x1839)
2021-09-02 19:02:54 +02:00
__battery:
2021-09-02 19:14:35 +02:00
syscall(0x1186)
2021-09-02 19:02:54 +02:00
__battery_type:
2021-09-02 19:14:35 +02:00
syscall(0x12d5)
2021-09-02 19:02:54 +02:00
2021-09-02 19:41:13 +02:00
__set_backlight:
syscall(0x0199)
2021-09-02 19:02:54 +02:00
syscall_table:
2021-09-02 19:14:35 +02:00
.long 0x80020070
2021-09-02 19:02:54 +02:00
#endif /* FXCG50 */