clear the carry flag before calling BIOS functions
This commit is contained in:
@@ -53,6 +53,7 @@ GetMemoryMap:
|
|||||||
.loop_L1:
|
.loop_L1:
|
||||||
mov eax, 0x0000E820 ; select 0xE820 function
|
mov eax, 0x0000E820 ; select 0xE820 function
|
||||||
mov edx, 0x534D4150 ; 'SMAP' magic
|
mov edx, 0x534D4150 ; 'SMAP' magic
|
||||||
|
clc ; clear carry
|
||||||
int 0x15
|
int 0x15
|
||||||
jc GetMemoryMap.error
|
jc GetMemoryMap.error
|
||||||
cmp eax, 0x534D4150
|
cmp eax, 0x534D4150
|
||||||
|
|||||||
@@ -105,6 +105,7 @@ EnableA20:
|
|||||||
je EnableA20.endp ; A20 is already enabled
|
je EnableA20.endp ; A20 is already enabled
|
||||||
|
|
||||||
mov ax, 0x2403
|
mov ax, 0x2403
|
||||||
|
clc ; clear carry
|
||||||
int 0x15
|
int 0x15
|
||||||
jc EnableA20.do_fallback_a20 ; carry = error...not supported?
|
jc EnableA20.do_fallback_a20 ; carry = error...not supported?
|
||||||
cmp ah, 0
|
cmp ah, 0
|
||||||
@@ -121,6 +122,7 @@ EnableA20:
|
|||||||
ERROR STAGE2_A20_FAILED
|
ERROR STAGE2_A20_FAILED
|
||||||
.do_bios_a20:
|
.do_bios_a20:
|
||||||
mov ax, 0x2401
|
mov ax, 0x2401
|
||||||
|
clc ; clear carry
|
||||||
int 0x15
|
int 0x15
|
||||||
jmp EnableA20.a20_check
|
jmp EnableA20.a20_check
|
||||||
.do_fast_a20:
|
.do_fast_a20:
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ read_disk_raw:
|
|||||||
mov ah, 0x42 ; call #
|
mov ah, 0x42 ; call #
|
||||||
mov dl, byte [bp + 14] ; drive #
|
mov dl, byte [bp + 14] ; drive #
|
||||||
|
|
||||||
|
clc ; clear carry
|
||||||
int 0x13
|
int 0x13
|
||||||
jnc .endf
|
jnc .endf
|
||||||
|
|
||||||
|
|||||||
@@ -96,6 +96,8 @@ main:
|
|||||||
mov ah, 0x41
|
mov ah, 0x41
|
||||||
mov bx, 0x55AA
|
mov bx, 0x55AA
|
||||||
mov dl, 0x80
|
mov dl, 0x80
|
||||||
|
|
||||||
|
clc
|
||||||
int 0x13
|
int 0x13
|
||||||
jnc main.find_active
|
jnc main.find_active
|
||||||
ERROR MBR_ERROR_NO_INT32E ; no extended function support
|
ERROR MBR_ERROR_NO_INT32E ; no extended function support
|
||||||
|
|||||||
Reference in New Issue
Block a user