Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the board
Thread view  Mix view  Order
Ruud

Homepage

Heerlen - NL,
31.03.2024, 08:48
 

DOSes written in assembly (Developers)

Somewhere in 1985 I had to choose between Turbo Pascal and C as programming language. I chose for TP but sometimes I regret it, seeing how many programs and OSes are written in C. That Linux is written in C, is completely understandable, but a DOS, like FreeDOS, no.

So I started to write my own DOS, CBM-DOS. It is not MS-DOS compatible and has its own file system. I also started to create my own BASIC. At the moment it is bootable, partly based on CBM-DOS.

My question: are there other open source DOSes around, meant for 8088/8086 computers and purely written in assembly?

---
--

With Kind regards, Ruud Baltissen

http://www.baltissen.org

Rugxulo

Homepage

Usono,
31.03.2024, 09:42

@ Ruud

DOSes written in assembly

> Somewhere in 1985 I had to choose between Turbo Pascal and C as programming
> language. I chose for TP but sometimes I regret it, seeing how many
> programs and OSes are written in C. That Linux is written in C, is
> completely understandable, but a DOS, like FreeDOS, no.

TP is great (and better than C in later versions, IMHO). However, C is still mostly reasonable. If you want to write your own OS, why not study the Project Oberon book? The latest edition is even free online. Don't "regret" choosing TP over C. Both can be very very useful.

> My question: are there other open source DOSes around, meant for 8088/8086
> computers and purely written in assembly?

RxDOS is too buggy for full-time use, but it's all assembly, IIRC.

ecm

Homepage E-mail

Düsseldorf, Germany,
31.03.2024, 10:01

@ Rugxulo

DOSes written in assembly

> > My question: are there other open source DOSes around, meant for
> 8088/8086
> > computers and purely written in assembly?
>
> RxDOS is too buggy for full-time use, but it's all assembly, IIRC.

Yes, indeed. EDR-DOS has a kernel that's all assembly too. The shell is mostly C though. The free software parts of MS-DOS v2 are also all assembly.

---
l

Laaca

Homepage

Czech republic,
31.03.2024, 17:09

@ Ruud

DOSes written in assembly

> My question: are there other open source DOSes around, meant for 8088/8086
> computers and purely written in assembly?

You can try LT-DOS.
I cannot provide you the exact link as it is on HTTP domain only and it is not accessible from computers in my work
However go to http://litux.wz.cz and there is a link.
Most of the pages are in czech language only so maybe you shoulg go through Google Translate or something like that.

It is compatible with MS.DOS 2.20 with few extensions and it can be compiled with NASM

---
DOS-u-akbar!

boeckmann

Aachen, Germany,
31.03.2024, 18:52

@ Ruud

DOSes written in assembly

> My question: are there other open source DOSes around, meant for 8088/8086
> computers and purely written in assembly?

There was also the russian PTS-DOS, which gained some popularity in Germany. I have read that it was shipped with (assembly) source, but I never possessed it. So take it with a grain of salt.

tom

Homepage

Germany (West),
31.03.2024, 20:00
(edited by tom, 31.03.2024, 20:11)

@ Ruud

DOSes written in assembly

> Somewhere in 1985 I had to choose between Turbo Pascal and C as programming
> language. I chose for TP but sometimes I regret it, seeing how many
> programs and OSes are written in C. That Linux is written in C, is
> completely understandable, but a DOS, like FreeDOS, no.

I understand that you don't understand FreeDOS being written in C, but that doesn't make this a bad idea.

You probably don't either understand special or general relativity, drug design or rocket science. That doesn't make them wrong.

Edited to add: Congratulations to create your own operating system, compatible to nothing else, running on about a single machine. What's the point?

Ruud

Homepage

Heerlen - NL,
01.04.2024, 08:06

@ boeckmann

DOSes written in assembly

Thank you all for answering!


> > My question: are there other open source DOSes around, meant for
> > 8088/8086 computers and purely written in assembly?

I forgot to mention: the reason I asked was pure curiosity.


@Boeckmann
> There was also the russian PTS-DOS, which gained some popularity in
> Germany. I have read that it was shipped with (assembly) source, but I
> never possessed it. So take it with a grain of salt.

No, it DID exist. In fact I have the CD. And I bought it in a bookshop near the fountain in Aachen. I made an ISO of it and can upload it to my website. If you, or anyone else, is interested, email me and I will send the link. You find my email addres at http://www.baltissen.org/newhtm/email.htm


@Tom
> I understand that you don't understand FreeDOS being written in C, but that
> doesn't make this a bad idea.

I never said it is a bad idea or wrong. My personal opinion is that a MS-DOS clone should be written in assembly, that's all. And I do understand C, I just don't like it.


> Edited to add: Congratulations to create your own operating system,
> compatible to nothing else, running on about a single machine. What's the
> point?

Fun :)

---
--

With Kind regards, Ruud Baltissen

http://www.baltissen.org

RayeR

Homepage

CZ,
01.04.2024, 20:24

@ Ruud

DOSes written in assembly

> > Edited to add: Congratulations to create your own operating
> system,
> > compatible to nothing else, running on about a single machine. What's
> the
> > point?
>
> Fun :)

YAD (Yet Another DOS), how many will come? Probably infinite until there will be people who are programming :)

A side effect is that there are tons of YADs or YAeverything that none is fully done/complete and usable :)

---
DOS gives me freedom to unlimited HW access.

samwdpckr

01.04.2024, 20:54

@ Ruud

DOSes written in assembly

The kernel in MS-DOS is written in assembly, but many userspace programs are written in C.

kerravon

Ligao, Free World North,
04.04.2024, 15:11

@ Ruud

DOSes written in assembly

> Somewhere in 1985 I had to choose between Turbo Pascal and C as programming
> language. I chose for TP but sometimes I regret it, seeing how many
> programs and OSes are written in C. That Linux is written in C, is
> completely understandable, but a DOS, like FreeDOS, no.

Can you explain why it is not appropriate for FreeDOS to be written in C? I believe they advertise that anything that runs on MSDOS should run on FreeDOS too. Surely that is the ultimate arbiter of whether it is possible to do the job in C?

But I'm interested in what you perceive the technical reasons are.

Note that I'm familiar with the generated assembler from C compilers with optimization on and it looks perfectly fine to me.

> My question: are there other open source DOSes around, meant for 8088/8086
> computers and purely written in assembly?

I know of LK-DOS. I can contact the author to find out where it is currently if you are interested.

But I'm more interested in why you are choosing the 8088/8086 for a new OS.

If there is some 16-bit segmentation challenge, why not make it dual 8086/80286?

And what's the reason to not use the OS/2 1.x or MSDOS API? Is there something wrong with it? If so, can you elaborate?

Note that I'm not being sarcastic - this is my interest. OS philosophy or whatever you want to call it.

Ruud

Homepage

Heerlen - NL,
07.04.2024, 14:45

@ kerravon

DOSes written in assembly

> Can you explain why it is not appropriate for FreeDOS to be written in C?

I didn't say "appropriate", I just don't like C, no offense meant. I tried to learn C by starting with Borland C but then my programs wouldn't compile under GCC nor CodeBlocks: each had its own complaints. Also I'm happy with FreePascal/Lazarus. I'm trying to run UCSD Pascal under DOS and, if possible again, even as a bootable version. But that is just dreaming now.


> But I'm interested in what you perceive the technical reasons are.

My technical reasons: it should run on old machines with maybe 64 KB of memory, like the first IBM 5150 PCs. Programs written in assembly are smaller and faster than ones written in C or Pascal.


> I know of LK-DOS. I can contact the author to find out where it is
> currently if you are interested.

I am interested indeed. I also found Snowdrop in the mean time.


> But I'm more interested in why you are choosing the 8088/8086 for a new
> OS.

The same reason why people think that it is fun to drive old-timer cars.


> And what's the reason to not use the OS/2 1.x or MSDOS API? Is there
> something wrong with it? If so, can you elaborate?

Almost nothing, OS/2 and MS-DOS are not written by me :)

Again, this is a pure fun project that probably won't make any sense to other people. Another thing: I want to document it in such a way that other people can use it as a base of knowledge how to create your own OS and FS.


> Note that I'm not being sarcastic

Never had that feeling, just experienced it as curiosity


> - this is my interest. OS philosophy or whatever you want to call it.

---
--

With Kind regards, Ruud Baltissen

http://www.baltissen.org

kerravon

Ligao, Free World North,
07.04.2024, 16:55

@ Ruud

DOSes written in assembly

> > Can you explain why it is not appropriate for FreeDOS to be written in
> C?
>
> I didn't say "appropriate", I just don't like C, no offense meant. I tried
> to learn C by starting with Borland C but then my programs wouldn't compile
> under GCC nor CodeBlocks: each had its own complaints.

Sounds like you didn't write according to the actual C89/C90
standard, which is available here:

https://nvlpubs.nist.gov/nistpubs/Legacy/FIPS/fipspub160.pdf

and a total joy to read.

Show me one single program that follows the C90 standard,
and compiles on Borland C, but doesn't compile on GCC etc.

> Also I'm happy with
> FreePascal/Lazarus. I'm trying to run UCSD Pascal under DOS and, if
> possible again, even as a bootable version. But that is just dreaming now.

My question is more generic, but you appear to have
answered it below, which would have been "what's
wrong with Pascal for writing an OS?".

> > But I'm interested in what you perceive the technical reasons are.
>
> My technical reasons: it should run on old machines with maybe 64 KB of
> memory, like the first IBM 5150 PCs. Programs written in assembly are
> smaller and faster than ones written in C or Pascal.

Ok, yeah, I more-or-less exit the game if there is less
than 2 MiB available. Others can compete in that space.

> > I know of LK-DOS. I can contact the author to find out where it is
> > currently if you are interested.
>
> I am interested indeed. I also found
> Snowdrop in the mean
> time.

Ok, he doesn't have it available for public download
(anymore?), and instead just sent it to me in Discord,
so I have uploaded it myself.

http://pdos.org/LK-DOS_Pre-Alpha_6.zip

In addition, you specified open source, but apparently
he hasn't released the source yet, but given that it
is written in assembler, a disassembly will presumably
get you close to the original.

He wanted it to be able to run in 16k of memory.

> > But I'm more interested in why you are choosing the 8088/8086 for a new
> > OS.
>
> The same reason why people think that it is fun to drive old-timer cars.

Ok.

> > And what's the reason to not use the OS/2 1.x or MSDOS API? Is there
> > something wrong with it? If so, can you elaborate?
>
> Almost nothing, OS/2 and MS-DOS are not written by me :)

So? Even if you're writing something new, if there is
nothing wrong with their API, is there any reason to
not copy it?

> Again, this is a pure fun project that probably won't make any sense to
> other people. Another thing: I want to document it in such a way that other
> people can use it as a base of knowledge how to create your own OS and FS.

Sure.

rr

Homepage E-mail

Berlin, Germany,
07.04.2024, 17:24

@ Ruud

DOSes written in assembly

> Somewhere in 1985 I had to choose between Turbo Pascal and C as programming
> language. I chose for TP but sometimes I regret it, seeing how many
> programs and OSes are written in C. That Linux is written in C, is
> completely understandable, but a DOS, like FreeDOS, no.
>
> So I started to write my
> own DOS, CBM-DOS. It is not MS-DOS compatible and has its own file
> system. I also started to create
> my own BASIC. At
> the moment it is bootable, partly based on CBM-DOS.
>
> My question: are there other open source DOSes around, meant for 8088/8086
> computers and purely written in assembly?

Just in case some of you forgot: This forum exists to discuss MS-DOS-compatible DOSes, but not every OS having a command shell.

---
Forum admin

Ruud

Homepage

Heerlen - NL,
07.04.2024, 21:48

@ rr

DOSes written in assembly

> Just in case some of you forgot: This forum exists to discuss
> MS-DOS-compatible DOSes, but not every OS having a command shell.

OK, you're right. Sorry.

---
--

With Kind regards, Ruud Baltissen

http://www.baltissen.org

Rugxulo

Homepage

Usono,
08.04.2024, 02:45

@ kerravon

DOSes written in assembly

> > > Can you explain why it is not appropriate for FreeDOS to be written in
> > C?
> >
> > I didn't say "appropriate", I just don't like C, no offense meant.

I find ANSI C89 reasonable, but I usually prefer ISO or TP Pascal (or derivatives).

> I tried to learn C by starting with Borland C but then my programs
> wouldn't compile under GCC nor CodeBlocks: each had its own complaints.

Code::Blocks is an IDE, not a compiler, but it supports several:

"GCC (MingW / GNU GCC), MSVC++, clang, Digital Mars, Borland C++ 5.5, Open Watcom, …and more"

> Sounds like you didn't write according to the actual C89/C90
> standard, which is ... a total joy to read.

tcc/bcc have -A to switch on ANSI. I think you also need "-ff-". It could be various hidden problems (memory model, total RAM limits, library bugs, undefined behavior, file system). Usually you want to also test with "gcc -ansi -pedantic -Wall -Wextra" and/or lint.

> Show me one single program that follows the C90 standard,
> and compiles on Borland C, but doesn't compile on GCC etc.

Most reasonable things are possible, but only with effort (and testing). There's a lot of gotchas in portability (and bugs in compilers).

> > Also I'm happy with
> > FreePascal/Lazarus. I'm trying to run UCSD Pascal under DOS and, if
> > possible again, even as a bootable version. But that is just dreaming
> > now.

UCSD's P system was its own OS and was offered as an alternative to PC-DOS or CP/M-86.

DOS has (or can use) many Pascal compilers (FPC, GPC, Irie, P5, Alice, p2c, TP, TMT, VP under HX).

> My question is more generic, but you appear to have
> answered it below, which would have been "what's
> wrong with Pascal for writing an OS?".

Pascal (with variations) has indeed been used for OSes. (GCC was originally based upon Pastel, "an off-color Pascal".) But the language itself didn't inherently have system-specific stuff. Modula-2 and Oberon were more commonly used for OSes and put the non-portable stuff in pseudo-module SYSTEM.

>> Programs written in assembly are smaller and faster than ones
>> written in C or Pascal.

Not necessarily. Sure, if you write every instruction by hand, you don't need calling conventions or stack frames, and you can hand-optimize better and not rely on bloated overly-generic libraries. Actually, bytecode can be MUCH smaller but usually slower. And strictly smaller doesn't always mean faster.

People willingly trade speed for convenience. As flawed as C and Pascal are for portability, they're much better for program maintainability.

ecm

Homepage E-mail

Düsseldorf, Germany,
14.04.2024, 19:33

@ kerravon

Disassembly quality

> > > I know of LK-DOS. I can contact the author to find out where it is
> > > currently if you are interested.
> >
> > I am interested indeed. I also found
> > Snowdrop in the
> mean
> > time.
>
> Ok, he doesn't have it available for public download
> (anymore?), and instead just sent it to me in Discord,
> so I have uploaded it myself.
>
> http://pdos.org/LK-DOS_Pre-Alpha_6.zip
>
> In addition, you specified open source, but apparently
> he hasn't released the source yet, but given that it
> is written in assembler, a disassembly will presumably
> get you close to the original.
>
> He wanted it to be able to run in 16k of memory.

You're downplaying the importance of labels, comments and documentation, and the relocations and relations of data that assembly language source can offer over mere disassembly. There is a reason they call it "the preferred form of the work for making modifications to it" as the GNU GPL puts it. Disassembly is not even close to that if you wrote readable assembly language to create a program.

---
l

Back to the board
Thread view  Mix view  Order
22049 Postings in 2034 Threads, 396 registered users, 150 users online (0 registered, 150 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum