fixed read_disk_raw in ReadFATCluster

boot_drive and partition_offset are global pointers now
removed an extra error from mbr disk read
and some general formating and cleanup 😅
This commit is contained in:
2024-10-05 20:14:00 -04:00
parent f5f5a330cd
commit 4c4c3b0e27
5 changed files with 19 additions and 30 deletions

View File

@@ -23,16 +23,14 @@
[CPU KATMAI]
jmp short init
nop
; boot drive in dl
; active partition offset in si
; ###############
;
; Headers/Includes/Definitions
;
; ###############
%define __STEVIA_STAGE2
%define __STEVIA_STAGE2
%include "cdecl16.inc"
%include "entry.inc"
@@ -43,6 +41,7 @@ nop
; ###############
; End Section
; ###############
ALIGN 4, db 0x90
init:
cli ; We do not want to be interrupted
@@ -62,7 +61,6 @@ init:
jmp 0:main
; ###############
;
; Extra/Shared Functions
@@ -76,6 +74,10 @@ init:
; End Section
; ###############
;
; bp - 2 : uint8_t boot_drive
; bp - 4 : uint16_t part_offset
;
main:
lea ax, [bp - 2]
mov [boot_drive_ptr], ax
@@ -147,7 +149,6 @@ main:
add sp, 0x2
ERROR STEVIA_DEBUG_HALT
hcf:
hlt
jmp short hcf