--- Net2/arch/i386/boot/io.c 2018/04/24 18:12:41 1.1 +++ Net2/arch/i386/boot/io.c 2018/04/24 18:20:59 1.1.1.2 @@ -28,11 +28,17 @@ /* * HISTORY - * $Log: io.c,v $ - * Revision 1.1 2018/04/24 18:12:41 root - * Initial revision + * io.c,v + * Revision 1.3 1993/07/11 12:02:24 andrew + * Fixes from bde, including support for loading @ any MB boundary (e.g. a + * kernel linked for 0xfe100000 will load at the 1MB mark) and read-ahead + * buffering to speed booting from floppies. Also works with aha174x + * controllers in enhanced mode. * - * Revision 1.1 1993/03/21 18:08:38 cgd + * Revision 1.2 1993/06/18 02:28:59 cgd + * make it *do* something when loading the kernel, a la sun twiddling-thing + * + * Revision 1.1 1993/03/21 18:08:38 cgd * after 0.2.2 "stable" patches applied * * Revision 2.2 92/04/04 11:35:57 rpd @@ -88,6 +94,8 @@ printf(format,data) { int *dataptr = &data; char c; + + reset_twiddle(); while (c = *format++) if (c != '%') putchar(c); @@ -193,3 +201,25 @@ int len; while (len-- > 0) *to++ = *from++; } + +static int tw_on; +static int tw_pos; +static char tw_chars[] = "|/-\\"; + +reset_twiddle() +{ + if (tw_on) + putchar('\b'); + tw_on = 0; + tw_pos = 0; +} + +twiddle() +{ + if (tw_on) + putchar('\b'); + else + tw_on = 1; + putchar(tw_chars[tw_pos++]); + tw_pos %= (sizeof(tw_chars) - 1); +}