| plan 9 kernel history: overview | file list | diff list |
1991/0702/pc/main.c (diff list | history)
| 1991/0629/sys/src/9/pc/main.c:1,56 – 1991/0702/sys/src/9/pc/main.c:1,39 (short | long | prev | next) | ||
| 1991/0629 |
| |
| 1991/0702 | #include "u.h" #include "lib.h" #include "dat.h" #include "fns.h" | |
| 1991/0629 |
| |
| 1991/0702 | main(void) | |
| 1991/0625 | { | |
| 1991/0629 |
| |
| 1991/0702 | for(;;){ print("%x ", kbdc()); | |
| 1991/0629 | } | |
| 1991/0625 | } | |
| 1991/0629 | void | |
| 1991/0702 | delay(int l) | |
| 1991/0625 | { | |
| 1991/0629 |
| |
| 1991/0625 |
| |
| 1991/0702 | int i; | |
| 1991/0625 | ||
| 1991/0629 |
| |
| 1991/0625 |
| |
| 1991/0629 |
| |
| 1991/0702 | while(--l){ for(i=0; i < 10000; i++) ; } | |
| 1991/0625 | } | |
| 1991/0629 |
| |
| 1991/0702 | int sprint(char *s, char *fmt, ...) | |
| 1991/0625 | { | |
| 1991/0629 |
| |
| 1991/0702 | return doprint(s, s+PRINTSIZE, fmt, (&fmt+1)) - s; | |
| 1991/0625 | } | |
| 1991/0629 |
| |
| 1991/0702 | int print(char *fmt, ...) | |
| 1991/0629 | { | |
| 1991/0702 | char buf[PRINTSIZE]; int n; | |
| 1991/0629 | ||
| 1991/0702 | n = doprint(buf, buf+sizeof(buf), fmt, (&fmt+1)) - buf; screenputs(buf, n); return n; } | |