nshell/src/syscalls.S

61 lines
898 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-08 22:16:40 +02:00
.global __set_quit_handler
2021-09-19 20:52:05 +02:00
.global __name_to_str
.global __str_to_name
.global __find_first
.global __find_next
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-08 22:16:40 +02:00
__set_quit_handler:
syscall(0x1E6E)
2021-09-19 20:52:05 +02:00
__name_to_str:
syscall(0x1ddb)
__str_to_name:
syscall(0x1ddc)
__find_first:
syscall(0x1db6)
__find_next:
syscall(0x1db8)
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 */