OS development

For everything that's not in any way related to PureBasic. General chat etc...
LarsG
Enthusiast
Enthusiast
Posts: 713
Joined: Mon Jun 02, 2003 1:06 pm
Location: Norway
Contact:

Post by LarsG »

8O Hehe, there's no way I'm going to trawl through the linux sourcecode... Even if my C skills weren't so damn poor, I wouldn't do it...

A book on the subject might help though... Still, I don't think it would be any harm in discussing the fundamentals, and different aspects and parts of an OS.. (that is, if someone here knows anything about it, and want to share their thoughts)

-Lars

AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
dmoc
Enthusiast
Enthusiast
Posts: 739
Joined: Sat Apr 26, 2003 12:40 am

Post by dmoc »

I definately would not say it *isn't* worth discussing, by all means do so. But as someone who has studied os design, if Dreglor wants to learn then there are probably a lot more informative (and knowledgeable) places to go. To give you (or anyone else) an idea of how big the discussion could get here is a contents page from a typical reference book (some would say *the* reference book):

http://cwx.prenhall.com/bookbind/pubboo ... ntent.html

There are various websites and usenet groups, eg, comp.os.research.

Where PB is concerned, and once Dreglor has some background info, it would be a good learning experience to try to emulate some of the basic OS techniques, eg, task/ memory management. PB would provide a safe environment for this rather than trying to hack together an actual OS kernel. Next step, much more interesting, would be to use PB to create a virtual OS. It might even be useful, look at the various DOS and Windows emulators/ virtualisations.
Dreglor
Enthusiast
Enthusiast
Posts: 759
Joined: Sat Aug 02, 2003 11:22 pm
Location: OR, USA

Post by Dreglor »

well there are alot of things i want to learn in my own free time, and os's are one of them

but doning one wouldn't be a very easy
as dmoc pointed out you most likely *WILL* need a book to learn how frist before you do anything

now i do have some asm and c skills but i dought i even get based the boot sector >_>
~Dreglor
Doobrey
Enthusiast
Enthusiast
Posts: 218
Joined: Sat Apr 26, 2003 4:47 am
Location: Dullsville..population: me
Contact:

Post by Doobrey »

Fred wrote:Shouldn't a real OS be coded in ASM ? :)
What? ASM is for girls...
Real OS developers code in pure binary :wink:
Dreglor
Enthusiast
Enthusiast
Posts: 759
Joined: Sat Aug 02, 2003 11:22 pm
Location: OR, USA

Post by Dreglor »

hehe, is it even possible to code directly in binary!?
~Dreglor
freedimension
Enthusiast
Enthusiast
Posts: 613
Joined: Tue May 06, 2003 2:50 pm
Location: Germany
Contact:

Post by freedimension »

Dreglor wrote:hehe, is it even possible to code directly in binary!?
Sure it is, or how do you think was the first programming language written?
spangly
User
User
Posts: 54
Joined: Mon Apr 28, 2003 8:26 pm
Contact:

Post by spangly »

Dreglor wrote:hehe, is it even possible to code directly in binary!?
I used to code in Z80 on the spectrum without the aid of an assembler 8O
I could tell you the hex values for just about any z80 instruction ;)

21 00 40 ld hl,16384

Yes, I am slightly insane!
Saboteur
Enthusiast
Enthusiast
Posts: 272
Joined: Fri Apr 25, 2003 7:09 pm
Location: (Madrid) Spain
Contact:

Post by Saboteur »

spangly wrote:I used to code in Z80 on the spectrum without the aid of an assembler 8O
I could tell you the hex values for just about any z80 instruction ;)

21 00 40 ld hl,16384

Yes, I am slightly insane!
Ups...
I only remember
C9 ret
0 nop
:D

When we'll have PureSpectrum Basic? ;)
[:: PB Registered ::]

Win10 Intel core i5-3330 8GB RAM Nvidia GTX 1050Ti
Hi-Toro
Enthusiast
Enthusiast
Posts: 269
Joined: Sat Apr 26, 2003 3:23 pm

Here ya go...

Post by Hi-Toro »

Someone asked about this on the Bl**z forums a few weeks ago... here are the links I posted:

----

Writing Your Own Toy OS, parts 1, 2 and 3:

www.linuxgazette.com/issue77/krishnakumar.html
www.linuxgazette.com/issue79/krishnakumar.html
www.linuxgazette.com/issue82/raghu.html

[Correction to part 1]
www.linuxgazette.com/issue84/dashti.html

Misc

nocturnalnetwork.com/os.htm
www.osdever.net/
www.linuxgazette.com/issue85/mahoney.html

Create a minimal Linux-based OS:

linuxfromscratch.org/


-----------------

See also this thread on these very forums, complete with Mark's old BlitzOS...

www.blitzbasic.com/bbs/posts.php?topic=15774

And there's even (if you scroll down past the Ukrainian/Russian?) what appears to be a little crude BlitzOS developer documentation here!

http://www.humgat.kiev.ua:8100/~kittle/ ... /0397.html
James Boyd
http://www.hi-toro.com/
Death to the Pixies!
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

I hate to bring this back up, but I have to know.

Why the heck is PB not suitable on making a OS? Fred mentioned why not use ASM, was that a joke? :) I mean, the PB syntax gets converted into ASM before compiling, right? So it would be possible to make an OS in PB, right?
plouf
Enthusiast
Enthusiast
Posts: 281
Joined: Fri Apr 25, 2003 6:35 pm
Location: Athens,Greece

Post by plouf »

because PB creates code suitable to run under an existing OS
(Windows,Linux,AMigaOS) an OS should run without anythink else
it is possible to wirte a PB syntax compatible compiler to generate
code who will run in boot up ,but internal it will have much more stuff
(think that drivers should be build in etc) (and no API calls since no OS running ;))
Christos
LarsG
Enthusiast
Enthusiast
Posts: 713
Joined: Mon Jun 02, 2003 1:06 pm
Location: Norway
Contact:

Post by LarsG »

I believe it's possible to write an x86 OS using PB..
You'd have to code the foundation in ASM though.. (memory management, file-system etc... if you're not going to use an existing base for this)
and your own drivers and stuff.. but I believe it can be done...

AMD Athlon XP2400, 512 MB RAM, Hercules 3D Prophet 9600 256MB RAM, WinXP
PIII 800MHz, 320 MB RAM, Nvidia Riva Tnt 2 Mach 64 (32MB), WinXP + Linux
17" iMac, 1.8 GHz G5, 512 MB DDR-RAM, 80 GB HD, 64 MB Geforce FX 5200, SuperDrive, OSX
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

Well, I was thinking... we need a bootstrap and access to a few registers, not to mention the screen interrups, and your set. Can code from there. But since alot of PB's commands are from pre-existing os commands, that might be hard to emulate, unless you code them from scratch in PB or internal ASM, right?

If so..... If it is possible for Fred to give us a list of what commands call what, we could "emulate" such in pure asm via pb... only the commands that are needed... I think it would be possible.. but why? Because once all or most of the commands are implimented, you can use PB to build the rest of the system...
Dreglor
Enthusiast
Enthusiast
Posts: 759
Joined: Sat Aug 02, 2003 11:22 pm
Location: OR, USA

Post by Dreglor »

well you would have to have the complier chunk out a asm file for you to edit so it can be compatible then you complie that in fasm and have it chunk out a .com file

and this is after you got the boot file and things you need before letting pb do the major programs

i think with a libarys and some conversion programs i sure you can get any pb program to work in a diffrent os
~Dreglor
Post Reply