If I wanted to grab a book on assembly from, say, 2003, or even the 1990s, how relevant would they be today? has assembly changed drastically since then?
I ask partially because I like to read about how vintage computers worked. I like understanding how developers got around hardware limitations (especially game developers), so I want to learn about old computers as much as I can
Depends on the architecture - assembly is literally bare-metal, so it's bound to specific architectures. ARM assembly and x86 assembly are completely different languages, and even 90s x86 is going to be missing extensions like x86-64, and the various SSE extensions. But the core should be identical - after all, you can still boot up a modern i7 in 16-bit DOS, if you really wanted to, and it runs the exact same binaries.
I think there's a pretty big difference between learning assembly for a specific instruction set and just knowing about assembly in general and what funky limitations each system has had
I'm pretty sure most handhelds have had their own modified instruction sets. I'm sure game consoles have too.
[editline]4th September 2014[/editline]
So if you want to learn what issues gameboy developers had, go read up on that rather than try to learn gameboy assembly
[editline]4th September 2014[/editline]
unless you want to make games for gameboy or something
[QUOTE=thrawn2787;45893415]I think there's a pretty big difference between learning assembly for a specific instruction set and just knowing about assembly in general and what funky limitations each system has had
I'm pretty sure most handhelds have had their own modified instruction sets. I'm sure game consoles have too.
[editline]4th September 2014[/editline]
So if you want to learn what issues gameboy developers had, go read up on that rather than try to learn gameboy assembly
[editline]4th September 2014[/editline]
unless you want to make games for gameboy or something[/QUOTE]
Gameboy games are written in C
I was just using it as an example. I didn't know that they were written in C, but someone had to write a compiler for it then.
[QUOTE=proboardslol;45893504]Gameboy games are written in C[/QUOTE]
Game Boy games can be made either in C or psuedo-Z80 asm.
[QUOTE=Hypershadsy;45893691]Game Boy games can be made either in C or psuedo-Z80 asm.[/QUOTE]
ooooooh
[QUOTE=Hypershadsy;45893691]Game Boy games can be made either in C or psuedo-Z80 asm.[/QUOTE]
The Game Boy is really strange though, it's more like the Intel 8080 than the Z80 in terms of features however the mnemonics used are those used with the Z80.
I wouldn't start learning with the Gameboy, since that was a closed system.
Start with something that has a wealth of public documentation / textbooks [I]written in the time the system was relevant[/I]. ZX Spectrum maybe, that was a fairly popular Z80 homecomputer.
To get back to OP's question: A lot of the concepts are still the same. Modern x86 assembly is a lot more complicated than in the early days due to all the instruction set extensions. But pretty much everything you can do with modern extensions you can do with pure x86, it's just harder and slower.
I'd probably read an older book first, and then move onto the newer stuff once I'm comfortable with it.
While hacking games I thought myself x86 assembly from cheat-engine, websites and some good old common sense; so from that perspective I would strongly advise to learn something that you can test-run on your computer! Something with a good emulator so you can play around with until you get a hang of it.
Personally I learned a ton from hacking games and other applications with cheat engine,
being able to watch what happens while code is being executed and being able to modify the code is immensely helpful.
If you want to learn x86 just ignore all extension-instructions like SSE, MMX, and all that SIMD stuff until you are really comfortable with the standard instruction-set.
After you know the basic instructions really well all the extensions are really easy to understand. After all they were only introduced to accelerate stuff thats already possible with the basic set.
So to answer your question: over the years only SIMD instructions were introduced but everything else stayed the same. The largest changes all happened where you can't see them, how the processor decodes instructions, how the cpu uses its cache and fills its pipelines. All that changed a lot over the years.
Ignoring the extensions, the assembler code / instruction set itself didn't change at all.
Old x86 manuals are probably very wrong about optimization and make a big deal about obsolete calling conventions and memory segmentation which don't really apply to modern x86 unless you're writing an OS.
Compiler intrinsics are replacing (or have replaced) inline assembly almost entirely on major architectures. They require equal understanding of the architecture to use effectively, but they're a bit safer and easier for the programmer - and for an optimizing compiler.
Assembly hasn't really changed, but processors have.
[QUOTE=ThePuska;45925274]Old x86 manuals are probably very wrong about optimization[/quote]
I wouldn't say wrong so much as outdated (as in, applying to older x86 based microarchitectures only). But I'm just speculating here.
[quote] and make a big deal about obsolete calling conventions and memory segmentation which don't really apply to modern x86 unless you're writing an OS.[/quote]
I believe this is still worthwhile to know.
Sorry, you need to Log In to post a reply to this thread.