Say hello to x64 Assembly, Part 2
0xax.blogspot.com
0xax.blogspot.com
Otherwise I found the article to be very clearly written.
Maybe it's my nasm version, but "\n" seems to be inserted literal for me and not translated into LF. Thus my program outputs "Sum is correct\". Doing "msg: db 'Sum is correct',0xA" works for me though.
Eg:
"Sum is correct",`\n` ;or
`Sum is correct\n`That sounds like a description of sign-and-magnitude.
I assumed he was just trying to be a smart ass because I thought for sure it would best to learn x64 especially because it is modern and what my machine runs on / everything else.
That said, learning a simpler architecture before you tackle the rat's nest that is x86 isn't a bad idea. 6502, 68000, MIPS, and ARM are all good choices for different reasons. Pick whatever appeals to you most.
Not to be misunderstood - it's good for you to learn as a programmer but since it's all for educational purposes anyway might as well learn something simpler like the parent suggested. "Practically" both are impractical in the modern world.
I haven't actually written a line of asm in last few years but when you are thinking about performance you must be able to understand compiler output. And that I have been doing a great deal. You simply cannot make well performing code without that knowledge.
You can always say that in modern desktop performance does not matter, but you cannot say the same in mobile space. There every single watt counts if you want to increase your battery life. Because when the CPU is idle they can pretty much shut the whole thing down for a small while.
ARM is probably the best combination of "actually useful" and "suitable for beginners". 68k might be useful if you're into retrocomputing (Amiga, Sega Megadrive, et al).
I learnt 16-bit Intel assembly for games purposes 20 years ago. Since then I've occasionally needed to read 32-bit and 64-bit Intel but never to write it. The default portable assembler is C.
Assembler is as much a mindset as a specific set of mnemonics, anyway.