Page 118 of 262

Re: What does your OS look like? (Screen Shots..)

Posted: Wed Jan 21, 2015 5:59 am
by narke
omarrx024
I use the gas assembler as it's well tested and documented (somewhat, better than others) and there isn't much choice.
Some parts are in C.

Re: What does your OS look like? (Screen Shots..)

Posted: Wed Jan 21, 2015 6:03 am
by BrightLight
narke wrote:I use the gas assembler
Oh okay, thanks! Just wanted to know what assembler can output PowerPC code :)
Isn't the syntax of gas kind of weird compared to NASM and FASM? :mrgreen:

Re: What does your OS look like? (Screen Shots..)

Posted: Wed Jan 21, 2015 6:19 am
by no92
A lot of people will disagree with what I say here, but I personally like the GAS syntax more than the Intel/NASM. It's not weird, it's simply another way of thinking about assembly. The processors themselves use Intel/NASM operand order, as they were originally manufactured by Intel ("Thank you for stating the obvious!").

Re: What does your OS look like? (Screen Shots..)

Posted: Wed Jan 21, 2015 6:20 am
by mallard
omarrx024 wrote: Isn't the syntax of gas kind of weird compared to NASM and FASM?
It's more the other way around, Intel have their own syntax (used by NASM, FASM, etc.) while most other CPU vendors use AT&T syntax. gas uses AT&T syntax by default on all architectures. Obviously it doesn't make a lot of sense to use Intel syntax on a non-Intel CPU...

Re: What does your OS look like? (Screen Shots..)

Posted: Wed Jan 21, 2015 8:18 am
by Bender
The other reason to use GAS is it supports various architectures, (MIPS, Zilog, PPC, ARM, you name it...),
while NASM and FASM are specifically for Intel x86 CPUs. (There's a fork (?) called FASMARM, but it's a totally different project and is developed separately).

Re: What does your OS look like? (Screen Shots..)

Posted: Wed Jan 21, 2015 10:23 am
by seuti
omarrx024 wrote:
narke wrote:I use the gas assembler
Isn't the syntax of gas kind of weird compared to NASM and FASM? :mrgreen:
You can use the .intel_syntax noprefix directive for GAS or the -masm=intel parameter for inline assembly to use the Intel syntax instead of AT&T.

Re: What does your OS look like? (Screen Shots..)

Posted: Wed Jan 21, 2015 1:02 pm
by Roman
So now I managed to really start writing my assembler. Just began implementing simple types.

Code: Select all

MacBook-Pro-Roman:xncas roman$ cat test.xas
byte 255
MacBook-Pro-Roman:xncas roman$ ./xncas test.xas
MacBook-Pro-Roman:xncas roman$ hexdump test.o
0000000 0d f0 0d 80 00 00 00 00 00 00 00 00 00 00 16 00
0000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff   <--- Here's the 255.
000002f
MacBook-Pro-Roman:xncas roman$ nextool test.o
Type: object.
Format version: 0
Flags: 0
Entry offset: unknown.
Read-write ROM area size: none (not a ROM file).
MacBook-Pro-Roman:xncas roman$ cat /usr/local/include/libnex/libnex_obj.h
#ifndef _LIBNEX_OBJ_H_
#define _LIBNEX_OBJ_H_


#include <libnex/libnex_mag.h>
#include <libnex/libnex_flags.h>
#include <libnex/libnex_ver.h>
#include <libnex/libnex_fmt.h>
#include <stdint.h>


typedef struct {
	nex_magic_t magic;
	
	uint8_t type;
	
	nex_flags_t flags;

	nex_ver_t ver;
	
	uint64_t sectab_offset;
} NEX_PACKED nex_obj_hdr_t;


#endif

Re: What does your OS look like? (Screen Shots..)

Posted: Wed Jan 21, 2015 1:14 pm
by BrightLight
Roman wrote:So now I managed to really start writing my assembler.
That's great! I've been implementing write access to my filesystem JUST so I can write my assembler :D :D
Maybe we can exchange ideas :mrgreen:

Re: What does your OS look like? (Screen Shots..)

Posted: Wed Jan 21, 2015 9:48 pm
by charsleysa
C# Operating System - MOSA Project

CoolWorldx86 reference OS showing the Drivers being loaded using Reflection.
MOSA Project
MOSA Project

Re: What does your OS look like? (Screen Shots..)

Posted: Thu Jan 22, 2015 5:29 am
by BrightLight
charsleysa wrote:C# Operating System - MOSA Project
That is super cool! How could you manage to work in C# without the Windows API?

Re: What does your OS look like? (Screen Shots..)

Posted: Thu Jan 22, 2015 7:22 am
by Bender
omarrx024 wrote:
charsleysa wrote:C# Operating System - MOSA Project
That is super cool! How could you manage to work in C# without the Windows API?
C# doesn't require anything Windows related unless you're using "Platform Invoke" calls or any class that is Windows related (System.Windows.X comes to mind). There's another .NET toolchain called Mono which is available for Linux and other OSes (sortie recently ported it to his OS).

Also, I think MOSA uses ahead of time compilation like other C# based OSes, which means that compiled .NET bytecode is then compiled to x86 native code. The compiler may provide a basic barebone implementation of System class (though I'm not sure if this applies to MOSA, but it does for Cosmos). You can then probably write "wrappers" to do very low-level things like I/O, interrupt tables etc.

Probably want to check out this: http://en.m.wikipedia.org/wiki/IL2CPU

Re: What does your OS look like? (Screen Shots..)

Posted: Fri Jan 23, 2015 5:45 am
by zhiayang
At long last. 215 commits and 6 months later, [mx] is finally at feature-parity with the previous version, plus fork()!

-> Rewritten the previously messy as hell VFS layer that in truth did not really exist at all
-> fork()! (That took me a good month to debug, but still no COW impl)
-> Network stack is back.

Screenshot demonstrates all 3 of the above: Userspace application is loaded from disk, does fork().
(Network stuff is done in kernel space ATM, haven't created wrappers/syscalls for those)

DHCP queries, DNS resolving to get "google.com.sg".
I think I need rest now.
Image

Re: What does your OS look like? (Screen Shots..)

Posted: Fri Jan 23, 2015 9:49 pm
by charsleysa
Bender wrote:
omarrx024 wrote:
charsleysa wrote:C# Operating System - MOSA Project
That is super cool! How could you manage to work in C# without the Windows API?
C# doesn't require anything Windows related unless you're using "Platform Invoke" calls or any class that is Windows related (System.Windows.X comes to mind). There's another .NET toolchain called Mono which is available for Linux and other OSes (sortie recently ported it to his OS).

Also, I think MOSA uses ahead of time compilation like other C# based OSes, which means that compiled .NET bytecode is then compiled to x86 native code. The compiler may provide a basic barebone implementation of System class (though I'm not sure if this applies to MOSA, but it does for Cosmos). You can then probably write "wrappers" to do very low-level things like I/O, interrupt tables etc.

Probably want to check out this: http://en.m.wikipedia.org/wiki/IL2CPU
Compiler magic!

We have a custom built compiler that can analyse the CIL code as it compiles and do all sorts of fun stuff, we can even create objects Ahead Of Time, though it's complicated so its only used for immutable objects such as Strings.

We have our own implementation of the Base Class Library which tries to match the offical BCL as close as possible while retaining the ability to optimize for the needs of MOSA.

For Reflection we have a full Ahead Of Time compiled Metadata Tree that gets parsed during Runtime and we lazy load information as it is needed.

The MOSA compiler is very different from IL2CPU so it is best not to consider them similar.

Re: What does your OS look like? (Screen Shots..)

Posted: Mon Jan 26, 2015 1:43 pm
by SayedMohsen64
I have a nearly completed boot loader for my OS project Neon. It boots from the VectFS file system (thanks for omarrx024 for giving me specs and example code) and is a 32 bit OS. I aim for a megalithic kernel design, similar to that of Dex OS. I also will have a completely graphical system.
Edit: Before you ask, this boot loader's look-n-feel is that of an old OS in this thread, I think it was Hydrogen OS.

Re: What does your OS look like? (Screen Shots..)

Posted: Tue Jan 27, 2015 12:47 am
by Muazzam
SayedMohsen64 wrote: I aim for a megalithic kernel design, similar to that of Dex OS.
According to osdev wiki "The (megalithic) kernel would need to be recompiled any time a new application is installed, removed, or otherwise altered.". DexOS is not magalithic in this sense. According to Wikipedia, DexOS is monolithic kernel. If DexOS is megalithic, then DOS is also megalithic.