Removed old junk

master
E. Almqvist 3 years ago
parent 507c8bdb2b
commit b45ed4263f
  1. 13
      drivers/vga.c
  2. 1
      drivers/vga.h
  3. 8
      kernel/idt.c
  4. 1
      kernel/idt.h
  5. 8
      kernel/isr.asm

@ -75,8 +75,8 @@ void new_line() {
}
void println(char* str, int attribute_byte) {
if( cursor_row > MAX_ROWS ) {
set_cursor_pos(0, MAX_ROWS);
if( cursor_row >= MAX_ROWS ) {
set_cursor_pos(0, 0);
println(str, attribute_byte);
return;
}
@ -84,15 +84,6 @@ void println(char* str, int attribute_byte) {
new_line();
}
void printint(int i, int attribute_byte) {
/*
char* strbuf;
strbuf = int_to_str(i, strbuf);
println(strbuf, attribute_byte);
*/
}
void printalign(char* str, int attribute_byte, enum align alignment) {
uint strlenbuf = strlen(str);

@ -21,6 +21,5 @@ void set_cursor_pos();
void print();
void println();
void new_line();
void printint(int i, int attribute_byte);
void printalign(char* str, int attribute_byte, enum align alignment);
void vga_init();

@ -18,17 +18,17 @@ static idt_entry IDT[IDT_MAX_DESCS];
static idtr IDTR;
void exception_handler() {
uint* debug_ptr = 0xe222;
uint8 debug = *debug_ptr;
uint* irq_ptr = 0xe222;
uint8 irq = *irq_ptr;
char* buf;
print("[exc] ", EXC_COLOR);
buf = itoa(debug, buf, 10);
buf = itoa(irq, buf, 10);
print(buf, 0x0c);
new_line();
__asm__ __volatile__("cli; hlt");
pic_send_eoi(irq);
}
void idt_set_desc(uint8 idx, void* isr, uint8 flags) {

@ -1,4 +1,5 @@
#include "../lib/types.h"
#include "pic.h"
#define IDT_MAX_DESCS 256
#define EXC_COLOR 0x08

@ -7,6 +7,8 @@ isr_stub_%+%1:
; Handle the exception
call exception_handler
cli
hlt
iret
%endmacro
@ -14,13 +16,15 @@ isr_stub_%+%1:
isr_stub_%+%1:
mov [isr_debug_ptr], byte %1
call exception_handler
cli
;hlt
iret
%endmacro
extern exception_handler
isr_no_err_stub 0
; TODO: make keeb drivers
isr_err_stub 1 ; keyboard : noerr
isr_err_stub 1
isr_no_err_stub 2
isr_no_err_stub 3
isr_no_err_stub 4
@ -28,7 +32,7 @@ isr_no_err_stub 5
isr_no_err_stub 6
isr_no_err_stub 7
isr_err_stub 8 ; err
isr_no_err_stub 9
isr_no_err_stub 9 ; keyboard?
isr_err_stub 10
isr_err_stub 11
isr_err_stub 12

Loading…
Cancel
Save