A65SM, some js 6502 assembler

Some 6502 assembler written in javascript.

Labels

Labels can be defined by code point (ONE position in source code text) and/or by giving ONE additive formula (which may contain constants and labels).

Label values propagate by means of formula evaluation, by successive, bidirectional propagation through located code, and, as a final resort, after the previously mentioned methods do not gain any more resolution, by using a code-length count algorithm, which can resolve many kinds of label relations, but comes into play with some not totally obvious behaviour: unresolved codepoint labels are collected by sign, to compute the code distance of arbitrary chosen pairings.

Syntax

All constants are treated as hex values, no support for decimals.

Labels names must not begin with any hex letter (but can be any length, case insensitive matching).

Use less or greater than chars as lo/hi as usual

Currently single-line comments starting with semicolon, only (sorry, didn't find the time...).

Immediate operands for 6502 instructions must be prepended with hash.

In addition to the bare 6502 instructions, the following mnemonics are supported:

download a local copy...

to asm