29 lines
705 B
C++
29 lines
705 B
C++
#include <dbg.h>
|
|
#include <stdint.h>
|
|
#include <interrupt.h>
|
|
|
|
/* KERNEL MAIN */
|
|
extern "C" int main(int argc, char** argv) {
|
|
printkl("Welcome to STKARM -- Simple and Trivial Kernel for Advanced Reduced Instruction Set Computer Machines");
|
|
|
|
setVectorBAR();
|
|
uint32_t bar = (uint32_t)getVectorBAR();
|
|
printk("BAR is now at ");
|
|
printkl(itoa(bar));
|
|
|
|
uint32_t* table = (uint32_t*)(bar);
|
|
printkl("Vector table content:");
|
|
for (short i = 0; i < 8; ++i) {
|
|
printk(itoa(i)); printk("\t");
|
|
printkl(itoa(table[i]));
|
|
}
|
|
|
|
printkl("Now firing software interrupt...");
|
|
fireswi();
|
|
|
|
printkl("EOK -- End of Kernel -- Now returning to assembly");
|
|
return 0;
|
|
}
|
|
|
|
|