use kmemset to 0 out fat32_state in InitFATDriver

This commit is contained in:
2024-10-11 13:00:45 -04:00
parent 07197b0d5b
commit 4af0637c7f

View File

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