mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:35:47 +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 */
|
||||
#ifdef _USE_ML
|
||||
DB 0Fh, 01h, 1Eh
|
||||
DW rmode_idtptr
|
||||
lidt fword ptr rmode_idtptr
|
||||
#else
|
||||
lidt rmode_idtptr
|
||||
#endif
|
||||
|
@ -114,8 +113,7 @@ exit_to_protected:
|
|||
|
||||
/* Load the GDT */
|
||||
#ifdef _USE_ML
|
||||
DB 0Fh, 01h, 16h
|
||||
DW gdtptr
|
||||
lgdt fword ptr gdtptr
|
||||
#else
|
||||
lgdt gdtptr
|
||||
#endif
|
||||
|
@ -195,7 +193,7 @@ rmode_idtptr:
|
|||
#include "pnp.inc"
|
||||
#include "helpers.inc"
|
||||
|
||||
.org (FREELDR_PE_BASE - FREELDR_BASE)
|
||||
.org (FREELDR_PE_BASE - FREELDR_BASE - 1)
|
||||
.byte 0
|
||||
.endcode16
|
||||
|
||||
END
|
||||
|
|
|
@ -73,7 +73,7 @@ ENDM
|
|||
.code16 MACRO
|
||||
ASSUME nothing
|
||||
.text SEGMENT use16
|
||||
.586
|
||||
.586P
|
||||
ENDM
|
||||
|
||||
.endcode16 MACRO
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue