4

What was the first publication to document what is (now) known as AT&T syntax assembly language?

4

As sampablokuper (OP) has noted, the UNIX Programmer's Manual cites PAL-11R as the source of the syntax, with only minor changes. So I've found a published book from May 1971, the PAL-11R Assembler Programmer's Manual that describes the syntax. Given that the syntax was probably around in 1969, this is still almost definitely not the earliest.


The earliest I can find with a casual web search is the UNIX Programmers Manual of November 1971 (better version). If you scroll to page 195 (page 5), you'll see this:

173700: mov      $177472,r0                   12700;177472
        mov      $3,—(r0)                     12740;3
        mov      $140000,—(r0)                12740;140000
        mov      $54000,—(r0)                 12740;54000
        mov      $—2000,—(r0)                 12740;176000
        mov      $5,—(r0)                     12740;5
        tstb     (r0)                         105710
        bge      .—2                          2376
        jmp      *$5400Q                      137;54000

173740: mov      $177350,r0                   12700;177350
        clr      —(r0)                        5040
        mov      r0,—(r0)                     10040
        mov      $3,—(r0)                     12740;3
        tstb     (r0)                         105710
        bge      .—2                          2376
        tst      *$177350                     5737;177350
        bne      .                            1377
        movb     $5,(r0)                      112710;5
        tstb     (r0)                         105710
        bge      .—2                          2376
        clr      pc                           5007

That, if I'm not mistaken, is AT&T syntax!


The earliest paper on UNIX, according to this source, is this paper. This document is from July 1974, so it's no good as a first, and does not include any AT&T syntax anyway. It does, however, state that the first version of UNIX was made circa. 1969–1970. This isn't necessarily a limit on the earliest that the syntax could've been described in a publication, since it might predate UNIX; I don't know.

  • Thanks! I had not previously seen mov used by itself in AT&T assembly code (always movb, movl, etc.), but that does not mean mov was (is?) not valid AT&T syntax. (I am new to the syntax.) I will upvote this and provisionally mark it as correct. If any other answers come along, with earlier examples, I will move the "correct" mark accordingly. – sampablokuper Dec 30 '18 at 23:27
  • 1
    On page 21 of the first PDF in your answer, the man page for as states, "as is based on the DEC-provided assembler PAL-11R, although it was coded locally. Therefore, only the differences will be recorded [in this man page]." The differences seem fairly minor. So, it seems that what we now call "AT&T syntax" is largely due to DEC rather than AT&T. Interesting. – sampablokuper Dec 31 '18 at 0:23
  • 4
    DEC used #foo for an immediate operand in -11 assemblers; the Unix guys apparently preferred $foo, which to my eyes lacks any mnemonic significance. Similarly @ became *. Does anyone know the rationale or is this just personal taste? – another-dave Dec 31 '18 at 15:19
  • 2
    @another-dave Ask a new question and more people will see this to be able to answer it. – wizzwizz4 Dec 31 '18 at 15:47
  • 1
    @another-dave: # and @ were apparently hard to type (Unix Assembler Reference Manual §8.1 - Dennis M. Ritchie, referenced in my answer of stackoverflow.com/questions/4193827/…), fuz says "As the UNIX tty driver used @ and # as control characters, $ was substituted for # and * for @. at stackoverflow.com/questions/42244028/… – ninjalj Jan 1 at 13:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.