cdecl16 update for EnterUnrealMode
This commit is contained in:
@@ -94,8 +94,6 @@ main:
|
|||||||
call PrintString
|
call PrintString
|
||||||
add sp, 0x2
|
add sp, 0x2
|
||||||
|
|
||||||
ERROR STEVIA_DEBUG_HALT
|
|
||||||
|
|
||||||
; enter unreal mode
|
; enter unreal mode
|
||||||
call EnterUnrealMode
|
call EnterUnrealMode
|
||||||
|
|
||||||
@@ -104,6 +102,7 @@ main:
|
|||||||
call PrintString
|
call PrintString
|
||||||
add sp, 0x2
|
add sp, 0x2
|
||||||
|
|
||||||
|
ERROR STEVIA_DEBUG_HALT
|
||||||
|
|
||||||
; FAT Driver setup
|
; FAT Driver setup
|
||||||
push bp
|
push bp
|
||||||
@@ -853,10 +852,10 @@ EnableA20:
|
|||||||
|
|
||||||
; TODO: fix the prolog, epilog and stack usage to confirm with cdecl16
|
; TODO: fix the prolog, epilog and stack usage to confirm with cdecl16
|
||||||
EnterUnrealMode:
|
EnterUnrealMode:
|
||||||
|
__CDECL16_ENTRY
|
||||||
|
.func:
|
||||||
cli ; no interrupts
|
cli ; no interrupts
|
||||||
push ds ; save real mode
|
push ds ; save real mode data selector
|
||||||
push bx
|
|
||||||
|
|
||||||
lgdt [unreal_gdt_info]
|
lgdt [unreal_gdt_info]
|
||||||
|
|
||||||
mov eax, cr0 ; switch to pmode
|
mov eax, cr0 ; switch to pmode
|
||||||
@@ -871,10 +870,10 @@ EnterUnrealMode:
|
|||||||
and al,0xFE ; back to realmode
|
and al,0xFE ; back to realmode
|
||||||
mov cr0, eax ; by toggling bit again
|
mov cr0, eax ; by toggling bit again
|
||||||
|
|
||||||
pop bx
|
|
||||||
pop ds ; get back old segment
|
pop ds ; get back old segment
|
||||||
sti
|
sti
|
||||||
.endp:
|
.endp:
|
||||||
|
__CDECL16_EXIT
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; #############
|
; #############
|
||||||
|
|||||||
Reference in New Issue
Block a user