Author Topic: Operating system  (Read 7263 times)

Offline Bloxor

  • New Member
  • Posts: 1
Operating system
« on: March 21, 2015, 10:55:27 PM »
Hello! I'm going attempt to make an operating system! If you know anything about operating systems, you'd know they require knowledge in Assembly.
Could anyone link me to a NASM assembly tutorial?
I can't seem to find a good one.

And help with the operating system (such as a tutorial) would also be nice!

Any help would be appreciated, thanks!

Offline shaynox

  • Full Member
  • **
  • Posts: 118
  • Country: gr
Re: Operating system
« Reply #1 on: March 22, 2015, 12:55:16 AM »
Here's some question/instruction for build os (from my experience):


* :
Code: [Select]
Text mode is already set after BIOS jump into bootloader instead graphic mode.

For use graphic mode, the only way, with that configuration (nothing), is use vesa driver (implemented into your BIOS).

And even if vesa (http://www.vesa.org/) corporation has stopped their driver development (latest is VBE Core 3.0 [Sep. 1998]), this driver can be running on all gpu and be continue to be compatible for future gpu too
(for see that you can run grub into qemu then once you are in shell, you type vbeprobe then you can see all list graphic mode).

Unfortunately like you can't manage RAM in flat memory in x64 (one big array) or I don't know how to do that, unlike in x86 mode you can be in flat memory. So it will be a little difficult to manage vesa in x64.

Because to access to video ram with vesa driver, you need to use MMIO (Memory Mapped Input/Ouput) method (zone memory who is programmed to be transfer into memory/register devices) like PMIO (Port Mapped Input/Ouput) but it use port instead RAM.

** :
Code: [Select]
It depend of your cpu's capacity (check it by write your cpu's mark into bing, choose ark.intel link, then look into Instruction Set Extensions list)

And about testing your OS, you can choose emulator like qemu, bochs, ... , but I warn you, it's just better to test your OS with real machine, cause even if emulator is good, it's not at 100% identic to a real machine.

So your OS can work into qemu, but not on real machine and vice versa(qemu don't support avx extension, and bochs too (about my test I did)

Here's two kind of OS, one is in text mode (x64) and other graphic (x86), for the text mode you can test it with qemu but don't touch the mouse while typing command, else the mouse will be a keyboard :D
And for the other one, qemu don't work, only in real machine.

Vesa driver documentation: http://wqaxs36.perso.sfr.fr/Project/Computer_Science/course/VESA%20BIOS%20Extension.zip
« Last Edit: April 08, 2015, 10:12:29 PM by shaynox »