[LinksOS CVS Commit]kernel/hal/x86 kstdio.cpp,1.4,1.5
Status: Inactive
Brought to you by:
terencevs
|
From: <ke...@to...> - 2003-01-13 02:35:19
|
Update of /cvsroot/linksos/kernel/hal/x86 In directory router-internal.tossell.net:/tmp/cvs-serv7935/hal/x86 Modified Files: kstdio.cpp Log Message: Title: Namespaced. Changes: Broken inportb, outportb, and kstdio into namespace hal. Effects: hal::raw::inportb hal::raw::outportb hal::kio::printf a=kennyt b=19 Index: kstdio.cpp =================================================================== RCS file: /cvsroot/linksos/kernel/hal/x86/kstdio.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** kstdio.cpp 4 Jan 2003 08:36:07 -0000 1.4 --- kstdio.cpp 13 Jan 2003 02:35:13 -0000 1.5 *************** *** 11,18 **** #include "types.h" ! #include "kstdio.h" ! #include "io.h" ! void kprintf(char* text) /* kernel-mode printf: to be used ONLY within the kernel and ONLY in text-mode. any other mode can be disastrous, as this code does not --- 11,17 ---- #include "types.h" ! #include "hal.h" ! void hal::kio::printf(char* text, ...) /* kernel-mode printf: to be used ONLY within the kernel and ONLY in text-mode. any other mode can be disastrous, as this code does not *************** *** 27,35 **** /*First get the cursor's current position on screen*/ ! outportb(0x3d4, 0x0e); /* Get cursor Y position */ ! off = inportb(0x3d5); off <<= 8; ! outportb(0x3d4, 0x0f); /* And add cursor X position */ ! off += inportb(0x3d5); off <<= 1; --- 26,34 ---- /*First get the cursor's current position on screen*/ ! hal::raw::outportb(0x3d4, 0x0e); /* Get cursor Y position */ ! off = hal::raw::inportb(0x3d5); off <<= 8; ! hal::raw::outportb(0x3d4, 0x0f); /* And add cursor X position */ ! off += hal::raw::inportb(0x3d5); off <<= 1; *************** *** 49,56 **** /*Move cursor to new screen position*/ off >>= 1; ! outportb(0x3d4,0x0f); ! outportb(0x3d5,off & 0x0ff); ! outportb(0x3d4,0x0e); ! outportb(0x3d5,off >> 8); } --- 48,55 ---- /*Move cursor to new screen position*/ off >>= 1; ! hal::raw::outportb(0x3d4,0x0f); ! hal::raw::outportb(0x3d5,off & 0x0ff); ! hal::raw::outportb(0x3d4,0x0e); ! hal::raw::outportb(0x3d5,off >> 8); } |