7 ms·
I sometimes wonder whether assembly code would even be considered "scary" today if IBM had picked the Motorola 68000 instead of the Intel 8088 for their PC. Th
by flohofwoe 5y ago
I sometimes wonder whether assembly code would even be considered "scary" today if IBM had picked the Motorola 68000 instead of the Intel 8088 for their PC.
The x86 instruction set was a cobbled-together mess from day one, while 68k assembly coding was pure joy because of its elegant and consistent instruction set.
- Koshkin 5y agoIdeally - ideally IBM would have created and used their own microprocessor based on the System 370 architecture. But no - for them the PC was a glorified typewriter: even PS/2 (based on 80286) was mostly positioned for use merely as a "smart" terminal for mainframes. So, today the entire world is basically run on faster "typewriters" (sometimes enhanced to include "windows" - even on the server side).
- mjbrusso 5y agoI agree. 68k was one of the most orthogonal architectures ever.
- inkyoto 5y agoAfter the PDP-11 architecture, yes.
- Taniwha 5y agowell except for the two sorts of registers
- Joker_vD 5y agoThree, starting with 68040.
- a-priori 5y agoAnd likely far more by now, had it become the PC instruction set architecture. The x86 instruction set was also simpler back in the late 70s, in the 8086 era when the Motorola 68000 was first released, than it is now. Back then it only had the one register width (16-bit, e.g. "ax"), whereas now it has the 32-bit series (e.g. "eax") series and the 64-bit series (e.g. "rax"). It also now has SIMD, SSE/AVX, virtualization support, and other technologies. Back then it just had one operating mode (real mode), whereas now it has protected mode, long mode, system management mode, and a few other intermediate modes (e.g. "unreal mode"). So a lot of the complexity that x86 has now was introduced after that decision was made. It's definitely conceivable that the 68000 line would have developed similarly had it been chosen instead of x86 for the PC.
- coldacid 5y ago8086 let you address the upper and lower halves of the 16-bit registers as well, so don't trick yourself into thinking there was just one register width available in the sense that everything could only be treated as 16-bit words.
- colejohnson66 5y agoMany 8 bit processors had the same “feature”. For example, the Z80’s 8 bit registers were internally just halves of a 16 bit register.
- 123pie123 5y agototally agree. I learnt a bit of 6502/6809 in my early teens and in to college/ uni. I couldn't not be bothered with the x86 - a complete pita, although to be fair that may have been the not so great manuals I had at the time. but I started in my first job dissassembling 68000, very easy to work with
- gardaani 5y agoARM assembly code looks pretty nice. Mobile phones and Macs are using ARM, so there's lots of devices using it. Only Windows is using x86/x64.
- ChuckNorris89 5y ago>Only Windows is using x86/x64 Yeah, X64 is only used by windows, that's like ~80% of the desktop computing market, plus nearly every server and cloud instance out there, so not much at all. /s Why do some users assume that the whole world revolves around Apple's iOS/M1 Mac ecosystem as if it exists in a vacuum?
- codebolt 5y agoCloser to 90%: https://netmarketshare.com/operating-system-market-share.aspx?options=%7B%22filter%22%3A%7B%22%24and%22%3A%5B%7B%22deviceType%22%3A%7B%22%24in%22%3A%5B%22Desktop%2Flaptop%22%5D%7D%7D%5D%7D%2C%22dateLabel%22%3A%22Trend%22%2C%22attributes%22%3A%22share%22%2C%22group%22%3A%22platform%22%2C%22sort%22%3A%7B%22share%22%3A-1%7D%2C%22id%22%3A%22platformsDesktop%22%2C%22dateInterval%22%3A%22Monthly%22%2C%22dateStart%22%3A%222019-11%22%2C%22dateEnd%22%3A%222020-10%22%2C%22segments%22%3A%22-1000%22%7D https://netmarketshare.com/operating-system-market-share.asp...
- ChuckNorris89 5y agoJesus, no wonder Microsoft can shove ads and do whatever they want with Windows.
- michaelcampbell 5y ago> Why do some users assume that the whole world revolves around Apple... Because for those users, it does, and Apple coddles and encourages that mindset.
- cmrdporcupine 5y agoBecause well over 90% of shipped computing devices are ARM based. Desktop computers are a declining and relatively small market. Your home, car and office are full of ARM devices. Potentially hundreds. x86 lives in the data centre (Linux, not Windows, so contrary to grandparent post, but whatever) and in some desktop systems. Not the majority of systems. Has nothing to do with an Apple fetish.
- michaelcampbell 5y agoAs an owner of the original 1984 Mac, I bought a copy of the classic Lance Levanthal 68000 assembly book. I never got much into actually coding in it, but I remember how "this makes sense, mostly" the book felt. Then I read some of the Intel stuff. OMG.
- pjc50 5y agoIt's "scary" on almost every architecture because there's no fault tolerance, recovery, exception handling, or reporting. If you make a mistake you get to reassemble the smashed plate of your memory image in order to work out what happened - assuming you can get at it at all. Some platforms will just reboot on you.
- flohofwoe 5y agoHmm, I don't agree, stepping through assembly code in most (C/C++) debuggers works just as well as with high level languages, and process isolation in operating systems also works for assembly coding, so it's just as unlikely to crash the whole computer with assembly code as with high level languages (otherwise we'd have a massive problem if operating system security would just depend on banning low level programming). Bare metal embedded coding is a different topic of course, but regular application development with assembly works just fine.
- secondcoming 5y agoIn our codebase, we used inline asm twice; for 'pause' and 'rdtscp'. Even then we replaced that with intrinsics later. 'Regular applications' that use inline asm should really be raising eyebrows.
- flohofwoe 5y agoSure, that's the case today, but in the 80's and early 90's it wasn't all that uncommon to write big applications completely in assembly code. With a proper macro assembler and IDE-like coding environment that wasn't as bad as it sounds today. The focus has just shifted away from assembly programming to high-level languages, and the tools moved along. At least reading assembly code is still important today though.
- ajsnigrutin 5y agoyep https://en.wikipedia.org/wiki/RollerCoaster_Tycoon_(video_game) https://en.wikipedia.org/wiki/RollerCoaster_Tycoon_(video_ga... > The game was developed in a small village near Dunblane over the course of two years.[2][5] Sawyer wrote 99% of the code for RollerCoaster Tycoon in x86 assembly language, with the remaining one percent written in C.[3]
- ajross 5y ago> 68k assembly coding was pure joy because of its elegant and consistent instruction set That's maybe a little spun. The separated address/data registers (there are two kinds of registers, and memory operations need to use one from each to combine to a final address) played hell with optimizer strategies for years. In fact 68k compiler output was significantly sub-par pretty much throughout its lifetime. The "cobbled-together mess" had (post-386 anyway) a significantly more orthogonal instruction set and was just plain easier to optimize, even for humans.
- notriskfree 5y agoThe 68k was certainly great fun after 8bit systems, and the x86 was almost just more of the same. ARM32 is also nice, apart from some corner cases. I think everything has corner cases, apart from x86 where the whole thing is an ugly mess.
- Banjo911 5y agoNo, on the 68000 you can do memory addressing using none, one address register, two address registers, or one of each. On the 68020 you get even more flexibility.
- ajross 5y agoYes. But what you cannot do is a load with the sum of any two GPRs. They need to be in the right partitions. That makes register assignment a huge pain for the optimizer, and historically hurt the architecture. That's the kind of complexity that really hurts software. Compare vs. the commonly-cited x86 nonsense (the REP prefix, say), which complicates silicon implementations but generally makes software easier to write (c.f. decades of optimized inline memcpy implementations). The point being the 68k was a dead end in a different direction. It was a "clean" archiecture from the perspective of a 1970's assembly programmer, but not a late 80's compiler writer.
- Banjo911 5y agoThe only thing you can't do is the sum of two data registers, and this only applies when calculating an effective address. When you have 15 registers to work with that's not going to be more of a problem than only having 7 or 8 registers to work with.