Like:
Code: Select all
VideoHandle = OpenCoreDevice("/dev/video");
CoreDeviceSpecial(VideoHandle, 0, 0, 4000); // clear screen
CoreDeviceSpecial(VideoHandle, (char*)0x1, 0, 0); // move cursor to start of screen
// Close handle, the rest is up to our console manager
CloseCoreDevice(VideoHandle);
My question is: When I get an interrupt from the keyboard, my handler for this one, could simply write the character to the screen, but I want my console driver to catch this one, but that would mean I'll have to either move the keyboard handler to the console driver or I would have to use a buffer?? (e.g. I have this function to tell the keyboard driver where this buffer is) I don't know what is the best solution.
I think moving the keyboard interrupt handler works best, but however it undermines the keyboard driver, because it relies on the console driver, which I don't like because there goes my modularity.
So should I use a buffer or use a direct output method??