Page 2 of 3
Re: SauOS: ready for code!
Posted: Wed Apr 22, 2009 9:00 pm
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)
Re: SauOS: ready for code!
Posted: Sat Apr 25, 2009 4:39 pm
by imate900
Let's don't make this thread about basing off tutorials for your wee tiny OS.
Re: SauOS: ready for code!
Posted: Mon Apr 27, 2009 4:11 pm
by imate900
I am working on SauOS from scratch.
Re: SauOS: ready for code!
Posted: Tue Apr 28, 2009 6:15 pm
by imate900
Currently, I'm working on syscalls
I will soon port newlib, bash and coreutils soon in a few weeks...
Re: SauOS: ready for code!
Posted: Tue Apr 28, 2009 7:56 pm
by pcmattman
I still can't see anything in your SVN repo?
Re: SauOS: ready for code!
Posted: Thu Apr 30, 2009 1:08 pm
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
Re: SauOS: ready for code!
Posted: Thu Apr 30, 2009 1:46 pm
by imate900
To make everyone happy, I will be commiting to SVN that I have now.
Re: SauOS: ready for code!
Posted: Thu Apr 30, 2009 1:48 pm
by imate900
Re: SauOS: ready for code!
Posted: Thu Apr 30, 2009 4:19 pm
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.
Re: SauOS: ready for code!
Posted: Thu Apr 30, 2009 5:05 pm
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.
Re: SauOS: ready for code!
Posted: Thu Apr 30, 2009 7:24 pm
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)
Re: SauOS: ready for code!
Posted: Thu Apr 30, 2009 7:32 pm
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.
Re: SauOS: ready for code!
Posted: Thu Apr 30, 2009 11:02 pm
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.
Re: SauOS: ready for code!
Posted: Fri May 01, 2009 5:57 pm
by imate900
Yah, I was pressured, and I was not even done. I guess I'll write parts in C
Re: SauOS: ready for code!
Posted: Mon May 04, 2009 3:40 pm
by imate900
I am going to commit my rewritten sc2ascii in C. It should work...