5 ms·
This version of the book is good! Great for beginners and experts alike. However, in later versions of this book (one of which I have on my bookshelf), the auth
by pan69 5y ago
This version of the book is good! Great for beginners and experts alike. However, in later versions of this book (one of which I have on my bookshelf), the author uses High Level Assembler (HLA) which is according to the back cover of the book; "a revolutionary tool...". It is basically a proprietary compiler that uses a syntax that is "interesting" but not portable to the rest of the world of x86 assembler.
So, if you buy the book (like I did), please be aware of this.
- userbinator 5y agoI agree. HLA syntax can best be described as "if someone who knows only C decided to make an Asm syntax". I remember much flamewars on newsgroups about it. GNU GAS syntax is roughly as repugnant, but became popular only because of GNU/Linux. Deviating from the official docs has caused much divisiveness and confusion.
- msla 5y ago> GNU GAS syntax is roughly as repugnant, but became popular only because of GNU/Linux. AT&T syntax predates GNU and x86, and spread just fine without Linux.
- edgyquant 5y agoGas uses AT&T syntax but I believe that poster is referring to how they borrow certain things from C (and the preprocessor.)
- pjmlp 5y agoTI used to have an Assembly for a DSP that was like C written in SSA form. No idea how it was called. Fully agree with GAS syntax being a pain.
- mananaysiempre 5y agoAre you sure it was TI? The Blackfin DSPs made by Analog Devices are known for using an infix assembly syntax in the official documentation, although it might be a stretch to tie it to C specifically.
- pjmlp 5y agoAs far as I can remember yes, it was an article in Dr Dobbs Journal back in the day. Basically imagine a C subset where variables are the registers, mov is = , expressions are Dest = Reg1 op Reg2 and so forth. I can gladly be corrected if it was another vendor.
- nyanpasu64 5y agoAs someone coming from a C++/Rust background and dabbling in retro game assembly, the biggest roadblocks I've faced trying to understand hand-written SPC700 assembly are flags, memorizing/looking up instructions, branches and jumps being "backwards" from C++ in x86-64 and a total wildcard in SPC700, unstructured control flow, and integer literals being dereferences rather than immediates by default. I haven't tried using HLA yet, but I get the impression its syntax would greatly assist with unstructured control flow (and possibly distinguishing between pointers/offsets and immediates). The manual at https://www.plantation-productions.com/Webster/HighLevelAsm/HLADoc/HLARef/HLARef_html/HLAReference.htm#50401281_pgfId-999075 https://www.plantation-productions.com/Webster/HighLevelAsm/... is relatable: > For example, one might test the carry flag after an addition to determine if an unsigned overflow has occurred using code like the following: add eax, 5 jnc NoOverflow << code to execute if overflow occurs >> NoOverflow: > Although this code is straightforward, you would be surprised how many students cannot visualize this code. On the other hand, if you feed them some pseudo code like: add eax, 5 if( the carry flag is set ) then << code to execute if overflow occurs >> endif > Those same students won't have any problems understanding this code. I too find reading assembly a hindrance to understanding the intent and behavior of the code, and I mentally map assembly to high-level behaviors similar to structured programming. If HLA is more accessible and productive for regular programmers as a tool to read/write reasonably-efficient code on architectures without good C compilers, I don't consider that repugnant but empowering. (Admittedly it's more disconnected from the output binary instructions than regular assembly.) (Sidenote: are assemblers designed around simplicity of parsing and speed at processing compiler-produced assembly, or user experience for humans writing assembly, or is the latter more common on architectures without good C compilers?)
- shadowofneptune 5y ago> are assemblers designed around simplicity of parsing and speed at processing compiler-produced assembly, or user experience for humans writing assembly, or is the latter more common on architectures without good C compilers? That really depends on the assembler. Each one is different. Some support a degree of structured programming, while others do not even allow for relocatable addresses.
- 5y ago
- pizza234 5y agoIf you refer to "The Art of 64-Bit Assembly", while this is correct, there are two things to consider 1. the real meat of ASM doesn't really depend on the Assembler, so one can (and ends up) coding the exercise with the Assembler of their choice 2. people have freely contributed the translation of the listings/programs to all the major Assemblers, so even if one doesn't want to code their own version, they can just use the contributed versions Certainly, there are some chapters expressly dedicated to MASM functionalities, so those are wasted. As a matter of fact, I worked through it on Linux/NASM, and wasn't really bothered, as the book is really good quality.
- gtirloni 5y agoI read the first edition and loved it. Then I read the HLA edition and wish I had never done it.