nurpax / c64jasm

C64 6502 assembler in TypeScript
51 stars 14 forks source link

.local labels #1

Closed nurpax closed 6 years ago

nurpax commented 6 years ago

Local labels can be specified with a .dot prefix. Every new normal label defines a new local scope:

foo:
  lda #0
.bar:

bar:
  ldx #1
.baz:

These get resolved to foo, foo.bar, bar, bar.baz.

The .prefix syntax is especially helpful when used in macro declarations.

nurpax commented 6 years ago

These work in macros now. Need to extend existing "new label" code to add the prefix when not inside macros.