Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.os.development    |    Operating system development chatter    |    4,255 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 3,627 of 4,255    |
|    mutazilah@gmail.com to muta...@gmail.com    |
|    Re: 32 on 64    |
|    19 Mar 23 17:21:57    |
      From: muta...@gmail.com              On Sunday, March 19, 2023 at 9:49:35 AM UTC+8, muta...@gmail.com wrote:       > On Sunday, March 19, 2023 at 9:20:58 AM UTC+8, Dan Cross wrote:        >        > > >> Yes. That was one of the important design criteria for 64-bit        > > >> x86, in fact. However, you're generally going to do so by        > > >> entering 32-bit mode.        > > >        > > >I didn't want to enter 32-bit mode.        >        > > Huh.       > I could switch between 64 bit mode and 32 bit mode if        > boot services allowed that.        >        > But probably best to not rely on that.        >        > Basically the intention is to run PDOS-generic as 32-bit code.        >        > It can be entered by a pseudo BIOS layered on top a real        > BIOS, so that it can run on a real 80386.        >        > Or EFI can boot a bootx64.efi and it can run PDOS-generic.        >        > PDOS-generic and all applications would all be a.out 80386        > code.        >        > And that would suffice as a starter system that should allow        > further development of both 16-bit and 64-bit systems.        >        > There are two things still on my mind:        >        > 1. Is there anything that would prevent 80386 code from        > running in x64 mode? ie my original question hasn't been        > answered.        >        > 2. Can you bootstrap a 64-bit compiler from a 32-bit        > compiler? I thought Alex said that wasn't possible, but        > on pdos.org there is cc32.c and cc32n.c which I believe        > allow you to get to cc64.c.        >        > BFN. Paul.              Someone has replied offline and said that call and ret won't       do 32-bit anymore, but it is probably possible to do that       manually.              I assume the syntax would be:              mov eax, after       mov [esp + 0], eax       mov eax, sub       jmp *eax       after:              sub:       ...       mov eax, [esp + 0]       jmp *eax                     And some instructions no longer exist, e.g. short form INC 0x40              But again, it sounds like this is a minority and there are no show-stoppers.                     Another thing is that there is apparently no EFI call to get       into 32-bit mode, so the above technique is the only       solution I have.              BFN. Paul.              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca