I think the descriptions of endianness are off. Endianness doesn't affect the order of an array of bytes at all, only the rules for converting longer words to/from a byte array. [0xDE, 0xAD, 0xBE, 0xEF] will always be the same array of bytes, but 0xDEAFBEEF will not.
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.
> Signed integers are signed binary numbers held as unsigned in a byte, word and etc... The sign bit is set for negative integers and cleared for positive integers and zero.
That sounds like a description of sign-and-magnitude.
I was very "anti" Assembly until I was forced to use it in college. It was fun, it forces you to change your way of thinking and be creative on how you code!
Not ARM64, but "Tonc: Whirlwind Tour of ARM Assembly" [1] is what I'm repeatedly referring to while learning ARM. Pretty confusing coming from x86, but it's starting to make sense and my ARM is getting slightly less awful.
Learning IBM 360 assembly is hilariously useless for any practical purpose; where are you going to find one to run it on outside an emulator?
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.
The reason why I ask is because this CS major peer had said that it would be _less_ useful to learn x86. Our class used IBM System/360
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.
I could be wrong, but I think System/360 is like COBOL: utterly obsolete and useless outside of a small handful of multi-bajillion dollar banks and government organizations with decades-long commitments. Maybe it lives on, but any normal programmer is going to get a lot more use out of knowing x86.
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.
Wouldn't both be kind of extreme niches? Who programs a 64bit x86 in asm? I think the only places where you might use any asm language is embedded and these chips don't use x64 (my last embedded job was around 2006 using 8-bit CPUs @ about 1mhz & 4kB ram and even there we used c).
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.
Knowing how it works is extremely useful. And if you know one it's trivial to get to know another, like ARM as an example.
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.