Changes

Jump to: navigation, search

6502 Emulator

114 bytes added, 23:40, 19 September 2021
Assembler Capabilities
== Assembler Capabilities ==
 
The assembler accepts these inputs:
=== Instructions ===
* 6502 assembler instructions, optionally prefixed with a label and a colon. Examples:
** simple instruction: <code>STA $10</code>
** instruction with a label: <code>LOOP: STA ($10),Y</code>
*** when a label is used, the address of the label can be referenced using the label name: <code>JMP LOOP</code>
=== Directives ===
* Origin assignment: You can tell the assembler where to assemble the following code with this syntax: <code>*=$XXXX</code> where XXXX is an address in hexadecimal. Multiple origin assignments may be used. Example: <code>*=$1800</code>
* "define" directive: Macro assignments may be created with the "define" directive: <code>define macro value</code> -- for example: <code>define WHITE $01</code> -- the macro value will be substituted into lines wherever the macro name appears (e.g., <code>LDA #WHITE</code>).
* "dcb" directive: the Define Constant Byte (dcb) directive will cause the assembler to place individual byte values into memory. These byte values may be in hexadecimal prefixed with $, decimal with no prefix, or single printable non-space characters quoted with double quotes.
=== High and Low Label Bytes ===* high and low label bytes: the low byte of the label X can be accessed as &lt;X and the high byte can be accessed as &gt;X. For example, this code will load the low byte of the label "start" into the A register: <code>LDA #&lt;START</code>- note that this only works with labels, and not with macros=== Comments ===* Comments: any characters on a line following an unquoted semicolon <code>;</code> are treated as a comment and ignored.
== Using the Debugger ==

Navigation menu