First post, by superfury
What happens when CS isn't immediately loaded after setting the PM bit in CR0(using LMSW or MOV CR,reg instructions)? Does the following code still execute in real mode, only switching to protected mode when executing a load to CS? So if you would do this, what would happen:
MOV EBX,00000000h
MOV EAX,CR0
OR EAX,1
MOV CR0,EAX
; Prepare some little stuff, init IDT entry!
mov [EBX],0
mov [EBX+8],0
mov [EBX+16],0
mov [EBX+24],0
jmp CS:start
Will the following instructions after the mov to CR0 still execute in real mode, only starting protected-mode style parsing when executing the JMP?
Author of the UniPCemu emulator.
UniPCemu Git repository
UniPCemu for Android, Windows, PSP, Vita and Switch on itch.io