Why not 64 bits?
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.
Show HN: xOS – a 32-bit OS for the PC
11–20 of 28 posts
Re: Show HN: xOS – a 32-bit OS for the PC
#12A 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.
Nah, he's a pretty bright kid, I'd hate for his talent to go to waste.
Edit: I should elaborate: it's hard to put these sorts of analytical skills to use in medicine, without banging your head against the wall. I've met some brilliant software developers who happen to be doctors. They are universally frustrated by their working environment.
Re: Show HN: xOS – a 32-bit OS for the PC
#13Earlier quoted context omitted.
Nah, he's a pretty bright kid, I'd hate for his talent to go to waste.
I'd hate to see his talent wasted in medicine. Edit: I should elaborate: it's hard to put these sorts of analytical skills to use in medicine, without banging your head against the wall. I've met some brilliant software developers who happen to be doctors. They are universally frustrated by their working environment.
Re: Show HN: xOS – a 32-bit OS for the PC
#14He 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.
Re: Show HN: xOS – a 32-bit OS for the PC
#15A 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.
Re: Show HN: xOS – a 32-bit OS for the PC
#16He 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.
Re: Show HN: xOS – a 32-bit OS for the PC
#17Earlier 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.
I messed around with writing OSes when I was around the same age, and I found x86-64 to not have much of an overhead relative to plain x86. Getting into long mode itself is just a tiny bit of boilerplate at the very beginning. If you didn't plan on using paging then you need to do a bit more work to identity map everything, but if you already did the extra virtual address space means you can just map all physical add…
x86-64 uses a 4-level page-table, which is much more annoying to get right then a 2-level page-table if you're not familiar with paging or haven't dealt with it before.
I agree about TSS - nobody really bothers using it anyway. That said, x86-64 has a bit more state to handle when doing a context-switch (Though nothing very extreme)
x86-64's calling convention is more complex then x86's calling convention. For this project it doesn't really apply because it isn't followed anyway, but for a C project it would come into play.
IMO, another big issue with doing x86-64 is documentation - x86 has tons, x86-64 has comparatively little.
I would definitely agree that if you know what you're doing the differences aren't huge, but if you don't know what you're doing I think you'll definitely have an easier time getting stuff working with x86.
Re: Show HN: xOS – a 32-bit OS for the PC
#18Earlier 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.
Depending on your coding style though I'm not sure how much it would really come into play - x86 is registered starved, but it also allowed memory addresses in lots of instructions, allowing you to avoid putting things into registers in the first place. You get twice the number of registers with x86-64, but his code doesn't really appear to be suffering for not having enough registers to begin with.
Re: Show HN: xOS – a 32-bit OS for the PC
#19Earlier quoted context omitted.
Nah, he's a pretty bright kid, I'd hate for his talent to go to waste.
I'd hate to see his talent wasted in medicine. Edit: I should elaborate: it's hard to put these sorts of analytical skills to use in medicine, without banging your head against the wall. I've met some brilliant software developers who happen to be doctors. They are universally frustrated by their working environment.
Re: Show HN: xOS – a 32-bit OS for the PC
#20It just makes you so much better at dealing with all the shit your future career will throw at you.
Congrats, great job!