Real Mode: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
Brendan (talk | contribs)
m Added warning
Fix nonsense stack alignment sentence away.
 
(5 intermediate revisions by 4 users not shown)
Line 47:
 
=== The Stack ===
SS and SP are 16-bit segment:offset registers that specify a 20-bit physical address (described above), which is the current "top" of the stack. The stack stores 16-bit words, and grows downwards, and must be aligned on a word (16-bit) boundary. It is used every time a program does a PUSH, POP, CALL, INT, or RET opcode and also when the BIOS handles any hardware interrupt.
 
=== High Memory Area ===
Line 118:
 
== x86 Assembly Example ==
<sourcesyntaxhighlight lang="asm">
[bits 16]
 
Line 145:
mov eax, cr0
mov [savcr0], eax ; save pmode CR0
and eax, 0x7FFFFFFe ; Disable paging bit & enabledisable 16-bit pmode.
mov cr0, eax
 
Line 160:
lidt [idt_real]
sti ; Restore interrupts -- be careful, unhandled int's will kill it.
</syntaxhighlight>
</source>
 
== See Also ==
Line 176:
** Volume 3A: System Programming Guide, Part 1,Chapter 20:8086 EMULATION,which is a detailed reference about real mode using 32-bit addressing mode
 
[[Category:Real Mode]]
[[Category:X86]]
[[Category:X86 CPU]]
[[Category:Operating Modes]]