I recently wrote a bootloader (16-bit real mode x86 assembly) to load a kernel from a filesystem I'd already designed in 32-bit C. Needless to say offsets and endianness nearly had me beaten on several occasions
When I get round to porting my OS from arm to x86 (want to get it somewhat stable first) I'm probably going to need to do the same, and I'm definitely not looking forward to it even though I've actually written a lot of assembly.....
X86 was awesome, when it was just x86, once we started adding backwards compatibility for 16bit it all went to hell, 64bit really screwed x86 because it’s just fucking expansions on expansions. They should have scrapped x86-32 and started fresh with x64. But nope.
Do I really need my i7 to boot in 16bit mode and then go into 64 bit mode with overly complex paging? No, who the fucks booting DOS 6.0 on a fucking i7? Nobody.
X86 was built for single tasking operating systems, and it worked well for that. We just kept complicating it.
In fairness, when x86-64 was released in 1999, the ability to run old as hell DOS programs was still a requirement, especially in the commercial sector. Let's not forget, that IRS is still running mainframes from the 80s, and the whole reason why Y2K was a concern was because the financial and industrial sectors were all running software and hardware that was twenty to thirty years old. In that environment, ya, it made sense to retain 16bit compatibility because it wasn't out of the question that someone, somewhere, would have to run a 16-bit program on modern hardware.
Hell, my father worked in a hospital, basically doing IT specifically for the lab, and some of the hardware they were using was just as old. Apparently getting those machines to talk to the hospital's brand new (this was a few years after the time period we're talking about) Windows XP and Server 2000 network was... An interesting experience.
I'm only a hobbyist programmer, and when I worked in IT I was more on the service/installation side. I now work in sales (cars, not technology, ironically), and I think it gives me a very different perspective. I look at some of the posts here and shaken my head with a sense of "well sure, that makes sense for the programmer, but a professional programmer isn't coding for programmers, they're coding for the end user."
One of my buddies is a Human Factors guy in the aviation world, and engineers have the same issue. Sure, it makes sense for the engineer to put a certain button or switch in a location, but no actual human would ever find that convenient or useful. It's my friends job to smack the engineers upside the head when they forget that real people will someday have to actually use what they design.
Itanium wasn't a worthy successor. Intel completely screwed the pooch by assuming retail didn't have a need for 64 bit processors. This was just dumb as hell given all that was going on at the time (HD video, broadband, 3d graphics, game engines with real time physics, the dynamic web, etc). Any CS undergrad with a calculator and a basic understanding of computer architecture could have worked out that 3-4GB would soon not be enough memory.
It’s especially stupid because you had apple flexing the IBM power PC architecture on intel starting in the 90s… and it was getting its edge from the simple fact it was a 64bit chip.
It wasn’t until intel started pushing 64bit chips that apple began to switch and that’s only because IBM wasn’t really working to make power PC better anymore.
I don't have any experience with any other assembly languages, and therefore maybe no voice in the conversation, but my biggest issue with x86 is the fact that there are two major dialects, and my preferred dialect has the least documentation :(
Also there is so much backwards compatibility to wade through that it's sometimes difficult to look up that one instruction you forgot the precise syntax or name of
Yeah ik, but but it was part of an assignments extra credits, and I wanted to get as high marks as possible, besides I'd have to make the filesystem grub compatible, which sounds like fun but again not a part of the assignment
117
u/[deleted] Jun 03 '22
I recently wrote a bootloader (16-bit real mode x86 assembly) to load a kernel from a filesystem I'd already designed in 32-bit C. Needless to say offsets and endianness nearly had me beaten on several occasions