NOVA User-Level Environment  Version testbox/changed-memory-timing-317-g320d8b5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
util.c File Reference
#include <stdarg.h>
#include "util.h"

Macros

#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.
int strcmp (char const *s1, char const *s2)
int isspace (int c)
unsigned long strtoul (char const *ptr, char const **end, int base)
char * get_arg (char **line, char delim)

Macro Definition Documentation

#define BASE (   ROW)    ((unsigned short *) (0xb8000+ROW*160))
#define SERIAL_BASE   0x3f8

Function Documentation

void __exit ( unsigned  status)

Print the exit status and reboot the machine.

char* get_arg ( char **  line,
char  delim 
)
int isspace ( int  c)
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  )
int strcmp ( char const *  s1,
char const *  s2 
)
unsigned long strtoul ( char const *  ptr,
char const **  end,
int  base 
)
void wait ( int  ms)

Wait roughly a given number of milliseconds.

Helper functions.

We use the PIT for this.