From ca3eebd69239f7be68e7637111cdd01ccc1e59fc Mon Sep 17 00:00:00 2001 From: Nero <41307858+nero@users.noreply.github.com> Date: Thu, 15 Oct 2020 20:20:17 +0000 Subject: [PATCH] Remove fields from BPB that are EBPB actually This is just a trick so i can use bpb_size in the kernel later, omitting things that are not relevant to interfacing the FS. --- boot/fat.asm | 4 ++-- inc/bpb.asm | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/boot/fat.asm b/boot/fat.asm index 5a71de7..d06e5dd 100644 --- a/boot/fat.asm +++ b/boot/fat.asm @@ -75,7 +75,7 @@ read: push ax ; dl bit 6-7: cylinder bits 8-9 mov cx, dx mov dh, al - mov dl, [bp+bpb.drivenum] + mov dl, [bp-1] mov ax, 0x0201 mov bx, di @@ -128,7 +128,7 @@ resetbuf: ; DS = ES ret main: mov bp, params - mov [bp+bpb.drivenum], dl + mov [bp-1], dl ; load root directory call resetbuf diff --git a/inc/bpb.asm b/inc/bpb.asm index cefec16..f2e170a 100644 --- a/inc/bpb.asm +++ b/inc/bpb.asm @@ -11,8 +11,4 @@ struc bpb .heads: resw 1 ; WORD number of sides .sectoroffset: resd 1 ; DWORD partition offset .longtotal: resd 1 ; DWORD large total sectors -.drivenum: resb 1 ; BYTE drive number -.flags: resb 1 -.signature: resb 1 ; BYTE 28h -.serial: resb 4 ; DWORD serial endstruc