Merge branch 'main' of gitlab.ibr.cs.tu-bs.de:vss/teaching/ss25/v_bsb1/Gruppe_018

main
Eggert Jung 6 months ago
commit 220bdd8b77

@ -7,6 +7,8 @@
#include "../debug/kernelpanic.h" #include "../debug/kernelpanic.h"
#include "../debug/output.h" #include "../debug/output.h"
#include "../device/ps2controller.h"
void printContext(const InterruptContext *context) { void printContext(const InterruptContext *context) {
DBG << "ip: " << hex << context->cs << ':' << context->ip DBG << "ip: " << hex << context->cs << ':' << context->ip
<< " sp: " << context->ss << ':' << context->sp << " flags" << bin << " sp: " << context->ss << ':' << context->sp << " flags" << bin
@ -65,8 +67,13 @@ enum PAGE_FAULT_ERROR {
kernelpanic("Page fault!"); kernelpanic("Page fault!");
} }
extern TextStream kout;
void handle_keyboard() { void handle_keyboard() {
dout[0] << "test"<<endl<<flush; //dout[0] << "test"<<endl<<flush;
Key key = Key();
if (PS2Controller::fetch(key)) {
kout << key.ascii() << flush ;
}
} }
[[gnu::interrupt]] void handle_panic(InterruptContext *context) { [[gnu::interrupt]] void handle_panic(InterruptContext *context) {

@ -95,12 +95,9 @@ extern "C" int main() {
Core::Interrupt::enable(); Core::Interrupt::enable();
Key key = Key();
while (true){ while (true){
if (PS2Controller::fetch(key)) {
kout << key.ascii() << flush ;
}
} }
return 0; return 0;
} }

Loading…
Cancel
Save