29     const char *service, 
int nargs, 
int nret, 
void *a1, 
void *a2, 
void *a3,
    30     void *a4, 
void *a5, 
void *a6)
    43     for (
int i = 6; i < 10; i++)
    48         return pa.args[nargs];
    53 int prom_get_chosen(
char *name, 
void *
mem, 
int len)
    55     return prom_getprop(prom_chosen, name, mem, len);
    58 void prom_init(prom_entry pe)
    62     prom_chosen = prom_finddevice(
"/chosen");
    63     if (prom_chosen == reinterpret_cast<void *>(-1))
    66             const_cast<char *>(
"stdout"), &prom_stdout, 
sizeof(prom_stdout)) <=
    70             const_cast<char *>(
"mmu"), &prom_mmu, 
sizeof(prom_mmu)) <= 0)
    72     prom_screen = prom_finddevice(
"screen");
    73     if (prom_screen == reinterpret_cast<void *>(-1))
    77 void *prom_finddevice(
const char *dev)
    80         "finddevice", 1, 1, reinterpret_cast<void *>(const_cast<char *>(dev)));
    85     call_prom(
"exit", 0, 0);
    89 int prom_getprop(
void *dev, 
char *name, 
void *buf, 
int len)
    91     return reinterpret_cast<int>(call_prom(
    92         "getprop", 4, 1, dev, reinterpret_cast<void *>(name), buf,
    93         reinterpret_cast<void *>(len)));
    96 void prom_putchar(
char c)
   100             "write", 3, 1, prom_stdout,
   101             reinterpret_cast<void *>(const_cast<char *>(
"\r\n")),
   102             reinterpret_cast<void *>(2));
   105             "write", 3, 1, prom_stdout, reinterpret_cast<void *>(&c),
   106             reinterpret_cast<void *>(1));
   109 void prom_map(
unsigned int phys, 
unsigned int virt, 
unsigned int size)
   113         reinterpret_cast<void *>(const_cast<char *>(
"map")),
   114         reinterpret_cast<void *>(prom_mmu), reinterpret_cast<void *>(-1),
   115         reinterpret_cast<void *>(size), reinterpret_cast<void *>(virt),
   116         reinterpret_cast<void *>(phys));