#include <stdarg.h>#include "util.h"Defines | |
| #define | SERIAL_BASE 0x3f8 |
| #define | BASE(ROW) ((unsigned short *) (0xb8000+ROW*160)) |
Functions | |
| void | wait (int ms) |
| Wait roughly a given number of milliseconds. | |
| void | __exit (unsigned status) |
| Print the exit status and reboot the machine. | |
| void | serial_init () |
| int | out_char (unsigned value) |
| Output a single char. | |
| void | out_string (const char *value) |
| Output a string. | |
| void | out_hex (unsigned value, unsigned bitlen) |
| Output a single hex value. | |
| void | out_description (const char *prefix, unsigned int value) |
| Output a string followed by a single hex value, prefixed with a message label. | |
| void | out_info (const char *msg) |
| Output a string, prefixed with a message label. | |
| #define BASE | ( | ROW | ) | ((unsigned short *) (0xb8000+ROW*160)) |
| #define SERIAL_BASE 0x3f8 |
| void __exit | ( | unsigned | status | ) |
Print the exit status and reboot the machine.
| int out_char | ( | unsigned | value | ) |
Output a single char.
lowlevel output functions
Note: We allow only to put a char on the last line.
| void out_description | ( | const char * | prefix, | |
| unsigned int | value | |||
| ) |
Output a string followed by a single hex value, prefixed with a message label.
| void out_hex | ( | unsigned | value, | |
| unsigned | bitlen | |||
| ) |
Output a single hex value.
| void out_info | ( | const char * | msg | ) |
Output a string, prefixed with a message label.
| void out_string | ( | const char * | value | ) |
Output a string.
| void serial_init | ( | void | ) |
| void wait | ( | int | ms | ) |
Wait roughly a given number of milliseconds.
Helper functions.
We use the PIT for this.
1.7.1