From aad69e8a6c6712bf7e1782feb94606090263dc4d Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Thu, 1 Sep 2016 20:45:26 -0600 Subject: [PATCH] Reduce bootloader messages --- bootloader/x86_64/bootsector.asm | 54 ++++++++++------------- bootloader/x86_64/startup-common.asm | 2 +- bootloader/x86_64/vesa.asm | 65 ---------------------------- 3 files changed, 25 insertions(+), 96 deletions(-) diff --git a/bootloader/x86_64/bootsector.asm b/bootloader/x86_64/bootsector.asm index cbf466f..ec1db67 100644 --- a/bootloader/x86_64/bootsector.asm +++ b/bootloader/x86_64/bootsector.asm @@ -20,8 +20,6 @@ boot: ; dl comes with disk mov bh, 0 mov bl, [disk] - call print_num - call print_line mov ax, (startup_start - boot) / 512 mov bx, startup_start @@ -65,31 +63,28 @@ load: mov [DAPACK.count], cx mov [DAPACK.seg], dx - mov si, loading - call print - - mov bx, [DAPACK.addr] - call print_num - - mov al, '#' - call print_char - - mov bx, [DAPACK.count] - call print_num - - mov al, ' ' - call print_char - - mov bx, [DAPACK.seg] - call print_num - - mov al, ':' - call print_char - - mov bx, [DAPACK.buf] - call print_num - - call print_line + ; mov bx, [DAPACK.addr] + ; call print_num + ; + ; mov al, '#' + ; call print_char + ; + ; mov bx, [DAPACK.count] + ; call print_num + ; + ; mov al, ' ' + ; call print_char + ; + ; mov bx, [DAPACK.seg] + ; call print_num + ; + ; mov al, ':' + ; call print_char + ; + ; mov bx, [DAPACK.buf] + ; call print_num + ; + ; call print_line mov dl, [disk] mov si, DAPACK @@ -109,10 +104,9 @@ error: %include "print16.asm" -name: db "Redox Loader",0 -loading: db "Load ",0 +name: db "Redox Loader - Stage One",0 errored: db "Could not read disk",0 -finished: db "Finished Loading",0 +finished: db "Redox Loader - Stage Two",0 line: db 13,10,0 disk: db 0 diff --git a/bootloader/x86_64/startup-common.asm b/bootloader/x86_64/startup-common.asm index f582418..2da1fe9 100644 --- a/bootloader/x86_64/startup-common.asm +++ b/bootloader/x86_64/startup-common.asm @@ -14,7 +14,7 @@ startup: ; buffersize in multiple of sectors (512 Bytes) ; min 1 ; max (0x70000 - startup_end) / 512 -buffer_size_sectors equ 512 +buffer_size_sectors equ 64 ; buffer size in Bytes buffer_size_bytes equ buffer_size_sectors * 512 diff --git a/bootloader/x86_64/vesa.asm b/bootloader/x86_64/vesa.asm index 8dadf2a..2135910 100644 --- a/bootloader/x86_64/vesa.asm +++ b/bootloader/x86_64/vesa.asm @@ -13,71 +13,6 @@ vesa: .edid: cmp dword [.required], 0 ;if both required x and required y are set, forget this jne near .findmode - mov ax, 0x4F15 - mov bx, 1 - xor cx, cx - xor dx, dx - mov di, VBEEDID - int 0x10 - cmp ax, 0x4F - jne near .noedid - xor di, di -.lp: - xor cx, cx - mov cl, [di+VBEEDID.standardtiming] - shl cx, 3 - add cx, 248 - push ecx - call decshowrm - mov al, 'x' - call charrm - pop ecx - mov bx, cx - inc di - mov al, [di+VBEEDID.standardtiming] - and al, 11000000b - cmp al, VBEEDID.aspect.4.3 - jne .not43 - mov ax, 3 - mul cx - mov cx, ax - shr cx, 2 - jmp .gotres -.not43: - cmp al, VBEEDID.aspect.5.4 - jne .not54 - shl cx, 2 - mov ax, cx - mov cx, 5 - xor dx, dx - div cx - mov cx, ax - jmp .gotres -.not54: - cmp al, VBEEDID.aspect.16.10 - jne .not1610 - mov ax, 10 - mul cx - mov cx, ax - shr cx, 4 - jmp .gotres -.not1610: - mov ax, 9 - mul cx - mov cx, ax - shr cx, 4 -.gotres: - call decshowrm - mov si, .edidmsg - call printrm - inc di - cmp di, 8 - jb .lp - jmp .findmode -.noedid: - mov si, .noedidmsg - call printrm - jmp .findmode .resetlist: ;if needed, reset mins/maxes/stuff xor cx, cx