We're looking for your comments on how to best organize the wiki's content.

Assembly language syntax

From 0x10c Wiki
Jump to: navigation, search

Like any language, each assembler can have its own syntax. This page documents what we see Notch doing, so that other developers can make compatible tools.

  • Comments begin with a semicolon (;) and extend to the end of the line.
  • Blank lines are ignored.
  • Address labels start with a colon (:) and consist of a single word (legal characters unclear, but no spaces)
  • The resulting labels appear as normal, unqualified arguments, implying that registers (A, B, C, X, Y, Z, I, J, SP, PC, EX) and register access keywords (POP, PEEK, PUSH) are reserved words.
  • Instructions are indented; conditionally jumped instructions are indented twice. (These may be optional and for user-clarity only)
  • Brackets ([]) indicate indirection.
  • Number bases are indicated C-style:
    • The 0x prefix indicates hexadecimal numbers.
    • Other numbers are in decimal.
  • Arguments are comma (,) separated
  • Default assembly origin seems to be 0x0000.
  • No label equate has been shown yet (a label that is equal to a user-defined value).
  • The pseudo-op DAT in the screenshot[1] can take words or strings, which are apparently loaded one-character-per-word.

No relocatable/linkable object formats are defined yet (but it isn't hard).

[edit] See also

[edit] References

  1. 466442.jpg
Personal tools
Namespaces
Variants
Actions
Navigation
Community
Toolbox