Page 2 of 2

Re: Jumping into real from protected mode

Posted: Wed Apr 17, 2013 12:19 pm
by HugeCode
I copied my working tables and changed granularity+D/B bytes.. Still same exception.... I give it up... For last time, can anybody see something wrong here?:

Code: Select all

; real code:				; code descriptor
	dw 0FFFFh 			; limit low
	dw 0 				; base low
	db 0 				; base middle
	db 10011010b 			; access
	db 00001111b 			; granularity
	db 0 				; base high
; real data:				; data descriptor
	dw 0FFFFh 			; limit low (Same as code)
	dw 0 				; base low
	db 0 				; base middle
	db 10010010b 			; access
	db 00001111b 			; granularity
	db 0				; base high

Re: Jumping into real from protected mode

Posted: Wed Apr 17, 2013 12:26 pm
by DavidCooper
They're beautiful 16-bit protected mode descriptors. They are not for use in real mode, so you need to think about how you're going to get into real mode via 16-bit protected mode.

Re: Jumping into real from protected mode

Posted: Thu Apr 18, 2013 6:19 am
by HugeCode
Can I use them for v8086 code?

Re: Jumping into real from protected mode

Posted: Thu Apr 18, 2013 7:41 am
by Combuster
HugeCode wrote:Can I use them for v8086 code?
I think an RTFM qualifies here.

Re: Jumping into real from protected mode

Posted: Fri Apr 19, 2013 4:38 am
by HugeCode
I found out where was the problem. My GDT wasn't set up to correct length and it was incomplete. Now everything works.