flat assembler
Message board for the users of flat assembler.

Index > OS Construction > HELPS TO START OWN OPERATING SYSTEM

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
Pirata Derek



Joined: 31 Oct 2008
Posts: 259
Location: Italy
Pirata Derek
The N.A.X.O.S. Project.

I and my programmers friends started making another FASM based
free operative system, for hobby.

We called it: New Abstraction X, Operative System (NAXOS)

And it should be a very light, flexible and Hardware-indipendent
(as posible) system, now for 32 bits and later for 64 bits...

Like linux, NAXOS must be editable and personalized by anyone,
totally free, and more advantages we don't think now.

All My friend are High level languages programmers (Visual basic,
Java, Aspnet) and they don't know what to do for NAXOS basics
development (Primitive Kernel, Hardware comunication, ect...),
so they told me: YOU MAKE THE BASIC I/O SYSTEM, because you are
the only ASM programmer!

Now i need a little help cause i don't konw what ports to use,
for example, the audio device, the mouse controller port, ect

SOME QUESTION THAT KEEP MESSING INTO MY HEAD:

- What are the ports for: MOUSE management, AUDIO DEVICES and
CMOS?

- What are the relatives values i have to send (OUT) or receve (IN)
in these ports?

- Are there any complete lists of these ports and values?


Thanks...
Post 05 Nov 2008, 09:09
View user's profile Send private message Send e-mail Reply with quote
Pirata Derek



Joined: 31 Oct 2008
Posts: 259
Location: Italy
Pirata Derek
I think is better if i leave a copy of my started work to Everybody
want to see it and correct any possible error into it.

The uploaded achive contains the main hardware manager i made for the
NAXOS system, in FASM source file and all its includes.

I called "PHAL-32" the DLL that can be used for testing with a debugger
and it has his real "Hardware Input Output Manager", the source file HIOM.inc
into the includes directory.

I'll be happy if you all answer to any questions i'll ask every-day!

Also HAVE PHUN in any personal modify you make...


Description: Source code
Download
Filename: PHAL-32.zip
Filesize: 98.89 KB
Downloaded: 226 Time(s)

Post 05 Nov 2008, 09:12
View user's profile Send private message Send e-mail Reply with quote
DJ Mauretto



Joined: 14 Mar 2007
Posts: 464
Location: Rome,Italy
DJ Mauretto
Ciao Wink
imparare a programmare tutto l'hardware da zero senza avere alcuna base
(sembra che tu non conosca neanche le cose più comuni) la vedo una
impresa titanica,considerando che io ci ho messo più di 4 anni.
Poi considerando che la maggior parte dei datasheet non sono resi disponibili
dai produttori di hardware ti sei cacciato in un problemone con i tuoi amici Razz
Tuttavia per quanto riguarda una lista delle porte Hardware la troverai nei comuni datasheet dei chipset della INTEL,a questo devi aggiungere qualche altro standard video tipo VGA e VESA( presto diventerà obsoleto se non lo è già)
e dovrai litigare ogni giorno con la compatibilità tra i diversi pc,benchè alcuni standard esistano diversi produttori non li seguono. Confused
Il mouse PS/2 lo puoi programmare attraverso il comune Controller della tastiera,condivide le stesse porte,ma se non sai cosa fare con una semplice lista delle porte non ci fai niente.
ci sono diversi tutorial in rete,inizia a studiare e rivolgiti ai forum dove si sviluppano sistemi operativi,di solito hanno dei wiki con esempi di codice
per l'hardware più comune( spero che tu non voglia semplicemente copiare e incollare codice scritto da altri) Razz


Hello Wink
learn to program all the hardware from scratch without any basis
(it looks like you do not know even the most common) I see a
titanic undertaking, considering that I have put more than 4 years.
Then Whereas most of the datasheet are not available
by manufacturers of hardware you've hunted in a big problem with your friends Razz
But regarding a list of HW ports you'll find the datasheet in the Intel chipset, you must add to this some other type standard VGA video and VESA (soon become obsolete if it is not already)
and you will have to fight every day with the compatibility between different computers, although some standards exist different manufacturers do not follow. Confused
The PS / 2 mouse you can program through the common controller keyboard, shares the same ports, but if you do not know what to do with a simple list of ports you do not do anything.
There are several tutorials on the network, starts to study and ask the forum to develop operating systems, usually have the wiki with code samples
for the most common hardware (I hope you do not want to simply copy and paste code written by others) Razz

_________________
Nil Volentibus Arduum Razz


Last edited by DJ Mauretto on 05 Nov 2008, 11:51; edited 2 times in total
Post 05 Nov 2008, 11:32
View user's profile Send private message Reply with quote
Pirata Derek



Joined: 31 Oct 2008
Posts: 259
Location: Italy
Pirata Derek
Più che altro il problema è sapere cosa inviare alle porte, e con quale ordine.
Ora mi metto a drovare questi datasheet...
Per lo meno il codice globalmente sta messo bene? (SE L?HAI VISTO)

L'ordine per leggere un settore penso che sia ok!?!?

IN ENGLISH:
My main problem is to know what codes i have to ouptut to any single ports and in what order i have to do this.
Now i'm going to find theese datasheet...
Are the codes globally ok?

For example, the order or outputs for reading an hard-disk sector is correct?
Post 05 Nov 2008, 11:43
View user's profile Send private message Send e-mail Reply with quote
DJ Mauretto



Joined: 14 Mar 2007
Posts: 464
Location: Rome,Italy
DJ Mauretto
Gli ho dato un occhiata di fretta,adesso non ho tempo
comunque se ti piace studiare codice ci sono 2 sistemi
operativi avanzati scritti in asm (fasm) che hanno il codice open source
e sono Menuet OS e Kolibri OS, li troverai la gestione a basso livello
del comune hardware Wink

I gave a look in a hurry, now I have no time
however, if you like to study code there are 2 advanced OS written in asm (fasm) with the open source code
Menuet OS and Kolibri OS, you'll find them managing low-level of
the common hardware: wink:

_________________
Nil Volentibus Arduum Razz
Post 05 Nov 2008, 12:09
View user's profile Send private message Reply with quote
Pirata Derek



Joined: 31 Oct 2008
Posts: 259
Location: Italy
Pirata Derek
Smile Ora mi scarico i sorgenti, grazie comunque.
Tranquy, io ci sto quasi sempre, mi collego dal lavoro e poi non ho fretta, gli altri hanno da fare il resto del sistema operativo.
Io ho solo da fare l'astrazione hardware e il kernel-core Mad

ENGLISH: Cool
Now i'm going to download the source code of MENUET OS or KOLIBRY.
Thanks however.
I'm always here, i'm not hurry...
I only have to build the HARDWARE ABSTRACTION LAYER and the KERNEL-CORE for the N.A.X.O.S.
Post 05 Nov 2008, 12:12
View user's profile Send private message Send e-mail Reply with quote
baldr



Joined: 19 Mar 2008
Posts: 1651
baldr
Pirata Derek,

"To boldly go where no man has gone before..."

Do you have design documents for you project? Target architectures, goals to achieve, thoroughly documented methods to achieve that goals…

There is no "one source fits all" in assembly, for it's inherently CPU-dependent. Portability may exist in HLL world, but with CPU you have to talk native language, no matter how abstract is your hardware abstraction layer (unless emulation is involved).

Back to your questions:

Mice are peripherals, they interface with computer through some kind of adapter (USB, PS/2-style mouse port, InPort, serial to name some). Each kind (of mice) use some protocol for information interchange. Google is your friend.

Audio devices can easily vary from good old SoundBlaster to USB speakers. Which kind of them do you have to control?

CMOS interface is the most easy part, byte ports 0x70/0x71 as index/data.

Take it serious: OS development is a complex and bothersome process, do you have guts to stand the perils? Read more. Read again. And read even more. Develop working boot sector for FAT12 3.5" floppy. Play with it for a while. Make it do something useful, e.g. load a binary file and transfer control to it. Rewrite it for FAT16/NTFS/whatever. Ensure it works for MBR-style partition. That's the way the story goes… Wink
Post 05 Nov 2008, 19:36
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
Pirata Derek wrote:
- What are the ports for: MOUSE management, AUDIO DEVICES


Mouse: $60...$64

No standard for audio Sad

> Are there any complete lists of these ports and values?

RTFF: http://board.flatassembler.net/topic.php?t=4816
Post 07 Nov 2008, 07:50
View user's profile Send private message Reply with quote
Pirata Derek



Joined: 31 Oct 2008
Posts: 259
Location: Italy
Pirata Derek
Good Smile , i found for VGA,keyboard, Mouse, and a part of USB programming!
Post 07 Nov 2008, 08:26
View user's profile Send private message Send e-mail Reply with quote
Pirata Derek



Joined: 31 Oct 2008
Posts: 259
Location: Italy
Pirata Derek
Windows don't let me test I/O comunication using IN and OUT instruction!
Is there a method to execute these instruction in Windows XP?
I can do it olny on PC booting with a modifyed Floppy bootsector.
Post 10 Nov 2008, 10:35
View user's profile Send private message Send e-mail Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17671
Location: In your JS exploiting you and your system
revolution
You can use some tools to give userland programs I/O access. See one of my previous posts for an attachment.
Post 10 Nov 2008, 10:51
View user's profile Send private message Visit poster's website Reply with quote
Pirata Derek



Joined: 31 Oct 2008
Posts: 259
Location: Italy
Pirata Derek
This tool is very usefull! Smile

I'm finding a good "Driver programming" manual for windows (in assembly)... where i can find it?
Post 10 Nov 2008, 11:35
View user's profile Send private message Send e-mail Reply with quote
Pirata Derek



Joined: 31 Oct 2008
Posts: 259
Location: Italy
Pirata Derek
My program always perform the IN instruction to wait a character from the buffer keyboard;
It increases the CPU level usage....

Is there a way to get these characters, or to do any I/O operations, without increase the CPU level usage so much?

For example: The CPU automatically tell me when a char is presend and i don't have to check always if it's present.
Post 17 Nov 2008, 12:34
View user's profile Send private message Send e-mail Reply with quote
DJ Mauretto



Joined: 14 Mar 2007
Posts: 464
Location: Rome,Italy
DJ Mauretto
Ciao,
from ralph brown interrupt list
Quote:
IRQ1 - KEYBOARD DATA READY

Desc: This interrupt is generated when data is received from the keyboard. This is normally a scan code (from either a keypress *or* a key release), but may also be an ACK or NAK of a command on AT-class keyboards.

_________________
Nil Volentibus Arduum Razz
Post 17 Nov 2008, 17:47
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
> Windows don't let me test I/O comunication using IN and OUT instruction!
> Is there a method to execute these instruction in Windows XP?

Laughing

> tools to give userland programs I/O access
> This tool is very usefull!

NOT that sure Confused

> from ralph brown interrupt list
> IRQ1 - KEYBOARD DATA READY

Next task: give userland programs IDT access Laughing

Are you sure that messing into running XP is the preferred way to test your OS ?
Post 21 Nov 2008, 02:42
View user's profile Send private message Reply with quote
Pirata Derek



Joined: 31 Oct 2008
Posts: 259
Location: Italy
Pirata Derek
How can i test if the input & output comunication are correct?

With the "User Port" program for I/O testing i can check if the "PHAL-32"
work correctly, without restart everytimes the PC or emulating it!

Just a FAST way to do it...

NOTE: Phal-32 is the hardware abstraction layer library of my O.S
Post 21 Nov 2008, 08:42
View user's profile Send private message Send e-mail Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
Pirata Derek wrote:
With the "User Port" program for I/O testing i can check if the "PHAL-32" work correctly, without restart everytimes the PC or emulating it! Just a FAST way to do it... NOTE: Phal-32 is the hardware abstraction layer library of my O.S


Is this dream or working reality ? Maybe you can test the PC speaker sound such a way ... but I doubt you will be able to test the HD also Confused

BOCHS is your friend ... but you must test at least occasionally "in real" also, otherwise your OS will never work on "real" hardware Wink
Post 22 Nov 2008, 13:22
View user's profile Send private message Reply with quote
Pirata Derek



Joined: 31 Oct 2008
Posts: 259
Location: Italy
Pirata Derek
To DOS386:

With this program i can test everything, also if a keyboard is pressed or some HD-Drive I/O procedures!

But to do this you must be able....

For you i'm going tol make a little program that shows a message everytime you move the mouse, using the "User ports"....

Try to download this program!
I wanna let you see if this is my DREAM

I'LL POST THIS PROGRAM ON MONDAY, BECAUSE NOW I'M NOT HOME.
Post 22 Nov 2008, 14:20
View user's profile Send private message Send e-mail Reply with quote
Pirata Derek



Joined: 31 Oct 2008
Posts: 259
Location: Italy
Pirata Derek
This is the 1st program i told you before;
It hooks any keyboard pressing using the direct I/O.


THIS IS THE NEW VERSION, BETTER...

Read its "Read me.txt" file for more details.

The next post'll be a mouse moviments hooker,
that uses the same I/O control.

Razz


Description: THIS IS THE NEW VERSION.... SIMPLE & FAST
Download
Filename: Keyboard_pressing.zip
Filesize: 100.24 KB
Downloaded: 192 Time(s)

Post 24 Nov 2008, 10:37
View user's profile Send private message Send e-mail Reply with quote
Pirata Derek



Joined: 31 Oct 2008
Posts: 259
Location: Italy
Pirata Derek
This is the program that sees if the mouse is moving, using the I/O directly!

Like the previus program post, it shows a message box.

READ ITS "README.TXT" FILE FOR MORE DETAILS...

the next post'll be a CMOS reader/writer, always using directly the I/O


Description: The program with its source code
Download
Filename: Mouse_Movements.zip
Filesize: 100.25 KB
Downloaded: 209 Time(s)

Post 26 Nov 2008, 12:23
View user's profile Send private message Send e-mail Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  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-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.