diff options
Diffstat (limited to 'src/kernel.asm')
| -rw-r--r-- | src/kernel.asm | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/kernel.asm b/src/kernel.asm new file mode 100644 index 0000000..93afff7 --- /dev/null +++ b/src/kernel.asm @@ -0,0 +1,27 @@ +[BITS 32] +global _start + +CODE_SEG equ 0x08 +DATA_SEG equ 0x10 + +; No access to BIOS from now on.... +_start: + ; Set all segments to the same as the DATA_SEG + mov ax, DATA_SEG + mov ds, ax + mov es, ax + mov fs, ax + mov gs, ax + mov ss, ax + + ; Set the stack pointer and base pointer further in mem + mov ebp, 0x00200000 + mov esp, ebp + + ; Enable A20 line + in al, 0x92 + or al, 2 + out 0x92, al + + jmp $ + |
