flat assembler
Message board for the users of flat assembler.

Index > OS Construction > OS Development?

Goto page Previous  1, 2, 3, 4  Next
Author
Thread Post new topic Reply to topic
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler 09 May 2010, 22:36
It's okay, me too.
Post 09 May 2010, 22:36
View user's profile Send private message Reply with quote
adroit



Joined: 21 Feb 2010
Posts: 252
adroit 10 May 2010, 02:20
I wonder!
Post 10 May 2010, 02:20
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler 10 May 2010, 02:49
You wonder what?!
Post 10 May 2010, 02:49
View user's profile Send private message Reply with quote
adroit



Joined: 21 Feb 2010
Posts: 252
adroit 26 May 2010, 14:32
Scrap that!

I've started developing my OS and I have made a lot of a progress. I've been developing mostly my shell. I will develop the kernel later when I learn more.

If I use protected-mode, then I will be able to access over 1MB of RAM an determine which area of RAM is what. But, doing things liking printing to screen would be difficult.
If I use real-mode, then i'm limited to 1MB, but i'll be easier. Which option should I make.
Post 26 May 2010, 14:32
View user's profile Send private message Reply with quote
roboman



Joined: 03 Dec 2006
Posts: 122
Location: USA
roboman 26 May 2010, 18:27
Protected mode is a bit complex to setup and then to access some of the hardware you will likely find it easer to drop to real mode set the hardware then go back to protected mode, another pain. If you go with real mode then you are stuck dealing with segments, another real pain. If you go with real mode, and only use the first 64k, life is simple. You are turning your pc into a very small computer, but what the heck, the first home desktops could only hold 64k and a lot of programming/ learning happened there. That's the option MikeOS took.
Post 26 May 2010, 18:27
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20519
Location: In your JS exploiting you and your system
revolution 27 May 2010, 06:20
MeshNix wrote:
Which option should I make.
Firstly determine the purpose of your OS. Until you know its purpose you can't possibly know which paths to take when developing.
Post 27 May 2010, 06:20
View user's profile Send private message Visit poster's website Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 27 May 2010, 07:34
revolution,

Probably not purpose first (it's too generic), I think feature list is more important. Single task or multi-task. Single thread or multithreaded. Cooperative or preemptive. Shared memory or isolated tasks. Memory model. Paged memory. I/O model.

----8<----
MeshNix,

OS provides an abstraction for underlying hardware. Prepare design documents for your abstraction, then implementation considerations come naturally.
Post 27 May 2010, 07:34
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20519
Location: In your JS exploiting you and your system
revolution 27 May 2010, 08:22
baldr

Definitely purpose first. How do you know if you want single or multi tasking without knowing what you want/need to achieve?

"The purpose of my OS is to ..."
... run my light controller application?
... make my computer run as a standalone browser?
... play tic-tac-toe?
... run concurrent DOS applications?
... run everything ever written for a computer?
... be all-singing all-dancing all-bells all-whistles got-it-all ... and bloated?
... look pretty?
... overtake Windows and make me richer than god?
... overtake Linux and make me poorer than dog poo?
... make me famous?
... impress my girlfriend/boyfriend/spouse/parents/teacher/boss/self?
... turn my computer into a doorstop?
... generally waste time and perhaps learn a few things along the way?
... other?
Post 27 May 2010, 08:22
View user's profile Send private message Visit poster's website Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 27 May 2010, 09:45
revolution,

How do any of these influence OS design? Wink

Design, OTOH, makes difference for most of them. Will my light controller application be polling or interrupt-driven? Can my browser dedicate separate thread to GIF animation? How my concurrent DOS applications will share resources, e.g. soundcard?
Post 27 May 2010, 09:45
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20519
Location: In your JS exploiting you and your system
revolution 27 May 2010, 09:51
baldr

They all influence the OS design.

Does tic-tac-toe need multi-threading?
Does a browser need more than 64k memory?
Does overtaking Windows require kernel-driver separation?
Does running concurrent DOS apps mean I can't use 64bit?
etc.
Post 27 May 2010, 09:51
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4354
Location: Now
edfed 27 May 2010, 10:25
i want an audiOS.
somethnig to compose and play music, with cool graphix.
means that it needs multithreading, dma control, graphic driver, file system, protected mode capabilities, dsp algorithms...

and internet connexion, for audio streaming servicing, a little server, some html capabilities, and irc/jabber protocol support just to catch girls on chats. Wink

i need 3D and 2D graphix, with ray tracing.

i need coffee, and some forbidden plants from morocco or holland...

a good name for an os would NOS (Not Operating System). then, maybe a challenge would be, make a NOS in less than 0 bytes. Laughing
Post 27 May 2010, 10:25
View user's profile Send private message Visit poster's website Reply with quote
adroit



Joined: 21 Feb 2010
Posts: 252
adroit 27 May 2010, 19:20
I see that the purpose is required before design is considered. The purpose of my OS is to run applications from my own software design (not PE, COM, or MZ), and have some graphics.

Protected mode is the way to go but, Windows 1.0 ran in real mode, and it had GUI. But is was 16-bit, which meant it was limited to 256-colors. In PM we can use VESA, which means you can have lots of pixels.

revolution is logically right. Before we can design, we must know what we want. Would you design a building, without knowing its purpose? I wouldn't
Post 27 May 2010, 19:20
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 27 May 2010, 20:00
MeshNix wrote:
Windows 1.0 ran in real mode, and it had GUI. But is was 16-bit, which meant it was limited to 256-colors. In PM we can use VESA, which means you can have lots of pixels.
Wrong. In RM (even without VESA) you can use videoadapter up to its capabilities (VBE only makes that usage easier).

Design vs. purpose looks like chicken-and-egg dilemma: OS doesn't have purpose itself, applications do. To use your building analogy, OS is the basement and communications: they can look different for different types of buildings, but the principles generally are the same. In the same way, range of constructions that can be reliably and easily built on top of particular basement doesn't seem to be wide.
Post 27 May 2010, 20:00
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20519
Location: In your JS exploiting you and your system
revolution 27 May 2010, 23:28
baldr wrote:
Design vs. purpose looks like chicken-and-egg dilemma: OS doesn't have purpose itself, ...
Yeah it does. It provides a framework for the apps. That is it's purpose. So you have to know what app you want/need to run so that you can know what stuff to support in the OS. If you say "I wanna support everything" then you had better hire ~1,000,000,000 programmers to help to complete the task before the world ends. The thing is we just don't have time to do everything so we have to choose only the things that are needed/desired.
baldr wrote:
... applications do. To use your building analogy, OS is the basement and communications: they can look different for different types of buildings, but the principles generally are the same. In the same way, range of constructions that can be reliably and easily built on top of particular basement doesn't seem to be wide.
We can't just keep extending buildings as we please. If you build the base to support a 20 storey weight then you can't simply come along later and add another 20 storeys (unless you like to see it crumble under the stress). The building analogy doesn't really work well because with software it is more flexible and we can extend it. But we will still come to a point where we have to rip out the foundations and start over due to some conflict or problem.
Post 27 May 2010, 23:28
View user's profile Send private message Visit poster's website Reply with quote
adroit



Joined: 21 Feb 2010
Posts: 252
adroit 27 May 2010, 23:57
(Sorry if I am constantly asking questions)

It may not apply but it draws the same principle where a purpose must be defined before any further implementations must be done.

-----------
I have chosen RM to run for my first version (for its simplicity), then I can develop a more complex system.
But could someone suggest which mode is best.

-----------
If I am running on an 80386, then BIOS starts in V86 mode, instead of Real mode, right? Then do I have to enter real mode, or is V86 mode compatible to automatically enter RM when necessary?

I would really like to have a successful OS, but I don;t know how to actually have a full progressive development.
Post 27 May 2010, 23:57
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 28 May 2010, 01:04
revolution wrote:
It provides a framework for the apps. That is it's purpose.
That's my point too: only I emphasize the fact that without useful applications OS is dead. And useful applications require feature-rich OS.

Do we have any real OS built for apparent purpose? I think, 80% of applications use only 20% of API any OS provides.

Anyway, this becomes too scholastic (and off-topic?).

----8<----
MeshNix wrote:
If I am running on an 80386, then BIOS starts in V86 mode, instead of Real mode, right? Then do I have to enter real mode, or is V86 mode compatible to automatically enter RM when necessary?
Nope, BIOS seldom leaves RM.
Post 28 May 2010, 01:04
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20519
Location: In your JS exploiting you and your system
revolution 28 May 2010, 03:28
MeshNix wrote:
But could someone suggest which mode is best.
No. No one, except you, can tell you which mode is best for you. You must decide based upon what you want to do.

roboman already described some of the differences to you.

http://board.flatassembler.net/topic.php?p=114913#114913
Post 28 May 2010, 03:28
View user's profile Send private message Visit poster's website Reply with quote
cod3b453



Joined: 25 Aug 2004
Posts: 618
cod3b453 29 May 2010, 10:03
Personally, I have a little necessary 16 bit code (A20, BIOS mem-map, VESA setup and disk copy) before switching to 32bit protected mode. From here onwards I have a graphical interface and all the memory I need to access and so I would recommend anyone to aim for this.

As others have said, the rest is based on your goals and how you want things to work. Aspects such as paging, 64 bit code, task switching and API calls may all influence your decisions.
Post 29 May 2010, 10:03
View user's profile Send private message Reply with quote
adroit



Joined: 21 Feb 2010
Posts: 252
adroit 30 May 2010, 18:03
It may be a little difficult as I am only a beginner. I guess it's all on me to develop the functionalities.

-------------
Back to business
An OS uses drivers to interface with devices. I would like to know how to code a keyboard driver.

One thing I've got is the I/O ports is 60h and the status port is 64h. I've got the basics.
?How do I convert scan codes to ASCII?

Code:
...

KbdHndler
in al,60h

;what else do I do?
;how do I convert the scan codes?

mov al,20h
out 20h,al
iret

...
    
Post 30 May 2010, 18:03
View user's profile Send private message Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr 30 May 2010, 18:41
MeshNix,

xlat+tables; several cmps and subtables for ranges.

Are you done with IRQ setup already? Probably polling keyboard instead could be easier.
Post 30 May 2010, 18:41
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2, 3, 4  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.