mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:52:59 +00:00
[ASM]
- Use .586P for 16 bit code to allow privileged instructions, like lidt/lgdt. Found by ThFabba - Add a 0 byte at the end to make ML fill the file up to the required length svn path=/trunk/; revision=52327
This commit is contained in:
parent
5577c61a50
commit
014e413e00
2 changed files with 5 additions and 7 deletions
|
@ -88,8 +88,7 @@ inrmode:
|
||||||
|
|
||||||
/* Load IDTR with real mode value */
|
/* Load IDTR with real mode value */
|
||||||
#ifdef _USE_ML
|
#ifdef _USE_ML
|
||||||
DB 0Fh, 01h, 1Eh
|
lidt fword ptr rmode_idtptr
|
||||||
DW rmode_idtptr
|
|
||||||
#else
|
#else
|
||||||
lidt rmode_idtptr
|
lidt rmode_idtptr
|
||||||
#endif
|
#endif
|
||||||
|
@ -114,8 +113,7 @@ exit_to_protected:
|
||||||
|
|
||||||
/* Load the GDT */
|
/* Load the GDT */
|
||||||
#ifdef _USE_ML
|
#ifdef _USE_ML
|
||||||
DB 0Fh, 01h, 16h
|
lgdt fword ptr gdtptr
|
||||||
DW gdtptr
|
|
||||||
#else
|
#else
|
||||||
lgdt gdtptr
|
lgdt gdtptr
|
||||||
#endif
|
#endif
|
||||||
|
@ -195,7 +193,7 @@ rmode_idtptr:
|
||||||
#include "pnp.inc"
|
#include "pnp.inc"
|
||||||
#include "helpers.inc"
|
#include "helpers.inc"
|
||||||
|
|
||||||
.org (FREELDR_PE_BASE - FREELDR_BASE)
|
.org (FREELDR_PE_BASE - FREELDR_BASE - 1)
|
||||||
|
.byte 0
|
||||||
.endcode16
|
.endcode16
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
|
@ -73,7 +73,7 @@ ENDM
|
||||||
.code16 MACRO
|
.code16 MACRO
|
||||||
ASSUME nothing
|
ASSUME nothing
|
||||||
.text SEGMENT use16
|
.text SEGMENT use16
|
||||||
.586
|
.586P
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
.endcode16 MACRO
|
.endcode16 MACRO
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue