Pascal wiki needs correction

All about the OSDev Wiki. Discussions about the organization and general structure of articles and how to use the wiki. Request changes here if you don't know how to use the wiki.
Post Reply
leledumbo
Member
Member
Posts: 103
Joined: Wed Apr 23, 2008 8:46 pm

Pascal wiki needs correction

Post by leledumbo »

While reading it, I found:
To date no operating system has been written in Delphi
This link says that it's not true.
User avatar
inflater
Member
Member
Posts: 1309
Joined: Thu Sep 28, 2006 10:32 am
Location: Slovakia
Contact:

Re: Pascal wiki needs correction

Post by inflater »

What ... the ... :shock: lol I'm jealous - a Win32 application with Win32 DLL's combined to run without a OS. :lol: How he did that? Is he using KERNEL32.DLL to do all dirty work with drivers, filesystems and all? wow. I'm really amazed.
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English :P)
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Pascal wiki needs correction

Post by Combuster »

the CD is actually bootable and boots into a DOS prompt - not the shell that comes with it. The binaries only run under a real windows so I expect this is just an elaborate joke.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: Pascal wiki needs correction

Post by AJ »

I agree with combuster. It's years since I programmed in Delphi (Delphi 3, IIRC), but:
ClassiOS Web Site wrote:This was achieved by replacing the System.dcu and related units by a custom unit which can run in Ring 0 of the x86 CPU.
seems very odd. Isn't system.dcu simply a delphified wrapper for the Windows API? I guess you could, in theory, write a kernel in Delphi (just as you can in C#), but you would have to write a lot of support code in asm/c/something else. I think the bit that really gives it away as a joke is:
This operating system is built entirely with the Delphi Compiler - even the boot loader!!
Needless to say, I would love to be proved wrong ;)

Cheers,
Adam
User avatar
inflater
Member
Member
Posts: 1309
Joined: Thu Sep 28, 2006 10:32 am
Location: Slovakia
Contact:

Re: Pascal wiki needs correction

Post by inflater »

Hmm, it's weird. Now I got back from the school and experimented with it:
After studying, I extracted the boot contents from the CD image which has 1.44MB fdd emulation. Signature "WinISO" is on the emulation. These files were BOOTLOAD.BIN and CLASSIOS.KXE (which loads SHELL.EXE) and WinImage provided a boot floppy which contained these files, since they aren't visible normally. So I ran Bochs with this "FDD emulation floppy image" which contained just these two files and it asked for SHELL.EXE, so I added it and removed the DLLs on purpose. Kernel fault and it looped infinitely, there was a 32bit register dump . How many DOS'es did you saw lately that created a kernel fault and displayed 32bit registers? #-o

Then I included the DLLs to the "emulation floppy image" and it ran successfully, believe it or not. :shock: I thought they were DOS applications, but they seem to have "This program cannot be run under Win32" message, which outputs the 32-bit delphi compiler (C for Win32 displays "This program cannot be run under DOS mode." under DOS). So I tried to execute both SHELL.EXE and HELLO.EXE under pure DOS and it displayed that message.

Executing the standard SHELL.EXE under Windows environment works normal btw. :!: So I made a test Win32 console application in Delphi that would just display a message, and renamed it to SHELL.EXE. No custom System.dcu, everything standard. I've ran the floppy again with my application and it did a kernel fault and looped.

Conclusion? You decide. I've attached a archive, that contains two floppy images of the "ClassiOS" loader from the CD image. The first - clasios_1 - has the standard shell, the second image has my own test application. Run it, delete the DLLs, or do what you wish and see for yourself.

It doesn't seem to be MS-DOS kernel though - again, SHELL.EXE doesnt work in DOS.

The archive can be downloaded here: http://inflater.wz.cz/osdev/classios.zip

Weird, very weird.
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English :P)
Laksen
Member
Member
Posts: 140
Joined: Fri Nov 09, 2007 3:30 am
Location: Aalborg, Denmark

Re: Pascal wiki needs correction

Post by Laksen »

So the disk contains some DOS clone and a 32bit dos extender?
http://j-software.dk | JPasKernel - My Object Pascal kernel
User avatar
inflater
Member
Member
Posts: 1309
Joined: Thu Sep 28, 2006 10:32 am
Location: Slovakia
Contact:

Re: Pascal wiki needs correction

Post by inflater »

I don't know what exactly it contains, but I think it's launching the EXE. BTW weren't DOS extenders used for access above 640K of ram? AFAIK they weren't capable of launching MZ-PE win32 programs...
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English :P)
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: Pascal wiki needs correction

Post by Troy Martin »

HX DOS Extender has some tools to run Win32 console programs in regular DOS. Pretty neat, actually!
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
ru2aqare
Member
Member
Posts: 342
Joined: Fri Jul 11, 2008 5:15 am
Location: Hungary

Re: Pascal wiki needs correction

Post by ru2aqare »

Laksen wrote:So the disk contains some DOS clone and a 32bit dos extender?
I've taken a peek inside, and found some dll's, an application and something resembling a kernel. While the dll's seem bogus (in the sense that they don't seem to do anything useful, and were definitely not compiled with Delphi - they miss the usual Delphi stuff, but contain sysenter instructions), the application and the kernel thingy were actually compiled with Delphi (look at the class names). I haven't tested it yet, so I can't comment on whether it actually works, or blows up the second you attempt to run it...
Post Reply