Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Assembly Language > require encodin...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 4977 of 5083
Post > Topic >>

require encoding

by Mike Gonta <mikegonta@[EMAIL PROTECTED] > Apr 27, 2008 at 06:25 AM

On Apr 26, 10:25 am, "Helge Kruse" wrote:

> I wrote a x86 boot loader a long time ago. One step is to jump
> form 16 bit to 32 bit segment before entering protected mode.
> Is there any way to write a clean jump to 32 bit segment?


                       ;assemble with FASM
                       use16
66 31 C0                 xor eax, eax
8E D8                    mov ds, ax
0F 01 16 18 00           lgdt [gdt]
0F 20 C0                 mov eax, cr0
0C 01                    or al, 1
0F 22 C0                 mov cr0, eax
EA 30 00 08 00           jmp 8:protected_mode
90                     align 8
                       gdt:
                       ; Global Descriptor Table size - 1
                       ; pointer to table, null selector
                       ; is a good location for this
17 00                    dw 23
18 00 00 00              dd gdt
00 00                    dw 0
                       ; maximum pm code selector = #8
FF FF 00 00 00 9A CF 00  dw 0FFFFh, 0, 9A00h, 0CFh
                       ; maximum pm data selector = #16
FF FF 00 00 00 92 CF 00  dw 0FFFFh, 0, 9200h, 0CFh
                       use32
                       protected_mode:


Mike Gonta
look and see - many look but few see

http://aeBIOS.com
 




 5 Posts in Topic:
require encoding
Mike Gonta <mikegonta@  2008-04-27 06:25:21 
Re: require encoding
Mike Gonta <mikegonta@  2008-04-27 10:38:05 
Re: require encoding
"Wolfgang Kern"  2008-04-28 09:30:14 
Re: require encoding
Mike Gonta <mikegonta@  2008-04-27 10:45:33 
Re: require encoding
Dirk Wolfgang Glomp <d  2008-04-28 09:17:14 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 1:40:12 CDT 2008.