flat assembler
Message board for the users of flat assembler.

Index > OS Construction > I want you to make me an operating system like MS-DOS

Goto page 1, 2, 3  Next
Author
Thread Post new topic Reply to topic
timryazthunder



Joined: 18 Jan 2014
Posts: 44
timryazthunder 04 Mar 2014, 13:26
You should all make me a full operating system with:
A GUI
FAT32 Support
CLI
Games compatible with DOS
And setup.
Commands:
FORMAT
CLS
DIR
MD
RD
DEL
EDIT
HELP.
If you make me one, I'll be happy because I can't write everything alone. Thanks.
Post 04 Mar 2014, 13:26
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20445
Location: In your JS exploiting you and your system
revolution 04 Mar 2014, 13:30
Show us how far you have got and perhaps we can help you to extend it a bit further.
Post 04 Mar 2014, 13:30
View user's profile Send private message Visit poster's website Reply with quote
sid123



Joined: 30 Jul 2013
Posts: 339
Location: Asia, Singapore
sid123 04 Mar 2014, 15:36
Sorry but that includes a lot of work. I barely have FAT16 Read Support, Shell and some C apps working.
My project started 3 months ago. C'mon work! There are a lot of manuals, source code and resources available on the internet. And FAT isn't a tough file system to parse. A GUI will take a lot to make,
you need graphics drivers or use legacy VBE interface. I have barely got some VBE support through V86.
And if you're saying it to be DOS Compatible which means Real Mode, and VBE in real mode with bank switching, well Good Luck.
Post 04 Mar 2014, 15:36
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 04 Mar 2014, 20:04
I make a OS some time ago that does what you want, called Dos2X.
Its a 32bit dos OS, that can run Dos games, by using freeDos as a bootloader for the 32bit part of the OS, this means it can also switch back to realmode to run old dos games.
You can still use any Dos int 21h from 32bit pm, by using the 32bit regs, instead of the 16bit.

At the prompt type dos2x <enter>


Description: Here is a floppy image
Download
Filename: Dos2x.zip
Filesize: 444.62 KB
Downloaded: 662 Time(s)

Post 04 Mar 2014, 20:04
View user's profile Send private message Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville 04 Mar 2014, 23:27
Dos2x looks cool Cool

But how do you switch back to real mode to run 16-bit DOS apps from within dos2x?

_________________
FAMOS - the first memory operating system
Post 04 Mar 2014, 23:27
View user's profile Send private message Visit poster's website Reply with quote
sid123



Joined: 30 Jul 2013
Posts: 339
Location: Asia, Singapore
sid123 04 Mar 2014, 23:39
Um,
0. Remap both PICs and save ESP/EBP
1. Copy the code to <1MB
2. Switch to 16 bit Protected Mode Segment by setting CS,
3. Disable PE bit in CR0
4. Serve freshly baked Real Mode function to Stack Smile
5. RETF when hot
6. Switch to Real Mode Code Segments
7. Welcome Back to Real Mode like a boss. Cool
This works for me, I could use Video BIOS Interrupts, however for stuff like floppy and keyboard you need to do some more stuff
Post 04 Mar 2014, 23:39
View user's profile Send private message Reply with quote
neville



Joined: 13 Jul 2008
Posts: 507
Location: New Zealand
neville 05 Mar 2014, 03:08
neville wrote:
But how do you switch back to real mode to run 16-bit DOS apps from within dos2x?
@sid123: You've written an app in Dos2x which performs those 7 steps? Then back to Dos2x afterwards?

_________________
FAMOS - the first memory operating system
Post 05 Mar 2014, 03:08
View user's profile Send private message Visit poster's website Reply with quote
timryazthunder



Joined: 18 Jan 2014
Posts: 44
timryazthunder 05 Mar 2014, 05:34
Well, I made a bootloader in Assembly, compiled by NASM. If you will be helpful, I shall compile everything using NASM and GCC.
Post 05 Mar 2014, 05:34
View user's profile Send private message Reply with quote
timryazthunder



Joined: 18 Jan 2014
Posts: 44
timryazthunder 05 Mar 2014, 05:42
sid123 wrote:
Sorry but that includes a lot of work. I barely have FAT16 Read Support, Shell and some C apps working.
My project started 3 months ago. C'mon work! There are a lot of manuals, source code and resources available on the internet. And FAT isn't a tough file system to parse. A GUI will take a lot to make,
you need graphics drivers or use legacy VBE interface. I have barely got some VBE support through V86.
And if you're saying it to be DOS Compatible which means Real Mode, and VBE in real mode with bank switching, well Good Luck.
I'm a beginner, so, but I know about the basics of C++. I need you to make a DOS game-compatible operating system EXACTLY like MS-DOS 6.22.


Description:
Download
Filename: boot.asm
Filesize: 2.11 KB
Downloaded: 607 Time(s)

Post 05 Mar 2014, 05:42
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20445
Location: In your JS exploiting you and your system
revolution 05 Mar 2014, 05:55
timryazthunder wrote:
I need you to make a DOS game-compatible operating system EXACTLY like MS-DOS 6.22.
You could just use MS-DOS 6.22. It is already written and tested and seems to be EXACTLY what you want.
Post 05 Mar 2014, 05:55
View user's profile Send private message Visit poster's website Reply with quote
timryazthunder



Joined: 18 Jan 2014
Posts: 44
timryazthunder 05 Mar 2014, 06:04
I know. But I want a CUSTOM one. Then make me an alpha version of Thunder 1.0 just like Windows 1.01. I just want to compete with Windows.
Post 05 Mar 2014, 06:04
View user's profile Send private message Reply with quote
Just4fasm



Joined: 20 May 2012
Posts: 60
Location: OuterSpace
Just4fasm 05 Mar 2014, 09:09
I could make it easily and give it to you! but I'm afraid there's! shit pink, brown, multicolor disgusting nigger apes always wants free bananas!!!.
Post 05 Mar 2014, 09:09
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger Reply with quote
timryazthunder



Joined: 18 Jan 2014
Posts: 44
timryazthunder 05 Mar 2014, 09:43
This joj must be done in 3 months!
Post 05 Mar 2014, 09:43
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20445
Location: In your JS exploiting you and your system
revolution 05 Mar 2014, 10:00
timryazthunder wrote:
I know. But I want a CUSTOM one. Then make me an alpha version of Thunder 1.0 just like Windows 1.01. I just want to compete with Windows.
If you keep changing the requirements then your job can never be completed.
timryazthunder wrote:
This joj must be done in 3 months!
Rushed jobs require higher remuneration. How much are you offering?
Post 05 Mar 2014, 10:00
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4353
Location: Now
edfed 05 Mar 2014, 10:39
timryazthunder wrote:
I'm a beginner, so, but I know about the basics of C++. I need you to make a DOS game-compatible operating system EXACTLY like MS-DOS 6.22.


basics of C++ have nothing in common with basics of assembly or DOS. it is really a different world. you cannot apply anything from c++ to assembly, otherwise, you'll have a bloated software, centered on itself ( iterativelly applying techniques to correct the design flaws, making your program just a program to program).

Why don't seek a DOS clone instead of asking for somebody to rewrite this crap?
Post 05 Mar 2014, 10:39
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4353
Location: Now
edfed 05 Mar 2014, 10:45
this thread seems to be a pure source for an endless troll...

the " i want you to make me (type your text here)" is not welcome here... if you look closer to some FAQ or just explore posts from your predecessors, you'll have enough answer to your request....

I want you to give me lot of money to do that job in 3 month, say... 30000€.

Smile cheers, gl hf
Post 05 Mar 2014, 10:45
View user's profile Send private message Visit poster's website Reply with quote
sid123



Joined: 30 Jul 2013
Posts: 339
Location: Asia, Singapore
sid123 05 Mar 2014, 11:23
Quote:
You've written an app in Dos2x which performs those 7 steps? Then back to Dos2x afterwards?

No, but I think those steps should do (At least for int 0x10), if you don't have Real Mode Segments in your GDT then a new step is needed which is loading the Real Mode GDT. As for going back, do the same thing what you do to get back to Protected Mode, just remember to restore EBP and ESP.
I may post some code later on. Wink
Quote:
I'm a beginner, so, but I know about the basics of C++. I need you to make a DOS game-compatible operating system EXACTLY like MS-DOS 6.22.

Batteries not included some Assembly Required. Sad
Well, I would now actually try to help.
DOS-compatibility isn't a BIG thing. It's simple infact once you know basics of
assembly you can easily write a DOS-Compatible System.
There are 2 types of DOS programs EXE and COM.
A COM file is loaded at a fixed address in a part of RAM called segment, since
DOS runs in Real Mode which limits maximum segment size to 64KB, a COM must not be larger than 64KB. In the segment the COM is loaded at 0x100,
which is 256 bytes, the previous 256 are reserved for the PSP (Program Segment Prefix), which contains some information like arguments passed to the application etc exists between 0 to 0x100 to . For running simple applications like VLAK, STAKAN and others, one doesn't need to bother with this PSP thing.
What you need is:
Load the Application from Disk (Use FAT12/16 if you want to be DOS-Compatible, I would FAT16 is a better choice as Floppies are extremely
absolute technology, FAT12 is limited 32MB too, FAT16 supports a Maximum of 2GB)
Copy it to it's own segment (if you FAT driver doesn't support multiple segment model) at 0x100, (Hint: REP MOVSB is your friend here.)
Jump to the address by (call 0xSEGMENT_NUMBER:0x100)
And the application should be running in no time Smile
However remember the fact that most applications (which are not PC Booters) will make use of the DOS API, it's done by calling a function, through an interrupt, which is usually 0x21st one.
Some like this:
Code:
int 0x21
    

When this instruction occurs, the CPU is like "DOS! There's someone for you from interrupt 0x21", And calls DOS which takes control and handles it.
Now how does DOS know when to do what?
These information is passed in CPU Registers, which are sort of variables that can be understood by the CPU,
Some of them are:
AX/BX/CX/DX/SI/DI (16-bit)
All the registers ending with an 'X' can be broken down into a higher part and a lower part.
For example:
AX ----> Higher Part = AH (Accumulator higher), ----> Lower Part (AL - Accumulator lower)
Similarly,
BX = High BH, Low BL
And so on.
Now back to DOS interrupt. Let's take an example.
Code:
According to the INT 0x21 Convention
in order to print a string, AH should be 0x09,
and (DS):DX (Don't worry what DS is) should point to
the string.
So:
Set AH to 0x09
Set DX to Our String
And int 0x21!
In assembly:
mov ah, 0x09 ; Sets AH to 0x09
mov dx, string ; Should point to string
int 0x21 ; Tell CPU to call DOS
; the 0x20 interrupt will make the CPU
; tell DOS that our application wants to exit
int 0x20
;; Our String
;; '$' means end of string
string db 'Hello World$'
    

Compile the above program under Windows, (assuming your installation is 32-bit), and run it. You would see a Hello World at the prompt. If you've a 64-bit computer, use DOSBox.
So how does DOS do it.
With some common sense, if the CPU is calling DOS, there is no change of the "CPU Variables", so DOS can easily check the value of AH. Something like:
Code:
Hey is AH = 0x09?
No?
It's something else.
It is?
Let's print a string
A pseudo code in C
// If AH = 0x09
if (ah == 0x09)
{
    // Print the value that points to DS:DX
    print(DS:DX);
}
    

After learning a little bit of assembly, one could easily write the code in assembly.
Like this you can imitate the whole of DOS API Smile.
Now back to DOS formats. Razz
As I said there are 2 COM and MZ, the MZ format can use multiple segments, and hence can used more memory, loading is a bit complex
though (Requires Reallocation).
There may be some mistakes in the above post, (too long post, had less coffee)
Quote:
I just want to compete with Windows.

Really sorry to bring your hopes down but Windows is owned by Microsoft,
they have a lot of excellent programmers (From awesome universities and that kind of stuff), a little group of people have tried to compete with them,
but they aren't even close, it's called ReactOS, which is open source too.
Some of the Windows Applications can run under ReactOS you may wish to see the source code and get back to sanity.
Quote:
Then make me an alpha version of Thunder 1.0

No offence are you really a troll?
@All:
I am really sorry to spoon feed this guy, but seriously can anyone stand such ignorance?
@Dex: Is it DexOS with DOS2x logo and FreeDOS loader Smile
Post 05 Mar 2014, 11:23
View user's profile Send private message Reply with quote
timryazthunder



Joined: 18 Jan 2014
Posts: 44
timryazthunder 05 Mar 2014, 12:14
Whoa, whoa. I made, at least, a bootloader. But, sorry, I must do the GUI in the team. I will give out tasks and you do them. You just have to make some new features. I'm not a troll. I'm like, well, young Bill Gates. I hate Apple.
Post 05 Mar 2014, 12:14
View user's profile Send private message Reply with quote
Heskeutz



Joined: 25 Feb 2014
Posts: 12
Heskeutz 05 Mar 2014, 12:53
timryazthunder wrote:
You should all make me a full operating system . . . I need you to make a DOS game-compatible operating system EXACTLY like MS-DOS 6.22. . . . This jo[b] must be done in 3 months! . . . I will give out tasks and you do them. . . . I'm like, well, young Bill Gates.

It seems to me like your near-future boss is giving you assignments but y'all are refusing to accept. Please, without any further hesitation, pick up your tools and humbly get to work. Or you do not want to enjoy the privilege of being the first employee of the coming Macrodos Corporation like Marc McDonald was at MS?
Post 05 Mar 2014, 12:53
View user's profile Send private message Reply with quote
timryazthunder



Joined: 18 Jan 2014
Posts: 44
timryazthunder 05 Mar 2014, 14:45
I would, but I need to hire you all. No support = takes forever. Thunder 1.01 should be compatible with MS-DOS. The first task is to implement some GUI support. The second task is to make Reversi or take it out from Windows 1.01. To Heskeutz: Lol, humor. You do the setup manager.
Post 05 Mar 2014, 14:45
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2, 3  Next

< Last Thread | Next Thread >
Forum Rules:
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 vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.