Unreal Mode: Difference between revisions

m
Bot: Replace deprecated source tag with syntaxhighlight
[unchecked revision][unchecked revision]
No edit summary
m (Bot: Replace deprecated source tag with syntaxhighlight)
 
Line 19:
Therefore IP is unaffected by all this, and the code itself is still limited to 64KiB.
 
<sourcesyntaxhighlight lang="asm">
; Assembly example
 
Line 73:
times 510-($-$$) db 0 ; fill sector w/ 0's
dw 0xAA55 ; Required by some BIOSes
</syntaxhighlight>
</source>
 
===Huge Unreal Mode===
Huge Unreal Mode enables code over 64KiB. However, it is more difficult to implement as real mode interrupts do not automatically save the high 16 bits of EIP. Initialization is simple though, you just load a code segment with a 4GiB limit:
 
<sourcesyntaxhighlight lang="asm">
; Assembly example
 
Line 114:
times 510-($-$$) db 0 ; fill sector w/ 0's
dw 0xAA55 ; Required by some BIOSes
</syntaxhighlight>
</source>
 
WARNING: this may not work on some emulators or some hardware.