Author Topic: Custom x86 OS  (Read 23352 times)

Offline Structure

  • Jr. Member
  • *
  • Posts: 21
Custom x86 OS
« on: January 21, 2020, 09:17:12 PM »
I have developed a bootLoader and can load/run assembled binarys in a single process setup where the applications take control. I hope to design a nice OS and was wondering if anyone has done this and if they have any links/info they could share. Thanks in advance  8)

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Custom x86 OS
« Reply #1 on: January 21, 2020, 11:26:14 PM »
Hi Structure,

... unfortunately... my computer crashed about two years ago and I didn't have a recent backup...

If you search this forum for "Zulfi" you will find a few topics from "Zulfi Kahn". He started out with A Tasm bootloader I helped him convert to Nasm. I thought it sounded like "homework" and it was - he was the instructor. :) I worked it up into the rudimentary beginning of an "OS". Just a couple of commands.  I realized, somewhere along the line, that I didn't know where I was going. How was my OS going to be better than Linux? Even better than 'doze? I didn't know... and that's where I quit. The little I had probably wouldn't help you much but you might have been interested in looking at it. But an IDE drive won't even plug in to a modern computer so I'm pretty much "out of business".

osdev.org and news:alt.os.developement have info on this topic... They'll tell you to read, read read before you write a line of code...

Best,
Frank


Offline Structure

  • Jr. Member
  • *
  • Posts: 21
Re: Custom x86 OS
« Reply #2 on: January 21, 2020, 11:43:51 PM »
Quote
  I didn't know where I was going.
Quote
that's where I quit.
We are not the same.

Quote
before you write a line of code...
too late.

Offline debs3759

  • Global Moderator
  • Full Member
  • *****
  • Posts: 224
  • Country: gb
    • GPUZoo
Re: Custom x86 OS
« Reply #3 on: January 21, 2020, 11:59:26 PM »
I never got beyond writing a FAT12 boot sector (it could load and pass control to a 16-bit binary in the root directory, with any amount of fragmentation) and a CPUID app that can detect anything from 808x up to the first 64-bit CPUs. Then my poor health got in the way. I hope to resume coding this year - health hasn't improved, but has stabilised. I did plan to write a simple 32-bit OS that can detect and initialise a wide range of hardware, and I hope to at least get that underway. Might write a DOS based IDE in nasm, and convert my windowing code to nasm as well (in MSVC 1.52, I wrote a windowing system for DOS that could load 1024 child windows and switch between them, I forget how much memory it needed, but it could work on a 386 at a usable speed).
My graphics card database: www.gpuzoo.com

Offline Structure

  • Jr. Member
  • *
  • Posts: 21
Re: Custom x86 OS
« Reply #4 on: January 22, 2020, 12:35:31 AM »
Quote
a FAT12 boot sector
I currently don't have a file system, it runs off disks.
Quote
I wrote a windowing system for DOS
forget about DOS...
Quote
windowing system
This is where i am at... I am currently experimenting with display modes.


Offline Structure

  • Jr. Member
  • *
  • Posts: 21
Re: Custom x86 OS
« Reply #5 on: January 22, 2020, 12:46:05 AM »
I have an IDE as well... Which is a collection of .exe tools for windows.

example.aro:
Code: [Select]
<print.asm>

string: db "hello world", 0

__entry:
    print string

This can be assembled as a .img and run from the bootLoader.
Step 1 cmd: arrow example
Step 2 cmd: nasm example.asm -o example.img

There are some files that are automatically included to construct the proper structure to run on the OS. It currently requires an immutable directory structure as well, which will change eventually with maybe a settings.ini ? idk.

I considered writing a development environment in the OS, but it makes no sense to me. It makes more sense to use the power of windows and create the binary's. As far as the file system, this is trivial imo. As long as the disks run, organizing them on the hard drive is simple.

To run a disk you just push F5 at the command prompt.

After the application runs it returns to video mode 0x03 and the command prompt.
« Last Edit: January 22, 2020, 12:55:58 AM by Structure »

Offline Structure

  • Jr. Member
  • *
  • Posts: 21
Re: Custom x86 OS
« Reply #6 on: January 22, 2020, 12:56:51 AM »
One thing i would really like is if someone could test it on real hardware... I'm currently using virtualization.

Offline debs3759

  • Global Moderator
  • Full Member
  • *****
  • Posts: 224
  • Country: gb
    • GPUZoo
Re: Custom x86 OS
« Reply #7 on: January 22, 2020, 01:16:06 AM »
Quote
a FAT12 boot sector
I currently don't have a file system, it runs off disks.

How do you load your loader without a file system? Is it just a single binary file so far?

Quote
Quote
I wrote a windowing system for DOS
forget about DOS...[/quote

When I rewrite it in assembler, it will use BIOS calls, not DOS calls. Only reason it was written for DOS was because at the time I was using MSVC :) Simple enough to use Int 10h instead of int 21h.

Quote
Quote
windowing system
This is where i am at... I am currently experimenting with display modes.

I only found my code a few days ago. I aimed to be VGA compatible, and used 800x600 mode. I forget exactly which mode though, I need to read my code thoroughly. Good thing all my code is heavily commented :) When I have done some work on it, it will be posted in the example code area. It'll be a few months off though, as I am working on a big update to the gpuzoo.com website at the moment. When I start coding again, my IDE will be my first project, and that will make heavy use of my windowing routines. As always, all my code will be public domain.
My graphics card database: www.gpuzoo.com

Offline Structure

  • Jr. Member
  • *
  • Posts: 21
Re: Custom x86 OS
« Reply #8 on: January 22, 2020, 01:26:14 AM »
Quote
public domain
If it's public domain i will differ.

I'm having many issues with VESA, very complicated imo.

Quote
working on a big update to the gpuzoo.com website at the moment
take your time. Do whatever you want. :)

Quote
public domain
I am not public domain. OEM

Don't forget... many people steal from you when it's public. This has become a real problem.

95% of "programmers" google all day and copy/paste

« Last Edit: January 22, 2020, 02:00:06 AM by Structure »

Offline Structure

  • Jr. Member
  • *
  • Posts: 21
Re: Custom x86 OS
« Reply #9 on: January 22, 2020, 08:02:23 PM »
Quote
How do you load your loader
It is a disk. Put the disk in and turn on the computer.

Quote
Is it just a single binary file
It is. The applications are then run off of the second disk.
also single files.

Quote
so far?
lol, it works. That's a good start  8)
« Last Edit: January 22, 2020, 08:05:28 PM by Structure »

Offline Structure

  • Jr. Member
  • *
  • Posts: 21
Re: Custom x86 OS
« Reply #10 on: January 24, 2020, 02:29:15 AM »
Anyone wanting to endeavor on such a thing... pm me. I'm going to get it done regardless.

Offline Structure

  • Jr. Member
  • *
  • Posts: 21
Re: Custom x86 OS
« Reply #11 on: January 28, 2020, 01:09:07 PM »
I can now put several applications on a disk.  8)

Quote
To run a disk you just push F5 at the command prompt.

I changed this to just type in the application name and hit enter.


« Last Edit: January 28, 2020, 09:08:17 PM by Structure »