Fix shift state and address BSS issue
This commit is contained in:
parent
3abf49f881
commit
95c0371065
2 changed files with 6 additions and 4 deletions
|
@ -63,6 +63,6 @@ As I don't quite get how segments work in real mode, there are most likely error
|
||||||
|
|
||||||
I reserve 32KiB of SFS reserved area for the ELF file of the kernel. This is currently for "historic reasons" (a.k.a. I'm too lazy to load the filesystem in the bootloader). The kernel then handles the filesystem.
|
I reserve 32KiB of SFS reserved area for the ELF file of the kernel. This is currently for "historic reasons" (a.k.a. I'm too lazy to load the filesystem in the bootloader). The kernel then handles the filesystem.
|
||||||
|
|
||||||
### Second ELF program header does not get loaded
|
### BSS does not get cleared
|
||||||
|
|
||||||
This will most likely fix the issue of missing global strings.
|
I do calculate the size of the BSS, so either I intialize every variable in a function or things like global variables that are false by default don't work. It does work in emulators because they initialize all memory to 0, but real computerss don't always do that.
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
|
|
||||||
#define KEY_QUEUE_EMPTY FIFO_QUEUE_EMPTY
|
#define KEY_QUEUE_EMPTY FIFO_QUEUE_EMPTY
|
||||||
|
|
||||||
bool keyboard_shift_state = false;
|
bool keyboard_shift_state;
|
||||||
bool keyboard_caps_state = false;
|
bool keyboard_caps_state;
|
||||||
|
|
||||||
fifo* key_queue = NULL;
|
fifo* key_queue = NULL;
|
||||||
|
|
||||||
|
@ -72,6 +72,8 @@ char getchar() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void keyboard_init() {
|
void keyboard_init() {
|
||||||
|
keyboard_shift_state = false;
|
||||||
|
keyboard_caps_state = false;
|
||||||
key_queue = fifo_new();
|
key_queue = fifo_new();
|
||||||
|
|
||||||
uint8_t mask = inb(0x21);
|
uint8_t mask = inb(0x21);
|
||||||
|
|
Loading…
Reference in a new issue