2023-07-01 20:31:17 +00:00
|
|
|
#include <ofw.h>
|
|
|
|
|
2023-07-01 11:07:36 +00:00
|
|
|
void (*ofw)();
|
|
|
|
void __eabi();
|
|
|
|
|
2023-07-01 02:52:59 +00:00
|
|
|
void __stack_chk_fail_local(void)
|
2021-09-23 13:13:49 +00:00
|
|
|
{
|
2021-09-30 17:18:01 +00:00
|
|
|
}
|
2023-07-01 02:52:59 +00:00
|
|
|
void __eabi(void)
|
2021-09-30 17:18:01 +00:00
|
|
|
{
|
2022-11-30 20:20:40 +00:00
|
|
|
}
|
|
|
|
|
2023-07-03 10:09:00 +00:00
|
|
|
//void* ofw_interpret(char* cmd, int32_t* stack_args, int n_stack_args, int n_ret_args, int32_t* reta
|
2023-07-01 02:52:59 +00:00
|
|
|
void main(void)
|
2022-11-30 20:20:40 +00:00
|
|
|
{
|
2023-07-03 10:15:05 +00:00
|
|
|
puts("Press any key to continue", 25);
|
2023-07-02 10:43:32 +00:00
|
|
|
ofw_interpret("blink-screen", 0, 0, 0, 0);
|
2023-07-03 10:09:00 +00:00
|
|
|
ofw_interpret("key", 0, 0, 1, (int32_t*)0x03020000);
|
2023-07-03 10:15:05 +00:00
|
|
|
|
|
|
|
puts("Starting...", 11);
|
2023-07-02 10:43:32 +00:00
|
|
|
if (ofw_test("open"))
|
2022-11-30 20:20:40 +00:00
|
|
|
{
|
2023-07-01 02:52:59 +00:00
|
|
|
asm("mr 27, 28");
|
|
|
|
asm("b $");
|
2022-11-30 20:20:40 +00:00
|
|
|
}
|
2023-07-01 02:52:59 +00:00
|
|
|
else
|
2021-10-11 09:36:11 +00:00
|
|
|
{
|
2023-07-01 02:52:59 +00:00
|
|
|
asm("mr 30, 31");
|
|
|
|
asm("b $");
|
2021-10-11 09:36:11 +00:00
|
|
|
}
|
2021-09-23 13:13:49 +00:00
|
|
|
}
|