Compare commits

...

5 Commits

Author SHA1 Message Date
aramya
e4435696ae entry 2023-07-03 11:34:24 +01:00
aramya
4cdd5445f7 gitignore 2023-07-03 11:30:57 +01:00
aramya
48306c066f int32_t 2023-07-03 11:30:04 +01:00
aramya
9da011a73c Press any key 2023-07-03 11:15:05 +01:00
aramya
720f391a10 puts function 2023-07-03 11:09:00 +01:00
5 changed files with 25 additions and 4 deletions

4
.gitignore vendored
View File

@ -1,4 +1,4 @@
*.elf *.elf
*.bin *.bin
DISK.APM *.APM
*.txt bootinfo.txt

View File

@ -6,5 +6,5 @@
ofw_arg.n_args = args; \ ofw_arg.n_args = args; \
ofw_arg.n_rets = rets; ofw_arg.n_rets = rets;
typedef int phandle; typedef int32_t phandle;
typedef int ihandle; typedef int32_t ihandle;

View File

@ -10,9 +10,14 @@ void __eabi(void)
{ {
} }
//void* ofw_interpret(char* cmd, int32_t* stack_args, int n_stack_args, int n_ret_args, int32_t* reta
void main(void) void main(void)
{ {
puts("Press any key to continue", 25);
ofw_interpret("blink-screen", 0, 0, 0, 0); ofw_interpret("blink-screen", 0, 0, 0, 0);
ofw_interpret("key", 0, 0, 1, (int32_t*)0x03020000);
puts("Starting...", 11);
if (ofw_test("open")) if (ofw_test("open"))
{ {
asm("mr 27, 28"); asm("mr 27, 28");

16
src/lib/common.c Normal file
View File

@ -0,0 +1,16 @@
#include <ofw.h>
void puts(char* str, int len)
{
char cmd[len+8];
cmd[0] = '.'; cmd[1] = '"';
cmd[2] = ' ';
for (int i = 3; i < len+3; i++)
{
cmd[i] = str[i-3];
}
cmd[len+3] = '"'; cmd[len+4] = ' ';
cmd[len+5] = 'c'; cmd[len+6] = 'r';
cmd[len+7] = 0;
ofw_interpret(cmd, 0, 0, 0, 0);
}