Author Topic: Is there a 32-bit real mode and why?  (Read 6371 times)

nobody

  • Guest
Is there a 32-bit real mode and why?
« on: October 24, 2005, 05:19:45 AM »
Is there a 32-bit real mode and why?

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Is there a 32-bit real mode and why?
« Reply #1 on: October 24, 2005, 06:37:05 AM »
No, and you'll have to ask Intel :)

An (over)simplified explanation would be: if we're in protected mode, a bit in the descriptor to which cs points determines if the CPU is running in 16- or 32-bit mode. In real mode, there's no such bit.

You can use 32-bit instructions with the CPU in 16-bit mode. You can even use 32-bit addressing modes - but ordinarily, offsets are limited to 64k-1 (there's a workaround for this - "Flat Real Mode").

What is it you're trying to do?

Best,
Frank

nobody

  • Guest
Re: Is there a 32-bit real mode and why?
« Reply #2 on: October 25, 2005, 05:54:53 AM »
Actually, 32-bit real mode has been supported
ever since the 80386 -- it is perfectly valid
to enter 32-bit protected mode, clear CR0.PE,
and not reload the segment registers: the CPU
will continue to honour various sreg.ar bits,
including CS.ar.D=1.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Is there a 32-bit real mode and why?
« Reply #3 on: October 25, 2005, 09:08:36 AM »
Got an example?

Best,
Frank