#include "gbos.h" /* help: list every command the shell knows. The kernel owns the name table * (sys_lookup searches it), so walk program ids and ask for each one's name - * the box had no way to discover what it can do. */ void main(void) { char name[16]; unsigned char id, col = 0; for (id = 0; id < 64; id++) { name[0] = 0; progname(id, name); name[15] = 0; if (!name[0]) continue; if (lookup(name) == NOFD) continue; /* not reachable from the shell */ puts(name); col = (unsigned char)(col + 1); if (col == 4) { nl(); col = 0; } else { unsigned char k = strlen(name); while (k++ < 10) putc(' '); } } if (col) nl(); }