3 ms·
I 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
by userbinator 5y ago
I 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