remove unreal mode stuff from cdecl16.inc
This commit is contained in:
@@ -68,59 +68,3 @@
|
|||||||
pop bp
|
pop bp
|
||||||
%endmacro
|
%endmacro
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
; set ds and es segments back to the base of the loader
|
|
||||||
%ifnmacro __TINY_DS_ES
|
|
||||||
%macro __TINY_DS_ES 0
|
|
||||||
mov ax, __STAGE2_SEGMENT
|
|
||||||
mov ds, ax
|
|
||||||
mov es, ax
|
|
||||||
%endmacro
|
|
||||||
%endif
|
|
||||||
|
|
||||||
; for copying between locations in high memory
|
|
||||||
%ifnmacro __REFLAT_DS_ES
|
|
||||||
%macro __REFLAT_DS_ES 0
|
|
||||||
cli ; no interrupts
|
|
||||||
lgdt [((__STAGE2_SEGMENT << 4) + unreal_gdt_info)] ; load unreal gdt
|
|
||||||
|
|
||||||
mov eax, cr0
|
|
||||||
or eax, 1 ; set pmode bit
|
|
||||||
mov cr0, eax ; switch to pmode
|
|
||||||
jmp short $+2 ; i-cache flush
|
|
||||||
|
|
||||||
mov ax, 0x10 ; select descriptor 2
|
|
||||||
mov ds, ax
|
|
||||||
mov es, ax
|
|
||||||
|
|
||||||
mov eax, cr0
|
|
||||||
and eax, ~1 ; toggle bit 1 of cr0
|
|
||||||
mov cr0, eax ; back to realmode
|
|
||||||
jmp short $+2 ; i-cache flush
|
|
||||||
sti
|
|
||||||
|
|
||||||
%endmacro
|
|
||||||
%endif
|
|
||||||
|
|
||||||
; for copying from low memory to high memory (ds on a real segment, es in flat mode)
|
|
||||||
%ifnmacro __REFLAT_ES
|
|
||||||
%macro __REFLAT_ES 0
|
|
||||||
cli ; no interrupts
|
|
||||||
lgdt [((__STAGE2_SEGMENT << 4) + unreal_gdt_info)] ; load unreal gdt
|
|
||||||
|
|
||||||
mov eax, cr0
|
|
||||||
or eax, 1 ; set pmode bit
|
|
||||||
mov cr0, eax ; switch to pmode
|
|
||||||
jmp short $+2 ; i-cache flush
|
|
||||||
|
|
||||||
mov ax, 0x10 ; select descriptor 2
|
|
||||||
mov es, ax
|
|
||||||
|
|
||||||
mov eax, cr0
|
|
||||||
and eax, ~1 ; toggle bit 1 of cr0
|
|
||||||
mov cr0, eax ; back to realmode
|
|
||||||
jmp short $+2 ; i-cache flush
|
|
||||||
sti
|
|
||||||
|
|
||||||
%endmacro
|
|
||||||
%endif
|
|
||||||
Reference in New Issue
Block a user