Live data from Hacker News

Show HN: xOS – a 32-bit OS for the PC

github.com

21–28 of 28 posts

Re: Show HN: xOS – a 32-bit OS for the PC

#21
post #14
post #9

He also created a remake of this in C called "mos". Kind of irks me that he does "if(var == true)" instead of "if(var)" in certain spots though.

He's 15, I think it's okay to cut him some slack

He was able to make his own operating system though. However, I agree. In comparison to his achievement, simple code style choices are nearly irrelevant.

Re: Show HN: xOS – a 32-bit OS for the PC

#23
post #5

A 15 year old Egyptian kid made a new OS in asm who wants to study medicine. Sounds like he needs to go to SV, I think he'd fit right in.

A 15 yeard old writing OS, in assembly. That's a pretty impressive feat, I think. Sometimes I envy those people who made such achievement at young age.

When I was 15, I'm not interested in learning computer programming yet. Mostly just played games, like Duke Nukem 3D or :/

Curiosly, it was a book about computer virus programming (obviously in assembly) which hooked me into coding :D

Re: Show HN: xOS – a 32-bit OS for the PC

#24
post #4

Why not 64 bits?

I would guess for the same reason "PS/2 keyboard and mouse" have been implemented, but USB hasn't.

If you want to write an OS with a GUI on modern x86 hardware from scratch, there is an insane amount of stuff you have to do to support a generic keyboard, mouse, and display before you can do any work on your OS proper.

He's not alone in this, but the way; another OS author wrote "it probably never will support anything other than AT-harddisks, as that’s all I have :-(."

Re: Show HN: xOS – a 32-bit OS for the PC

#26
post #11

Earlier quoted context omitted.

I donno if this is a serious question or not, but x86-64 is very much an extension of regular 32-bit x86, just more complicated. For something like this there's little reason to attempt 64-bit when 32-bit is much easier and will essentially result in learning the same concepts.

There are real benefits to using x86-64 over x86, namely, x86 is starved of general purpose registers. There are many more registers available on x86-64.

I was about to respond (and from rusty personal memory, correct me if wrong) that having larger than 4Gb segments seems fit for todays ram dotations but this answer is even better.

Re: Show HN: xOS – a 32-bit OS for the PC

#27
post #9

He also created a remake of this in C called "mos". Kind of irks me that he does "if(var == true)" instead of "if(var)" in certain spots though.

Why is the second version so much better? To me I think it's just a preference of the person reading the code. That it is true is implied, being explicit that it evaluates to true might be more clear to him when he goes back and reads his code.

Re: Show HN: xOS – a 32-bit OS for the PC

#28
post #9

He also created a remake of this in C called "mos". Kind of irks me that he does "if(var == true)" instead of "if(var)" in certain spots though.

I prefer the longhand version; seems a tiny bit more readable. We're talking about C, but it becomes important in some higher level languages. Just my personal preference though.
Post reply on HN