Comment by mxl9df

Comment by mxl9df 9 days ago

22 replies

Interesting article, but the title is a bit off. "Assembler" actually refers to the tool that converts assembly language into machine code, not the language itself. So "writing 6502 assembler" would technically mean writing the assembler software, not writing assembly code for the 6502 processor.

It's a small distinction, but surprising to see this mix up as assembly language enthusiasts tend to be sticklers for these details!

satiated_grue 9 days ago

As someone who's been writing assembly language for decades going back to Univacs, most people used "assembler" as shorthand for "assembly language" or even "assembler language". It's usually quite unambiguous.

Here are examples of such usage, from 1967 and more recent:

http://www.bitsavers.org/pdf/ibm/360/asm/C28-6514-5_IBM_Syst...

https://www.ibm.com/docs/en/zos-basic-skills?topic=zos-assem...

  • pessimizer 9 days ago

    Seems like they always start with "the assembler language," which I take as "the language of the assembler," and then they sometimes get sloppy after that. I've never heard someone say "assembler language" (or maybe I just tuned it out.)

    • AlotOfReading 9 days ago

      It's definitely a thing that happens. I believe it comes from the phrase "assembler language" that IBM manuals used instead of "assembly".

kjs3 9 days ago

I don't know anyone who doesn't say "I wrote X assembler" with complete understanding by all involved, and I definitely don't know anyone so pedantic they said "acksually, it's 'I wrote X assembly code'". I guess none of the dozens of assembly code makers or whatever I've know over the last 40 years was enough of a stickler. Or care one way or another.

  • rkeene2 9 days ago

    I also understood the title to mean writing an assembler rather than writing assembly language code, and I've never heard anyone refer to writing assembly as writing assembler (or heard anyone who writes assembly referred to as an "assembly code maker", nor anyone who writes in any language referred to as an "<language> code maker").

    I could imagine such phrasing being done by non-native English speakers, of which I'm have no doubt that there are a significant number.

    My (unresearched) guess is that this is simply different dialects of speakers emerging with respect to informal references over the decades.

    • kwertyoowiyop 9 days ago

      Using “assembler” instead of “assembly” was common enough back in the day that there was no confusion. There were 100x more people writing “assembler” than writing actual “assemblers” so you know, the odds were good.

    • wtetzner 9 days ago

      It seems to be pretty common even among native English speakers to use "writing assembler" and "writing assembly" interchangeably. If one were writing the tool that assembles to machine code, you'd say "writing an assembler".

      • PittleyDunkin 9 days ago

        Normally I'd agree (as a native english speaker with about twenty years of writing assembly under my belt), but the title tripped me up, too. I figured they forgot an "an" or an "s" at the end of "assembler" and i was surprised to find that no 6502 assembler was produced. It could be because I've written three different assemblers over the last two years, though, so it could be i was just projecting my own interests.

        Still, I don't really care what it's called.

        • wtetzner 9 days ago

          I actually prefer "writing assembly", and also think "writing assembler" is a bit confusing. But it feels like I'm several decades too late to complain about it ;)

    • snozolli 9 days ago

      I've never heard anyone refer to writing assembly as writing assembler

      I used 'assembler' back in high school, when I was learning about the 80x86. I remember because I was 'corrected' by fellow student who had never touched assembler, assembly language, machine code mnemonics, or whatever you want to call it.

      I have no idea where I got the terminology, but I was reading a lot of books and Usenet posts on the subject at the time. I'm a native English speaker, for what it's worth.

      • ndiddy 9 days ago

        > I used 'assembler' back in high school, when I was learning about the 80x86. I remember because I was 'corrected' by fellow student who had never touched assembler, assembly language, machine code mnemonics, or whatever you want to call it.

        Wow, you got the Hacker News experience 30 years in advance!

emptybits 9 days ago

I agree; I read the headline as meaning a 6502 assembler was written, as opposed to 6502 assembly being written.

Writing compilers gets difficult, quickly. But writing assemblers is/was common enough for simple architectures and it's quite fun and relatively easy to prove/test for correctness. At least compared to most compilers.

One of my first gigs out of school involved writing a Z80 assembler because I "needed" nonstandard (Sharp/DMG/8080) instructions to be handled during a codebase port. It was enjoyable! I recommend everyone write an 8-bit assembler at least once!

Still, TFA is very interesting and I appreciate OP's share. :-)

  • spc476 9 days ago

    I wrote my own 6809 assembler [1] largely just because, and I ended up adding a 6809 emulator to it, so I can run tests during the assembly phase. I'm only aware of one other assembler (a 6502 one) that can do this. It's a fun project.

    [1] https://github.com/spc476/a09

    • PaulHoule 9 days ago

      I’ve been thinking about how to add tests to assembly code, that looks like a good idea.

  • PaulHoule 9 days ago

    There was the time I wrote a “data-assembler” for the AVR8 because I was packing up rather complicated data structures to represent parts of graphics that appear on a persistence of vision display and how the parts are assembled into images. If you look at any assembler you see there are a lot of facilities for constructing data as well as for constructing code and I took one approach to that problem, outputting C code for an array that the system can read out of the (comparatively large) ROM.

0xcde4c3db 9 days ago

In my experience, this is a common enough usage variation that I'm not sure how helpful it is to treat it as an error. In particular, "assembler language" seems to have been IBM's preferred phrasing at one point.

ryandrake 9 days ago

I had the same reaction. I first thought, well it's not that difficult to write an assembler for a simple 8-bit instruction set, but then upon reading the article it looks like it's instead writing programs in assembly language. Totally different.

unwind 9 days ago

Non-native English speakers might also be a contributor to this, for instance in Swedish the words are the same so "assembler" can refer to either the language or the tool.

As usual in natural language it's pretty clear from context which one is meant. Not sure about other (larger) European languages, it seems it's possible usage in German but it's not the primary case from a quick search.

tomcam 9 days ago

I made a living writing assembler as early as 1986. We used assembler and assembly language interchangeably, even though it’s true that the actual executable software that parses and generates code is called an assembler.

radarsat1 9 days ago

Imho these kind of pedantic comments detract from discussing the content of the article.

sehugg 9 days ago

And if you write an assembler in C#, you could have an assembler in an assembly.

Dwedit 9 days ago

Other mistakes everyone makes: Referring to an instruction as an Opcode.