From 2c7f83e006c3fee8d26e940eee801a4be9443e50 Mon Sep 17 00:00:00 2001 From: neoraider Date: Mon, 18 Apr 2005 15:18:02 +0000 Subject: Verzeichnisstruktur ver?ndert --- include/system.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 include/system.h (limited to 'include/system.h') diff --git a/include/system.h b/include/system.h new file mode 100644 index 0000000..9440d6b --- /dev/null +++ b/include/system.h @@ -0,0 +1,21 @@ +#define IN_PORT(p,b) asm("in %1,%0" : "=a" ((unsigned char)(b)) : "d" ((unsigned short)(p)) ) +#define IN_PORT_P(p,b) asm("in %1,%0;in $0x80,%%al" : "=a" ((unsigned char)(b)) : "d" ((unsigned short)(p)) ) +#define IN_PORT_PP(p,b) asm("in %1,%0;in $0x80,%%al;in $0x80,%%al;in $0x80,%%al;in $0x80,%%al" \ + : "=a" ((unsigned char)(b)) : "d" ((unsigned short)(p)) ) +#define OUT_PORT(b,p) asm("out %0,%1" : : "a" ((unsigned char)(b)), "d" ((unsigned short)(p)) ) +#define OUT_PORT_P(b,p) asm("out %0,%1;in $0x80,%%al" : : "a" ((unsigned char)(b)), "d" ((unsigned short)(p)) ) +#define OUT_PORT_PP(b,p) asm("out %0,%1;in $0x80,%%al;in $0x80,%%al;in $0x80,%%al;in $0x80,%%al" \ + : : "a" ((unsigned char)(b)), "d" ((unsigned short)(p)) ) + +#define ANSI2ASCII(x) asm ("mov %0,%%dl;call ansi2ascii;mov %%dl,%0\n" : "+m" (x)) +#define ASCII2ANSI(x) asm ("mov %0,%%dl;call ascii2ansi;mov %%dl,%0\n" : "+m" (x)) + + +void print(unsigned char * text); +void print_attr(unsigned char * text, unsigned char attr); +void print_char(unsigned char text); +void print_char_attr(unsigned char text, unsigned char attr); + +void print_hex_byte(unsigned char hex); +void print_hex_word(unsigned short hex); +void print_hex_long(unsigned long hex); -- cgit v1.2.3