use kmemset to 0 out fat32_state in InitFATDriver

This commit is contained in:
2024-10-11 13:00:45 -04:00
parent 5ccd2fb12f
commit 3a819a685a

View File

@@ -28,11 +28,14 @@ ALIGN 4, db 0x90
InitFATDriver:
__CDECL16_ENTRY
.func:
xor eax, eax
mov dword [fat32_state + FAT32_State_t.active_cluster_32], eax
mov dword [fat32_state + FAT32_State_t.active_FAT_cluster_32], eax
mov dword [fat32_state + FAT32_State_t.first_root_dir_sector_32], eax
mov dword [fat32_state + FAT32_State_t.active_dir_cluster_32], eax
mov ax, fat32_state_SIZE
push ax ; length of fat32_state structure
xor ax, ax
push ax ; init fat32_state with zero
mov ax, fat32_state
push ax ; address of structure
call kmemset
sub sp, 0x6
.calc_active_part:
mov bx, [partition_offset_ptr]