OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Mar 29, 2024 1:58 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Weevil (planned)
PostPosted: Thu Feb 05, 2015 3:20 pm 
Offline

Joined: Fri Sep 20, 2013 2:34 am
Posts: 15
Finally I started working on my own operating system :). I want it to be like MS-DOS except it will not have any graphical apps (only text games :P). Currently there is nothing but the VGA driver. Maybe somebody can take a look at the code so I be sure that it contains no errors? :)

Gitrepo is here https://github.com/Vik2015/weevil/.

P. S. I hope my scrolling function is ok?

_________________
My own MS-DOS like OS :)
https://github.com/Vik2015/weevil/

http://bestsoft.azurewebsites.net/ wrote:
With Bestsoft Space you can write operating system eaven if it your first software.


Top
 Profile  
 
 Post subject: Re: Weevil (planned)
PostPosted: Thu Feb 05, 2015 3:56 pm 
Offline
Member
Member

Joined: Tue Aug 19, 2014 1:20 pm
Posts: 74
Maybe you should have different directories for different platforms, just in case you wanted to expand in the future.


Top
 Profile  
 
 Post subject: Re: Weevil (planned)
PostPosted: Fri Feb 06, 2015 1:45 am 
Offline
Member
Member
User avatar

Joined: Thu Mar 27, 2014 3:57 am
Posts: 568
Location: Moscow, Russia
Move your strlen function to a separate file, e.g. string.c

_________________
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay


Top
 Profile  
 
 Post subject: Re: Weevil (planned)
PostPosted: Fri Feb 06, 2015 3:24 am 
Offline

Joined: Fri Sep 20, 2013 2:34 am
Posts: 15
Ok, thanks guys. Repo updated

_________________
My own MS-DOS like OS :)
https://github.com/Vik2015/weevil/

http://bestsoft.azurewebsites.net/ wrote:
With Bestsoft Space you can write operating system eaven if it your first software.


Top
 Profile  
 
 Post subject: Re: Weevil (planned)
PostPosted: Fri Feb 06, 2015 3:58 am 
Offline
Member
Member
User avatar

Joined: Thu Mar 27, 2014 3:57 am
Posts: 568
Location: Moscow, Russia
Vik2015 wrote:
Ok, thanks guys. Repo updated

You should place arch-dependent source files into arch/${ARCH}, arch-independent in the root of src.

_________________
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay


Top
 Profile  
 
 Post subject: Re: Weevil (planned)
PostPosted: Fri Feb 06, 2015 4:14 am 
Offline

Joined: Fri Sep 20, 2013 2:34 am
Posts: 15
Roman wrote:
Vik2015 wrote:
Ok, thanks guys. Repo updated

You should place arch-dependent source files into arch/${ARCH}, arch-independent in the root of src.


Uhh, not sure what do you mean. Something like this?
Code:
/ #These files are platform-independent. Makefile can be run as `make i686' && `make ...' && ...
  Makefile
  grub.cfg
  # Not sure about those two - they may be platform dependent
  boot.asm
  linker.ld
  i686/
    src/
      kernel.c
      ...
  .../
    src/
      ...

_________________
My own MS-DOS like OS :)
https://github.com/Vik2015/weevil/

http://bestsoft.azurewebsites.net/ wrote:
With Bestsoft Space you can write operating system eaven if it your first software.


Top
 Profile  
 
 Post subject: Re: Weevil (planned)
PostPosted: Fri Feb 06, 2015 4:22 am 
Offline
Member
Member

Joined: Tue Nov 08, 2011 11:35 am
Posts: 453
Roman wrote:
You should place arch-dependent source files into arch/${ARCH}, arch-independent in the root of src.

Topicstarter wants smth like MS-DOS, due to this fact I think that portability and expandable architecture aren't planned at all.

Of course, I should mention this starting point: http://wiki.osdev.org/Beginner_Mistakes .
And one more: http://wiki.osdev.org/Getting_Started .


Last edited by Nable on Fri Feb 06, 2015 4:24 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Weevil (planned)
PostPosted: Fri Feb 06, 2015 4:24 am 
Offline
Member
Member
User avatar

Joined: Thu Mar 27, 2014 3:57 am
Posts: 568
Location: Moscow, Russia
Vik2015 wrote:
Roman wrote:
Vik2015 wrote:
Ok, thanks guys. Repo updated

You should place arch-dependent source files into arch/${ARCH}, arch-independent in the root of src.


Uhh, not sure what do you mean. Something like this?
Code:
/ #These files are platform-independent. Makefile can be run as `make i686' && `make ...' && ...
  Makefile
  grub.cfg
  # Not sure about those two - they may be platform dependent
  boot.asm
  linker.ld
  i686/
    src/
      kernel.c
      ...
  .../
    src/
      ...

Code:
Makefile
grub.cfg
linker.ld # Can be dependent.
arch/
       /x86
       /...
main.c

All assembly files are arch-dependent, C files can be different, e.g. your VGA driver is arch-dependent, string.c - no.

_________________
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay


Top
 Profile  
 
 Post subject: Re: Weevil (planned)
PostPosted: Fri Feb 06, 2015 4:26 am 
Offline
Member
Member
User avatar

Joined: Thu Mar 27, 2014 3:57 am
Posts: 568
Location: Moscow, Russia
Nable wrote:
Roman wrote:
You should place arch-dependent source files into arch/${ARCH}, arch-independent in the root of src.

Topicstarter wants smth like MS-DOS, due to this fact I think that portability and expandable architecture aren't planned at all.

Of course, I should mention this starting point: http://wiki.osdev.org/Beginner_Mistakes .
And one more: http://wiki.osdev.org/Getting_Started .

His OS is already unlike DOS: written in C, 32-bit and protected.

_________________
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
- Alan Kay


Top
 Profile  
 
 Post subject: Re: Weevil (planned)
PostPosted: Fri Feb 06, 2015 5:12 am 
Offline
Member
Member
User avatar

Joined: Sat Dec 27, 2014 9:11 am
Posts: 901
Location: Maadi, Cairo, Egypt
Vik2015 wrote:
[...] I want it to be like MS-DOS

So it will be a 16-bit DOS-like OS? It's quite odd you're using GRUB for that though.

_________________
You know your OS is advanced when you stop using the Intel programming guide as a reference.


Top
 Profile  
 
 Post subject: Re: Weevil (planned)
PostPosted: Fri Feb 06, 2015 5:25 am 
Offline

Joined: Fri Sep 20, 2013 2:34 am
Posts: 15
omarrx024 wrote:
Vik2015 wrote:
[...] I want it to be like MS-DOS

So it will be a 16-bit DOS-like OS? It's quite odd you're using GRUB for that though.


Well, I didn't want to create my own bootloader (thought I know how - using BIOS calls to read/load sectors, etc.). I am also gonna *try* to write it using only real mode (64kb memory should be enough I guess?) but without using any BIOS calls (or just minimal amount of them).

P. S. It is my first OS dev project after all, don't expect me to be a pro && understand everything :)

_________________
My own MS-DOS like OS :)
https://github.com/Vik2015/weevil/

http://bestsoft.azurewebsites.net/ wrote:
With Bestsoft Space you can write operating system eaven if it your first software.


Top
 Profile  
 
 Post subject: Re: Weevil (planned)
PostPosted: Fri Feb 06, 2015 5:31 am 
Offline
Member
Member
User avatar

Joined: Sat Dec 27, 2014 9:11 am
Posts: 901
Location: Maadi, Cairo, Egypt
Vik2015 wrote:
Well, I didn't want to create my own bootloader (thought I know how - using BIOS calls to read/load sectors, etc.). I am also gonna *try* to write it using only real mode (64kb memory should be enough I guess?) but without using any BIOS calls (or just minimal amount of them).

You should see this page. It explains on how to switch between 32-bit and 16-bit mode, so you can use BIOS interrupts for disk access. It's also good because your system probably won't be multitasking, seeing it's DOS-like. If you don't want to do this, see Virtual 8086 Mode, which allows you to execute 16-bit code in a 32-bit environment.
For a beginner, the first link is easier to follow. ;)

_________________
You know your OS is advanced when you stop using the Intel programming guide as a reference.


Top
 Profile  
 
 Post subject: Re: Weevil (planned)
PostPosted: Fri Feb 06, 2015 6:17 am 
Offline
Member
Member
User avatar

Joined: Sat Mar 31, 2012 3:07 am
Posts: 4591
Location: Chichester, UK
Rather than all the kludging with 16-bit and/or Virtual 8086 mode, why not just write a proper disk driver?


Top
 Profile  
 
 Post subject: Re: Weevil (planned)
PostPosted: Fri Feb 06, 2015 6:25 am 
Offline
Member
Member
User avatar

Joined: Sat Dec 27, 2014 9:11 am
Posts: 901
Location: Maadi, Cairo, Egypt
iansjack wrote:
Rather than all the kludging with 16-bit and/or Virtual 8086 mode, why not just write a proper disk driver?

Because he wants a DOS-like OS, which probably means it would be 16-bit.

_________________
You know your OS is advanced when you stop using the Intel programming guide as a reference.


Top
 Profile  
 
 Post subject: Re: Weevil (planned)
PostPosted: Fri Feb 06, 2015 6:52 am 
Offline
Member
Member
User avatar

Joined: Mon Jun 16, 2014 5:59 am
Posts: 543
Location: Shahpur, Layyah, Pakistan
iansjack wrote:
Rather than all the kludging with 16-bit and/or Virtual 8086 mode, why not just write a proper disk driver?

A single driver is not enough for IDE hard disk, SATA, USB, floppy etc. But a one BIOS interrupt can do that.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: Fahr and 31 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group