From 7ff724fe8f709440da9c730fdb8dcbaa4f989ed5 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Thu, 13 Aug 2020 23:59:14 -0400 Subject: FAT16 directory enumeration, making many functions static, new 'log' functions to wrap vga and serial --- src/boot.asm | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) (limited to 'src/boot.asm') diff --git a/src/boot.asm b/src/boot.asm index eb3b2c9..c74145c 100644 --- a/src/boot.asm +++ b/src/boot.asm @@ -5,13 +5,12 @@ kernel_sectors equ 64 kernel_segment equ 0x3000 support_flags equ 0x4000 -pci_hw_char equ 0x4001 -pci_ver equ 0x4002 +pci_hw_char equ 0x4001 +pci_ver equ 0x4002 +last_pci_bus equ 0x4004 pci_support equ 0x80 -vesa_segment equ 0x0420 - in al, 0x92 or al, 0x02 out 0x92, al @@ -44,19 +43,9 @@ vesa_segment equ 0x0420 mov byte [support_flags], pci_support mov byte [pci_hw_char], al mov word [pci_ver], bx + mov byte [last_pci_bus], cl no_pci: - mov dword [vesa_segment * 16], 'V' + 'B' * 256 + 'E' * 65535 + '2' * 16777216 - - mov ax, vesa_segment - mov es, ax - xor di, di - mov ax, 0x4f00 - int 0x10 - - cmp ax, 0x004f - jne no_vbe - cli lgdt [gdt] @@ -67,15 +56,6 @@ no_pci: jmp 0x08:pmode -no_vbe: - ;TODO - - cli - -real_halt: - hlt - jmp real_halt - bits 32 pmode: -- cgit v1.2.3