From 59757b7b70f52eda2e4b70b3aed9218f1f3b2818 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Hord=C3=A9?= Date: Mon, 2 Apr 2007 13:21:28 +0000 Subject: [PATCH] =?UTF-8?q?feat:=20ensemble=20de=20fonctions=20permettant?= =?UTF-8?q?=20la=20gestion=20de=20l'affichage=20de=20fa=C3=A7on=20ind?= =?UTF-8?q?=C3=A9pendante=20du=20mat=C3=A9riel=20(console/STDOUT)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/video.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lib/video.c diff --git a/lib/video.c b/lib/video.c new file mode 100644 index 0000000..54fd7e9 --- /dev/null +++ b/lib/video.c @@ -0,0 +1,29 @@ +#include "vga.h" +#include "video.h" + +/*******************************************************************************/ + +/* affiche une chaine de caractère a l'écran */ + +void print(u8* string) +{ + u8 *source; + source = string; + while(*source!=0x00) + { + showchar(*source++); + } +} + +/*******************************************************************************/ + +/* affiche un octet sous forme hexadécimale a l'ecran */ + +void showhex(u8 src) +{ + static u8 hexadigit[16] = "0123456789ABCDEF"; + showchar(hexadigit[(src&0xF0)>>4]); + showchar(hexadigit[src&0x0F]); +} + +/*******************************************************************************/