6502asm v0.04user guide6502asm user guide – prerelease versionpage 1THIS ISA PRE-RELEASE VERSION OF6502ASM... IT MAY NOT WORKENTIRELY CORRECTLY YET.If
Ways of specifying a numerical valueWhen you need to specify a value, say a constant or an address, you can use:Base 16 (hex):&12 This is the Acor
The available logical operators are:>> Logical shift right<< Logical shift left|| Logical OR&& Logical AND^^ Logical Exclusive ORT
Immediate addressing<instruction> #<value>The value is directly provided. Note the ‘#’ character before the value; if it was not there the
Indexed absolute addressing (aka Absolute, X or Y addressing)Indexed zero page addressing (aka Zero page, X addressing)<instruction> <address
Example:LDA (&12, X) ; load A from ; address pointed to ; at (&12 + X)Indirect indexed addressing (po
Absolute indirectJMP (<address>)This mode is only available for a specific type of JMP instruction.The contents of the address pointed to are re
String codesYou can ‘embed’ special sequences within strings:\r Insert an &0D byte (linefeed)\n Insert an &0A byte (newline)\" Insert a d
BOT &E000 FORCE; force low address to be &E000, EPROM start ; The above is important! ; Because we are assembling ROM code
For a successful assembly, the display will look like:S:\Amélie>6502asm mybios.s65 mybios.img6502asm v0.04 (11th June 2008) initialising...Written
ERROR: Memory allocation failure. Please free up an additional 72K and try again.In order to begin assembly, 6502asm allocates a 64K block of me
Introduction6502asm is a simple assembler for 6502 code. It supports a variety of assembler commands to control outputand extend the 6502 instruction
ERROR: Calculation too complex at line <line>.The calculation ‘stack’ can only hold eight discrete items. Every number and operator is an itemin
Known bugsLines are clipped at 80 characters. This means if a comment on a line exceeds this, it will be read in as part ofthe next line, causing an e
these conditions firstly to benefit the end-user, so that they will (hopefully) encounter the correct and up to dateversion and not spin-offs; and sec
Thanks to:Ewen Cathcart for lots of help, support, and introducing me to something better than my old Erasure and Pet Shop Boystapes... I guess it cou
Don’t write code like this: LDX #0 : LDY #0 : LDA #0 : RTSThe assembler will see: LDX #0 (only the first instruction, the “LDX”)The source file is alw
c. Instructions<opcode> [<parameter>]Instructions are the usual three letter mnemonics, with optional parameters as necessary.Comments are
The hardware stack lives in page one (&0100 to &01FF). Certain operations performed using the zero pageaddressing mode (relating to memory loc
You could also use the opcode table to implement various “undocumented” instructions that may be found inthe NMOS versions of the 6502, some examples
Assembler commands6502asm commands are all three letters long (except EQUx which is handled specially).They look like processor instructions. This is
DCW <value> also EQUW <value>Include a word (16 bit) value in the output, low byte first (6502-style).DCZ "<string>" also
The default base address, &E000, was chosen because it is the start point of the Amélie EPROM.If this address is not suitable, you can easily do s
Kommentare zu diesen Handbüchern