Skip to content

6502 Assembly: Lower vs Upper Case Style

This is going to annoy some people, but I cannot stand lower case mnemonics in 6502 assembly. There, I said it.

How It Should Look

This is correct:

  LDA #$00
  STA $D020
  STA $D021

This makes me wince:

  lda #$00
  sta $d020
  sta $d021

They assemble to the same bytes, obviously. The CPU doesn’t care. But I care, and here’s why.

Historical Precedent

6502 mnemonics have been upper case since the beginning. Open the Commodore 64 Programmer’s Reference Guide — the canonical text that every C64 coder learned from — and every single mnemonic is upper case. LDA. STA. JSR. RTS. That’s how MOS Technology documented them. That’s how Commodore documented them. That’s how every magazine listing, every assembly tutorial, and every disassembler output rendered them for decades.

Upper case mnemonics visually distinguish instructions from labels and data. When you scan a block of code, the upper case mnemonics jump out. You can instantly see the structure — where the instructions are, where the operands are, where the labels break things up. Lower case turns everything into a grey mush of similar-looking text.

Where Did Lower Case Come From?

My theory: it crept in from modern web-era languages. People who learned JavaScript or Python first and then came to 6502 assembly brought their formatting habits with them. In those languages, lower case is the convention. Fair enough — in those languages. But 6502 assembly isn’t JavaScript. It has its own conventions, established over 40+ years, and those conventions exist for good reasons.

Some cross-assemblers default to lower case or are case-insensitive, which doesn’t help. Just because your assembler accepts lower case doesn’t mean you should use it.

Related Reading

This is a companion piece to my earlier rant, Why I Hate C64 Pseudo Code, which covers the broader problem of making 6502 assembly look like something it isn’t. Lower case mnemonics are part of the same trend — modernising the appearance of assembly language in ways that sacrifice clarity for familiarity with other languages.

Write your code however you like. But if you’re publishing 6502 code for others to read, please — upper case mnemonics. It’s not a rule, it’s just respect for the platform’s heritage.

See also: coding methodology reflections · more programming opinions · interrupt instruction debate