Software Archive
Read-only legacy content
17061 Discussions

protected mode initialization

mike931201
Beginner
730 Views
I'm trying to compile the protected mode initialization example from
the Intel Software Developer's Manual Volume 3A using MASM, but I'm
getting some errors I don't know how to fix.

I put the code at:

http://www.coolgroups.com/asm/pm5.asm

If anyone has tips on how to get it working, I'd appreciate it.

0 Kudos
3 Replies
Intel_Software_Netw1
730 Views

Hi Mike,

What errors are you receiving?

(for those following along, the developer manuals are here: http://developer.intel.com/products/processor/manuals/index.htm)

==

Lexi S.

IntelSoftware NetworkSupport

http://www.intel.com/software

Contact us

0 Kudos
mike931201
Beginner
730 Views

MASM doesn't seem to recognize the LGDT instruction.

0 Kudos
Intel_Software_Netw1
730 Views

One member of our engineering team suggests that youtry adding this macro toyour file:

LGDT macro mem:req

local x,y

x:

prefetchnt1 mem

y:

org x

byte 0fh

byte 01h

org y

endm

Another member of our engineering team responded as follows:

As of MSVC 2005 in both the 32-bit ml.exe and 64-bit cross-tools ml64.exe, the followingworks just fine when using LGDT... key is to use "FWORD PTR" as operand size modifier and when doing this in 32-bit code, also include ".686P" assembler pseudo-op to enable privileged instructions. Results in same opcode, i.e. 0F 01, being emitted in both 64-bit mode and compatibility/legacy mode. Also, please make sure that section 9.8 of Intel 64 and IA-3 2 Architectures Software Developer's Manual Volume 3A: System Programming Guide and related sections are well understood, as there are implications in order in which steps must be done when altering protected mode operation.

==

Lexi S.

IntelSoftware NetworkSupport

http://www.intel.com/software

Contact us

0 Kudos
Reply