diff options
| author | Aleksa Vučković <aleksav013@gmail.com> | 2022-05-28 23:54:02 +0200 |
|---|---|---|
| committer | Aleksa Vučković <aleksav013@gmail.com> | 2022-05-28 23:55:03 +0200 |
| commit | e9424374b0f33c53d41ec4f5bbe13c9c9b1319f5 (patch) | |
| tree | 8e92a6f98ee02a03b48ab61881cb9bc5a4a2f45d /include | |
| parent | 1abaec702595623d6d00f33d6e78494ccec1db86 (diff) | |
glavna funkcija
Diffstat (limited to 'include')
| -rw-r--r-- | include/06.keyboard/keyboard.c | 1 | ||||
| -rw-r--r-- | include/06.keyboard/keyboard17.c | 8 | ||||
| -rw-r--r-- | include/06.keyboard/keyboard18.c | 15 | ||||
| -rw-r--r-- | include/06.keyboard/keyboard19.c | 7 | ||||
| -rw-r--r-- | include/12.kernel/kernel.c | 24 | ||||
| -rwxr-xr-x | include/setup.sh | 6 |
6 files changed, 44 insertions, 17 deletions
diff --git a/include/06.keyboard/keyboard.c b/include/06.keyboard/keyboard.c index ab31315..5242bb0 100644 --- a/include/06.keyboard/keyboard.c +++ b/include/06.keyboard/keyboard.c @@ -150,6 +150,7 @@ void keyboard_handler() { c=shift_charcode[keycode]; } + if(buffer_index<BUFFER_SIZE) { buffer[buffer_current][buffer_index++]=c; diff --git a/include/06.keyboard/keyboard17.c b/include/06.keyboard/keyboard17.c index 171088f..e82af45 100644 --- a/include/06.keyboard/keyboard17.c +++ b/include/06.keyboard/keyboard17.c @@ -15,11 +15,3 @@ { c=shift_charcode[keycode]; } - if(buffer_index<BUFFER_SIZE) - { - buffer[buffer_current][buffer_index++]=c; - printf("%c",c); - } - } - break; - } diff --git a/include/06.keyboard/keyboard18.c b/include/06.keyboard/keyboard18.c index d594130..367841a 100644 --- a/include/06.keyboard/keyboard18.c +++ b/include/06.keyboard/keyboard18.c @@ -1,7 +1,8 @@ - } - else - { - ispressed[keycode-0x80]=0; - } - } -} + if(buffer_index<BUFFER_SIZE) + { + buffer[buffer_current][buffer_index++]=c; + printf("%c",c); + } + } + break; + } diff --git a/include/06.keyboard/keyboard19.c b/include/06.keyboard/keyboard19.c new file mode 100644 index 0000000..d594130 --- /dev/null +++ b/include/06.keyboard/keyboard19.c @@ -0,0 +1,7 @@ + } + else + { + ispressed[keycode-0x80]=0; + } + } +} diff --git a/include/12.kernel/kernel.c b/include/12.kernel/kernel.c new file mode 100644 index 0000000..72b2516 --- /dev/null +++ b/include/12.kernel/kernel.c @@ -0,0 +1,24 @@ +#include<source/kernel.h> +#include<source/paging.h> +#include<source/idt.h> +#include<source/timer.h> +#include<source/keyboard.h> +#include<source/heap.h> +#include<source/vga.h> +#include<source/tty.h> + + +void kernel_main(void) +{ + set_paging(); + init_idt_table(); + init_timer(50); + init_keyboard(); + kheapinit(); + kheapaddblock(0x00200000, 0x00100000, 16); + + terminal_initialize(); + prompt(); + + while(1) __asm__("hlt\n\t"); +} diff --git a/include/setup.sh b/include/setup.sh index 86645fd..09b71b9 100755 --- a/include/setup.sh +++ b/include/setup.sh @@ -1,8 +1,8 @@ #!/bin/sh -rm -rf "00.build" "01.pocetak" "02.vga" "03.gdt" "04.idt" "05.irq" "06.keyboard" "07.pit" "08.heap" "09.paging" "10.libc" +rm -rf "00.build" "01.pocetak" "02.vga" "03.gdt" "04.idt" "05.irq" "06.keyboard" "07.pit" "08.heap" "09.paging" "10.libc" "12.kernel" -mkdir "00.build" "01.pocetak" "02.vga" "03.gdt" "04.idt" "05.irq" "06.keyboard" "07.pit" "08.heap" "09.paging" "10.libc" +mkdir "00.build" "01.pocetak" "02.vga" "03.gdt" "04.idt" "05.irq" "06.keyboard" "07.pit" "08.heap" "09.paging" "10.libc" "12.kernel" cp ../../aleksa-toolchain/setup.sh 00.build cp ../../mykernel/Makefile ./00.build/Makefile @@ -57,3 +57,5 @@ awk -v RS= '{print > ("paging" NR ".c")}' paging.c cd .. cp -r ../../mykernel/src/include/* ./10.libc + +cp -r ../../mykernel/src/c/kernel.c ./12.kernel |
