News for hackers. Stuff that matters.
Re:The Art of Assembly Language (1996) by Moru on Thursday March 29, 2018 @04:05PM (#16710577)
I haven't done any assembly on intel chips. The Motorola 68k was so much easier to program I never even looked at anything else. I guess that has improved by now?
Re:The Art of Assembly Language (1996) by seiferteric on Thursday March 29, 2018 @04:21PM (#16710696)
I was pretty much in the same boat. I did m68k asm in college and only barely looked at intel and felt a bit overwhelmed. Recently I got interested though and found some good youtube videos by this guy https://www.youtube.com/channel/UCq7dxy_qYNEBcHqQVCbc20w . After going through those videos I actually feel like I have a decent grasp on intel asm now. My only interest was trying to do some wacky things in inline asm in c which was a lot of fun.
Re:The Art of Assembly Language (1996) by int0x80 on Thursday March 29, 2018 @04:09PM (#16710606)
Gotten worse if anything.

Chips are more complex, more features etc. Things pile up for compatibility. That is a good and a bad thing.

Re:The Art of Assembly Language (1996) by lallysingh on Thursday March 29, 2018 @04:27PM (#16710753)
It's not bad at all. You can always start with gcc -S to give you assembler output of a compilation, then modify as you want, or compare with the compiler.

As for an ISA, it's not clean but there's only so much you can do to an assembler language, so it's not that bad. And the docs are pretty good.

Re:The Art of Assembly Language (1996) by AnimalMuppet on Thursday March 29, 2018 @04:54PM (#16710937)
I've used that several times. One more thing I want: The C/C++ code as comments in the assembler file. Is there a gcc switch for that that I don't know about?
Re:The Art of Assembly Language (1996) by zielmicha on Friday March 30, 2018 @04:57AM (#16714708)
You can use "objdump -S" on a binary compiled with debugging symbols. (This way you can get assembly in Intel syntax with "-M intel")
Re:The Art of Assembly Language (1996) by klodolph on Thursday March 29, 2018 @05:32PM (#16711243)
You can use -g -Wa,-adhls and then do some post-processing, the .file and .loc directives give you what you need.
Re:The Art of Assembly Language (1996) by Posibyte on Thursday March 29, 2018 @04:13PM (#16710630)
It's fairly dense nowadays by comparison. If you have the time, playing with DOSBOX or PCem with an emulation of the original IBM PC or XT is a less complex and more inviting introduction to ASM within the confines of the PC architecture.

(If you're following Paul Carter's book above, use something that supports protected mode, like a 386.)

Re:The Art of Assembly Language (1996) by monocasa on Thursday March 29, 2018 @04:30PM (#16710770)
You program a modern x86 in almost a RISC esque way with a couple of exceptions. For instance if you're just doing a read-modify-write that can be done in one instruction, that's preferred. You can do all of the work only allocating physical register file resources without allocating any architectural registers.
Re:The Art of Assembly Language (1996) by exebook on Friday March 30, 2018 @05:58AM (#16714915)
Just read "Register file" on Wikipedia, thank you. Would you kindly share any link that discusses the technique you explained? This is pretty new idea to me.
Re:The Art of Assembly Language (1996) by monocasa on Friday March 30, 2018 @11:32AM (#16716914)
I sort of learned that while talking to an AMD engineer, so I don't quite have a link handy. But it sort of just follows from Tomasulo's algorithm.
Re:The Art of Assembly Language (1996) by lichenwarp on Thursday March 29, 2018 @07:07PM (#16712059)
Pretty sure the 68k was used for mortal kombat
Re:The Art of Assembly Language (1996) by gp2000 on Thursday March 29, 2018 @07:42PM (#16712280)
The original arcade Mortal Kombat (and MK2, MK3 and UMK3) were all written in assembly for the TMS34010 processor. No doubt ports of it to the Sega Genesis did use 68K assembler.

The TMS34010 was something like a CPU and 2D graphics processor combined. It has the ability to change its word size from anywhere between 1 and 32 bits with data addressable on bit boundaries. It's wild.

https://en.wikipedia.org/wiki/TMS34010

Re:The Art of Assembly Language (1996) by opencl on Thursday March 29, 2018 @07:38PM (#16712251)
The arcade version of Mortal Kombat used the TMS34010.

The Genesis port ran on a 68k of course.