Article View: alt.msdos.programmer
Article #1393Re: How to enter Protected Mode from Assembly. 1 Q.
From: Boyer Francois-Raymon
Date: Thu, 05 May 1994 18:03
Date: Thu, 05 May 1994 18:03
34 lines
2921 bytes
2921 bytes
SIR P/L (sir@usage.csd.unsw.OZ.AU) wrote: : Hello everybody, : What follows is my idea of all that is necessary to switch : a 486 (or 386 for that matter) into "Flat" protected-mode. : : IT does NOT work. : I would be *most* grateful if anyone could take a look at it : and give me some idea what I'm doing wrong. It simply hangs the machine, and : the top left-hand corner of the screen remains un-changed. : I'm using MASM 6, but this should work on most versions of : most assemblers that accept protected mode instructions. : Alternativly, if anyone has a tiny .EXE or .COM program to (1) switch : the CPU into protected mode, and (2) execute some trivial instructions in an : endless loop, I'd love to get a copy. I'm much better with .ASM when I've got : some working code to disect. : All help grately appreciated. : Chris. : sir@usage.csd.unsw.oz.au With a quick look I've found things that are wierd. You're loading the GDT instead of the GDT descriptor. The data_selc should be 8h if you look at your gdt_tab. You should use a 'smsw ax' instead of a 'mov ax,bx'. You can't use a far jump because it will generate the wrong segment. There are surely other errors. Have you read a book on 386 protected mode? It could help...
Technical Details
Message-ID:
<CpCCuG.HJC@cc.umontreal.ca>Path:
arc1-ca.pugleaf.net!gmd.de!nntp.gmd.de!xlink.net!howland.reston.ans.net!usc!nic-nac.CSU.net!charnel.ecst.csuchico.edu!psgrain!nntp.cs.ubc.ca!unixg.ubc.ca!quartz.ucs.ualberta.ca!tribune.usask.ca!canopus.cc.umanitoba.ca!newsflash.concordia.ca!CC.UMontreal.CA!ceres!boyerfReferences:
<1994May5.052710.9875@usage.csd.unsw.OZ.AU>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10f6aa,6994a0d4e02e984d X-Google-Attributes: gid10f6aa,public X-Google-Thread: 10d683,6994a0d4e02e984d X-Google-Attributes: gid10d683,public X-Google-Thread: fe306,6994a0d4e02e984d X-Google-Attributes: gidfe306,public X-Google-Thread: ffec8,6994a0d4e02e984d X-Google-Attributes: gidffec8,public X-Google-Thread: ff6a6,6994a0d4e02e984d X-Google-Attributes: gidff6a6,public X-Google-Thread: 102bfa,6994a0d4e02e984d X-Google-Attributes: gid102bfa,public X-Google-Thread: 10bb54,6994a0d4e02e984d X-Google-Attributes: gid10bb54,public X-Google-ArrivalTime: 1994-05-06 14:33:40 PST Newsgroups: alt.msdos.programmer,alt.2600,comp.sys.ibm.pc.programmer,comp.os.msdos.programmer,rec.games.programmer,aus.computers.ibm-pc,comp.sys.ibm.pc.hardware Path: arc1-ca.pugleaf.net!gmd.de!nntp.gmd.de!xlink.net!howland.reston.ans.net!usc!nic-nac.CSU.net!charnel.ecst.csuchico.edu!psgrain!nntp.cs.ubc.ca!unixg.ubc.ca!quartz.ucs.ualberta.ca!tribune.usask.ca!canopus.cc.umanitoba.ca!newsflash.concordia.ca!CC.UMontreal.CA!ceres!boyerf From: boyerf@JSP.UMontreal.CA (Boyer Francois-Raymon) Subject: Re: How to enter Protected Mode from Assembly. 1 Q. Message-ID: <CpCCuG.HJC@cc.umontreal.ca> Followup-To: alt.msdos.programmer,alt.2600,comp.sys.ibm.pc.programmer,comp.os.msdos.programmer,rec.games.programmer,aus.computers.ibm-pc,comp.sys.ibm.pc.hardware Sender: news@cc.umontreal.ca (Administration de Cnews) Organization: Universite de Montreal X-Newsreader: TIN [version 1.2 PL2] References: <1994May5.052710.9875@usage.csd.unsw.OZ.AU> Date: Thu, 5 May 1994 18:03:51 GMT Lines: 35