Computer Science Canada

Gx Os

Author:  gan gar [ Sun Dec 13, 2009 12:51 am ]
Post subject:  Gx Os

i am making the GX OS.
i have seen an OS made in turing before so i am going for it if any one wants to help post here.

Author:  Tony [ Sun Dec 13, 2009 1:00 am ]
Post subject:  Re: Gx Os

gan gar @ Sun Dec 13, 2009 12:51 am wrote:
i have seen an OS made in turing before

Do you even know what an OS is?

http://en.wikipedia.org/wiki/Operating_system

Author:  gan gar [ Sun Dec 13, 2009 1:02 am ]
Post subject:  RE:Gx Os

yes i do

Author:  Tony [ Sun Dec 13, 2009 1:26 am ]
Post subject:  RE:Gx Os

So what do you suppose an OS is/does?

Author:  gan gar [ Sun Dec 13, 2009 1:29 am ]
Post subject:  RE:Gx Os

an os is a software program that runs all you hardware and software.

Author:  DemonWasp [ Sun Dec 13, 2009 1:48 am ]
Post subject:  RE:Gx Os

...and they're also impossible to write in Turing. What you're likely thinking of is referred to as a "launcher", which asks the operating system (probably Windows, given as you're writing in Turing) to launch some application.

You have not seen an OS written in Turing, unless someone out there has a very very special Turing compiler they haven't yet shared with the world (exceedingly unlikely).

Author:  gan gar [ Sun Dec 13, 2009 1:50 am ]
Post subject:  RE:Gx Os

he was some turing god that went to my school i do not no how he did but i would like to try.

Author:  Tony [ Sun Dec 13, 2009 2:11 am ]
Post subject:  RE:Gx Os

As DemonWasp points out, Turing is compiled into an application meant to run on top of an existing Operating System. To write an OS, you would need to compile down to machine code, with no reliance onto any OS libraries or APIs, which is not something that the existing Turing compiler can do.

One would then need to load the system into memory on computer startup -- http://en.wikipedia.org/wiki/Boot_sequence

Author:  gan gar [ Sun Dec 13, 2009 9:03 am ]
Post subject:  RE:Gx Os

ok then so you think a virtual os would work then were it runs off windiws or mac.

Author:  mirhagk [ Sun Dec 13, 2009 9:30 am ]
Post subject:  RE:Gx Os

unless you plan to put years of effort into this, and know a lot about compilers I wouldn't suggest doing this. I'm working on creating a new turing compiler right now and it's intensely hard. But if you really want your question answered the answer would be windows becuase it's easier to do machine code for (mac has a more complex system) and besides turing doesn't run on a mac.

Author:  Tony [ Sun Dec 13, 2009 1:46 pm ]
Post subject:  Re: RE:Gx Os

mirhagk @ Sun Dec 13, 2009 9:30 am wrote:
it's easier to do machine code for [windows] (mac has a more complex system)

How is it different, if they run on the same x86 architecture?

Author:  apomb [ Sun Dec 13, 2009 4:21 pm ]
Post subject:  RE:Gx Os

I am getting alot of enjoyment reading through this thread. I especially like the "advice" given by mirhagk.

I also support Tony's post and like what it implies.

keep it up!

Author:  Zren [ Sun Dec 13, 2009 4:30 pm ]
Post subject:  RE:Gx Os

Are you talking about something like a parady OS?
http://www.newgrounds.com/portal/view/292756

Author:  andrew. [ Sun Dec 13, 2009 4:33 pm ]
Post subject:  RE:Gx Os

Okay, so bottom line:
- It's pretty much impossible to write an actual operating system in Turing. It is possible to create a launcher which has it's own GUI and looks like a desktop with Turing.
- You also cannot make a "virtual OS" which can be run in Windows or Mac because it is pretty much the same as creating a real OS unless by "virtual" you mean to create a launcher/GUI desktop thing like I said above.
- Recent Macs and "PCs" have the same x86 architecture, so they can pretty much run the same machine code.

Author:  DtY [ Sun Dec 13, 2009 7:04 pm ]
Post subject:  RE:Gx Os

(I don't know any assembly but) isn't assembly OS dependant? Like, on windows to print to standard out you write to some memory address, but on a *nix (like Mac OS) you open a file, and write to it (however that's done in ASM)?
So wouldn't that make assembly on Windows different than Assembly on a Mac?

Author:  Tony [ Sun Dec 13, 2009 7:20 pm ]
Post subject:  RE:Gx Os

standard out is part of the IO that's provided by the OS. So yes, if you want to take advantage of OS specific features, then it would obviously be different.

Though I think we were talking about the on-hardware programming that would create the said IO (among many other things).

Author:  apomb [ Sun Dec 13, 2009 8:52 pm ]
Post subject:  RE:Gx Os

I am very surprised at the fact that anyone would actually posit such an absurd assumption that Turing would be a suitable language to write an OS in... thats like saying "Hey guys, I'm planning on writing a full Symphony using nothing but this cheese grater, I've seen it done before with a kazoo, it cant be much different"

Author:  mirhagk [ Sun Dec 13, 2009 11:41 pm ]
Post subject:  RE:Gx Os

um i think your post is misleading apomb, turing is nowhere near as useful as a cheese grater. lol jk

and sorry i thought that things were done differently with macs. if i was wrong sorry, i just assumed

Author:  DemonWasp [ Sun Dec 13, 2009 11:56 pm ]
Post subject:  RE:Gx Os

@DtY: No, the type of assembly code used is dependent on the hardware. Modern Apple computers (the last 3 years or so) have shifted to using chips based on the x86 instruction set, probably because it was too expensive to compete both in software and in hardware with the giants backing the x86 instruction set (IBM, Microsoft, Intel, AMD). Previously, Apple computers had used a different chipset that ran on a RISC instruction set; x86 and its 64-bit extension, x86_64, are both CISC. Their instructions would be very different.

What would be dependent on the OS is how system calls are made - not the mechanism of the system call, but which calls are available and their exact behaviour. This is part of why apps compiled for Linux don't work in Windows, Windows apps won't run on OSX and OSX apps won't run on Linux. Applications like Wine attempt to solve this problem.

Author:  Tony [ Mon Dec 14, 2009 12:18 am ]
Post subject:  Re: RE:Gx Os

DemonWasp @ Sun Dec 13, 2009 11:56 pm wrote:
probably because it was too expensive to compete both in software and in hardware with the giants backing the x86 instruction set (IBM, Microsoft, Intel, AMD).

Interesting hypothesis, but absolutely wrong.

IBM designed and build PowerPC chips for Apple. When IBM shifted their focus to adapt PowerPC chips for the gaming consoles (that's right, xbox360, PS3, and Wii use the type of CPU chips that Apple used to use), IBM has failed to address the needs of Apple. This is when Apple moved on, getting a better deal and performance out of Intel chips.

http://en.wikipedia.org/wiki/PowerPC

Author:  DemonWasp [ Mon Dec 14, 2009 1:29 am ]
Post subject:  RE:Gx Os

Hmm. I said that thinking that it was Motorola making chips for Apple, but apparently I was wrong. Thanks for the correction.

Author:  Tony [ Mon Dec 14, 2009 2:18 am ]
Post subject:  RE:Gx Os

Yeah, company relations could get very complicated, and it's easy to loose track.

Good call on RISC vs. CISC though. Those would be quite different.

Author:  gan gar [ Mon Dec 14, 2009 8:41 am ]
Post subject:  RE:Gx Os

ok like an luncher.

Author:  gan gar [ Mon Dec 14, 2009 10:06 am ]
Post subject:  RE:Gx Os

ok like a luncher then.

Author:  mirhagk [ Mon Dec 14, 2009 11:51 am ]
Post subject:  RE:Gx Os

why did you double post?? and are you trying to say your program is going to be a launcher

Author:  Turing_Gamer [ Mon Dec 14, 2009 12:01 pm ]
Post subject:  Re: Gx Os

LOL it would be nice if you can make an OS on turing.
That should be the challenge of the year...

Author:  wtd [ Mon Dec 14, 2009 12:19 pm ]
Post subject:  Re: RE:Gx Os

DemonWasp @ Mon Dec 14, 2009 12:56 pm wrote:
Previously, Apple computers had used a different chipset that ran on a RISC instruction set; x86 and its 64-bit extension, x86_64, are both CISC.


This is oversimplification. PowerPC is a very CISC-like RISC architecture, and modern x86 chips have that instruction set essentially implemented as a compatibility wrapper over a very RISC-y core.

In short, in the debate over who was right, the RISCers or the CISCers, the answer is that both and neither were right.

Author:  link1438 [ Mon Dec 14, 2009 12:46 pm ]
Post subject:  RE:Gx Os

What you could do is, create an Emulator (which runs on top of the OS) or make an Application that basically LOOKS like an OS.

As they've mentioned, it could be called a "Launcher".

Author:  mirhagk [ Mon Dec 14, 2009 2:46 pm ]
Post subject:  RE:Gx Os

I was considering making an alternative to windows explorer (the launcher idea basically), I was even thinking about a 3D explorer (equiped with a recycling bin to delete things)

lol maybe i'll make it if anyone is interested

Author:  Tony [ Mon Dec 14, 2009 3:05 pm ]
Post subject:  RE:Gx Os

BumpTop might be interested Wink

http://www.ted.com/talks/lang/eng/anand_agarawala_demos_his_bumptop_desktop.html

Author:  mirhagk [ Mon Dec 14, 2009 3:17 pm ]
Post subject:  RE:Gx Os

don't think i'd be that good lol

Author:  DtY [ Mon Dec 14, 2009 6:38 pm ]
Post subject:  Re: RE:Gx Os

DemonWasp @ Sun Dec 13, 2009 11:56 pm wrote:
@DtY: No, the type of assembly code used is dependent on the hardware. Modern Apple computers (the last 3 years or so) have shifted to using chips based on the x86 instruction set, probably because it was too expensive to compete both in software and in hardware with the giants backing the x86 instruction set (IBM, Microsoft, Intel, AMD). Previously, Apple computers had used a different chipset that ran on a RISC instruction set; x86 and its 64-bit extension, x86_64, are both CISC. Their instructions would be very different.

What would be dependent on the OS is how system calls are made - not the mechanism of the system call, but which calls are available and their exact behaviour. This is part of why apps compiled for Linux don't work in Windows, Windows apps won't run on OSX and OSX apps won't run on Linux. Applications like Wine attempt to solve this problem.
So, for the same reason that machine code is OS dependant, isn't assembly OS dependant?
Or are there libraries to make assembly work the same across OSes or something?

Author:  DemonWasp [ Mon Dec 14, 2009 7:30 pm ]
Post subject:  RE:Gx Os

I don't know why you think "machine code" is OS dependent. It is not. The kind machine code instructions contained in the actual executable are dependent solely on the architecture. Their exact alignment and order is based on the compiler and its settings (and even then, many machines will execute instructions out-of-order). In fact, the step from assembly to machine code is a translation step that's barely a second-year university-level CS assignment, if that.

No libraries or other magic can make a program compiled for x86 run on a PowerPC (though this may prove possible with Virtual Machines, provided the guest OS was an x86 OS and that the Virtual Machine could handle said setup...that's in the realm of emulation). It may also prove possible to "translate" from one set of instructions to another, but is not generally easy nor is it guaranteed to be feasible; even if you could, system calls would be difficult.

Executable format is often different (see ELF).

System calls are OS-dependent. These, however, are NOT in the domain of "machine code", as the hardware has an established mechanism for making system calls, but no specification or implementation of those system calls. In fact, the system call API presented by the operating system is often entirely different from one OS to another, as there are many different ways of handling basic problems like I/O, process manipulation, communication, and other requests for access to hardware.

Author:  DtY [ Mon Dec 14, 2009 8:17 pm ]
Post subject:  RE:Gx Os

So my point was that if you use assembly to write a program that runs on an x86 mac, it will not run on x86 windows, or x86 Linux.
That's right, right?

I'm not talking about asm programs running on different architectures, just different OSes.

Author:  DemonWasp [ Mon Dec 14, 2009 11:06 pm ]
Post subject:  RE:Gx Os

That depends on what your program does, and how you make it an executable on the various platforms. In general though, a program assembled for one OS will not run on another.


: