This repository has been archived on 2020-02-06. You can view files and clone it, but cannot push or open issues or pull requests.
Legacy-Sync/headers/common.h
Jenny Curle f6ba6aa117 Legacy OS files. Have an i686-elf-gcc & -ld in your PATH,
and the Makefile will take care of the rest.
2019-04-01 01:38:50 +01:00

27 lines
874 B
C

#ifndef COMMON_H
#define COMMON_H
#include <stdint.h>
//extern void memcpy(void *dest, void *src, unsigned int n);
//extern void memset(void *s, int c, unsigned int n);
//void outb(u16int port, u8int value);
//u8int inb(u16int port);
//u16int inw(u16int port);
extern void memcpy(void *dest, void *src, unsigned int n);
extern void memset(void *s, int c, unsigned int n);
extern unsigned char inb(unsigned short port);
extern void outb(unsigned short port, unsigned char data);
extern unsigned short inw(unsigned short port);
extern void outw(unsigned short port, unsigned short data);
#endif
#define PANIC(msg) panic(msg, __FILE__, __LINE__);
#define ASSERT(b) ((b) ? (void)0 : panic_assert(__FILE__, __LINE__, #b))
extern void panic(const char *message, const char *file, uint32_t line);
extern void panic_assert(const char *file, uint32_t line, const char *desc);