Page 1 of 1

PDOS/x64

Posted: Thu Aug 10, 2023 8:09 am
by kerravon
It turns out that there is not very much "glue" code required to convert the UEFI OS (it meets my definition of OS, anyway), into a mini Win64 clone.

Especially the consistent calling convention in UEFI, MSVCRT.DLL and KERNEL32.DLL means not even assembler stubs (or C90 extensions) are required between these things.

So "University Challenge x64" available at http://pdos.org provides such a system, including toolchain, all public domain. Source code is on the UC386 disk.

One sample Win64 executable is provided.

The sample Win64 executable will exit, because I don't currently increment the runnum, because I haven't had this exact scenario before, and need to check the best way of doing that.

It would be really good to have some academic rigor applied to this.

ie what do you think of the design - or concept?

Note that the only thing missing is a C90-compliant compiler. I only have a subset of C90 available, and even that will only allow you to produce EFI applications. Not sure if Win64 can be supported via the same method - haven't looked into it.

Re: PDOS/x64

Posted: Thu Aug 10, 2023 2:45 pm
by BigBuda
While I haven't had the chance to try out PDOS yet or look into it deeper, I did enjoy the humor on the site.

Re: PDOS/x64

Posted: Thu Aug 10, 2023 10:00 pm
by kerravon
BigBuda wrote:While I haven't had the chance to try out PDOS yet or look into it deeper, I did enjoy the humor on the site.
Thanks. Glad someone appreciates it. You should check out my "rules" in the PDOS Discord channel too.

Re: PDOS/x64

Posted: Wed Sep 06, 2023 10:23 pm
by kerravon
kerravon wrote:Note that the only thing missing is a C90-compliant compiler.
I now have a new public domain C compiler that is close enough to C90 compliance to cope with my entire OS/toolchain code base.

And the concept has basically been fully proven now - I have a mini Win64 clone. Completely public domain with C source code. Caveats - a little bit of the code is C99 rather than C90 ("long long" can't really be fully avoided in Win64 - but it is mostly avoided), and the C compiler is actually generated so the code is a bit difficult to read - but not totally impossible to modify.

Re: PDOS/x64

Posted: Wed Sep 20, 2023 11:12 am
by kerravon
kerravon wrote:
kerravon wrote:Note that the only thing missing is a C90-compliant compiler.
And the concept has basically been fully proven now
This turned out to be premature. I received a Chinese computer (with a Chinese x64 even - Zhaoxin) - and expected it to work, but there were some faults in PDOS (not seen on Virtualbox) that could have been show-stoppers. So my heart was in my mouth as I struggled to find the various problems. But fortunately they were all resolved and you can see two photos of real hardware here: https://groups.io/g/hercules-380/message/2696