SauOS: ready for code!

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
User avatar
nekros
Member
Member
Posts: 391
Joined: Wed Mar 05, 2008 9:10 pm
Contact:

Re: SauOS: ready for code!

Post by nekros »

The tut I'm based really is the bare bones linker script.(I didn't know much about that kind of stuff until osdev)
Working On:Bootloader, RWFS Image Program
Leviathan: http://leviathanv.googlecode.com
Kernel:Working on Design Doc
User avatar
imate900
Member
Member
Posts: 80
Joined: Sat Feb 28, 2009 11:43 am

Re: SauOS: ready for code!

Post by imate900 »

#-o

Let's don't make this thread about basing off tutorials for your wee tiny OS.
Current work on a OS: SauOS (project homepage: http://code.google.com/p/sauos/)
Image
User avatar
imate900
Member
Member
Posts: 80
Joined: Sat Feb 28, 2009 11:43 am

Re: SauOS: ready for code!

Post by imate900 »

I am working on SauOS from scratch.
Current work on a OS: SauOS (project homepage: http://code.google.com/p/sauos/)
Image
User avatar
imate900
Member
Member
Posts: 80
Joined: Sat Feb 28, 2009 11:43 am

Re: SauOS: ready for code!

Post by imate900 »

Currently, I'm working on syscalls :) I will soon port newlib, bash and coreutils soon in a few weeks...
Current work on a OS: SauOS (project homepage: http://code.google.com/p/sauos/)
Image
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Re: SauOS: ready for code!

Post by pcmattman »

I still can't see anything in your SVN repo?
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Re: SauOS: ready for code!

Post by earlz »

He deleted everything from the repo with "SauOS needs help, not a kernel example"

http://code.google.com/p/sauos/source/b ... runk/?r=33
is the last revision before he randomly deleted everything
User avatar
imate900
Member
Member
Posts: 80
Joined: Sat Feb 28, 2009 11:43 am

Re: SauOS: ready for code!

Post by imate900 »

To make everyone happy, I will be commiting to SVN that I have now.
Current work on a OS: SauOS (project homepage: http://code.google.com/p/sauos/)
Image
User avatar
imate900
Member
Member
Posts: 80
Joined: Sat Feb 28, 2009 11:43 am

Re: SauOS: ready for code!

Post by imate900 »

Current work on a OS: SauOS (project homepage: http://code.google.com/p/sauos/)
Image
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: SauOS: ready for code!

Post by Troy Martin »

Code: Select all

sc2ascii:
.loop:
 cmp al, [scodes]
 inc ecx
 je .pt2
 inc [scodes]
 jmp .loop
.pt2:
 ; id the scancode. we saved a counter.
 inc ebx
 cmp ebx, ecx
 je .pt2
 inc [codes]
 jmp .pt2
.yay:
 mov eax, [codes]
 ret

codes: db "`1234567890-=qwertyuiop[]\asdfghjkl;'zxcvbnm,./ "
scodes: db 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 1e, 1f, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 2b, 2c, 2d, 2e, 2f, 30, 31, 32, 33, 34, 35, 39
Don't mean to be discouraging, but:

EPIC FAIL.

Did you even assemble your code before committing it? Or think of the two lines of code you could use instead of "sc2ascii"? I'm pretty sure NASM will choke on scodes, and your sc2ascii call looks waayyy over-complicated.

*wondering if making TBOS32 public domain would be a good idea*

EDIT:

Code: Select all

sys_fork:
 inc [m_pid]
 push [m_pid]
 ret
This will probably make NASM choke since it has no idea what the size of [m_pid] is, and even if it does build, the ret will pop m_pid off of the stack and whatever else it needs, making a bad return address.

I seriously suggest you take a step back and step over your code in your head before committing it and telling the world.
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: SauOS: ready for code!

Post by Troy Martin »

Let me break down what sc2ascii is doing:

Code: Select all

sc2ascii:

.loop:
  cmp al, [scodes]  ; Is AL == the byte pointed to by scodes (the C equivalent of scodes[0])
  inc ecx           ; Increment ECX
  je .pt2           ; If the zero flag is set (which will be changed from what the cmp set it to, after incrementing ECX), jump to .pt2
  inc [scodes]      ; Increment the byte/word/dword pointed to by scodes (what the crap?)
  jmp .loop         ; Jump to .loop

.pt2:
  inc ebx       ; Increment EBX
  cmp ebx, ecx  ; Are EBX and ECX equal?
  je .pt2       ; If they are, go to .pt2
  inc [codes]   ; Increment the byte/word/dword pointed to by codes (effectively changing your ASCII table)
  jmp .pt2      ; Jump to .pt2

.yay:               ; You will never get here since there's no transfer control to this point.
  mov eax, [codes]  ; Move the dword pointed to by codes into EAX
  ret               ; Return.
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
earlz
Member
Member
Posts: 1546
Joined: Thu Jul 07, 2005 11:00 pm
Contact:

Re: SauOS: ready for code!

Post by earlz »

Well, I'm sure his code wasn't quite ready yet.. maybe it is outlandish code, but he was kinda pressured to make that commit... so I wouldn't rack on him so much for "does he assemble before committing" because there is some crazy C code I've had to commit before that was completely commented because for some strange reason it wouldn't compile.(I always commit at night when I'm done programming/going to sleep)
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: SauOS: ready for code!

Post by Troy Martin »

True.
imate900 wrote:Let's don't make this thread about basing off tutorials for your wee tiny OS.
Whatever his OS is, it's definitely a hell of a lot more functional/booting than yours. I don't think you qualify to insult him yet.
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Re: SauOS: ready for code!

Post by neon »

imate900 wrote:Let's don't make this thread about basing off tutorials for your wee tiny OS.
Some of the members here have very nice looking systems. Please look around the forums a little before posting comments like that.

My intent was to discourage you from copying and using code from tutorials because it will not work. Not that it "may not" work but that it simply will not work and the system will fail do to impassable design or construction issues as the system grows in scale and complexity level.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
User avatar
imate900
Member
Member
Posts: 80
Joined: Sat Feb 28, 2009 11:43 am

Re: SauOS: ready for code!

Post by imate900 »

Yah, I was pressured, and I was not even done. I guess I'll write parts in C :shock:
Current work on a OS: SauOS (project homepage: http://code.google.com/p/sauos/)
Image
User avatar
imate900
Member
Member
Posts: 80
Joined: Sat Feb 28, 2009 11:43 am

Re: SauOS: ready for code!

Post by imate900 »

I am going to commit my rewritten sc2ascii in C. It should work... =D>
Current work on a OS: SauOS (project homepage: http://code.google.com/p/sauos/)
Image
Post Reply