OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Apr 25, 2024 1:16 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Pascal wiki needs correction
PostPosted: Thu Nov 27, 2008 9:29 pm 
Offline
Member
Member

Joined: Wed Apr 23, 2008 8:46 pm
Posts: 103
While reading it, I found:
Quote:
To date no operating system has been written in Delphi

This link says that it's not true.


Top
 Profile  
 
 Post subject: Re: Pascal wiki needs correction
PostPosted: Fri Nov 28, 2008 12:32 am 
Offline
Member
Member
User avatar

Joined: Thu Sep 28, 2006 10:32 am
Posts: 1309
Location: Slovakia
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)


Top
 Profile  
 
 Post subject: Re: Pascal wiki needs correction
PostPosted: Fri Nov 28, 2008 3:12 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 3:45 am
Posts: 9301
Location: On the balcony, where I can actually keep 1½m distance
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 ]


Top
 Profile  
 
 Post subject: Re: Pascal wiki needs correction
PostPosted: Fri Nov 28, 2008 3:30 am 
Offline
Member
Member
User avatar

Joined: Sun Oct 22, 2006 7:01 am
Posts: 2646
Location: Devon, UK
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:

Quote:
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


Top
 Profile  
 
 Post subject: Re: Pascal wiki needs correction
PostPosted: Fri Nov 28, 2008 7:46 am 
Offline
Member
Member
User avatar

Joined: Thu Sep 28, 2006 10:32 am
Posts: 1309
Location: Slovakia
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)


Top
 Profile  
 
 Post subject: Re: Pascal wiki needs correction
PostPosted: Fri Nov 28, 2008 1:05 pm 
Offline
Member
Member

Joined: Fri Nov 09, 2007 3:30 am
Posts: 140
Location: Aalborg, Denmark
So the disk contains some DOS clone and a 32bit dos extender?

_________________
http://j-software.dk | JPasKernel - My Object Pascal kernel


Top
 Profile  
 
 Post subject: Re: Pascal wiki needs correction
PostPosted: Fri Nov 28, 2008 1:24 pm 
Offline
Member
Member
User avatar

Joined: Thu Sep 28, 2006 10:32 am
Posts: 1309
Location: Slovakia
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)


Top
 Profile  
 
 Post subject: Re: Pascal wiki needs correction
PostPosted: Fri Nov 28, 2008 4:34 pm 
Offline
Member
Member
User avatar

Joined: Fri Apr 18, 2008 4:40 pm
Posts: 1686
Location: Langley, Vancouver, BC, Canada
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


Top
 Profile  
 
 Post subject: Re: Pascal wiki needs correction
PostPosted: Fri Nov 28, 2008 5:30 pm 
Offline
Member
Member

Joined: Fri Jul 11, 2008 5:15 am
Posts: 342
Location: Hungary
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...


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 87 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group