12 lines
365 B
C
12 lines
365 B
C
#include <syscall.h>
|
|
#include <stdio.h>
|
|
|
|
int syscall_handle(cpu_status_t* status, uint32_t origin){
|
|
uint32_t id = status->r[0];
|
|
printf("\e[32mpc: %8x syscall %8x\e[39m\n", origin, status->r[0]);
|
|
if(id == 0x3fa) NULL;
|
|
if(id == 0x144) syscall_bdisp_allclr_ddvram(status);
|
|
if(id == 0x807) syscall_locate(status);
|
|
|
|
status->pc = status->pr;
|
|
} |