AS6502

Section: User Commands (1)
Updated: 11/5/84
Index Return to Main Contents
 

NAME

as6502 - assembler for MOS Technology 650X microprocessors  

SYNOPSIS

as6502 [ option ] file ...  

DESCRIPTION

As6502 assembles the named files and produces a listing on the standard output. Available options are:
-i
ignore .nlst pseudo ops in the source file.
-l
produce only an error listing on the standard output.
-n
print address in normal <high byte><low byte> format, rather than split <low byte>:<high byte> format.
-o
generate the ASCII object file 6502.out. The per-line format of that file is:

    ;<address low byte><address high byte><data>...
-s
print symbol table at the end of the assembly listing.
Symbol conventions:

Up to 19 alphanumeric (a-z ~ A-Z ~ 0-9 ~ . ~ _) characters, with initial character non-numeric.

Asterisk (*) is symbolic name of the location counter.

-v
print version of assembler.
Op code mnemonics (upper and/or lower case):

ADC BIT BVS CPX INC LDX PHP RTI SEI TAY
AND BMI CLC CPY INX LDY PLA RTS STA TSX
ASL BNE CLD DEC INY LSR PLP SBC STX TXA
BCC BPL CLI DEX JMP NOP ROL SEC STY TXS
BCS BRK CLV DEY JSR ORA ROR SED TAX TYA
BEQ BVC CMP EOR LDA PHA
Pseudo op mnemonics:

= equate label to operand value.
*= equate location counter to operand value.

 .WORD  assign 16 bit operand value to next 2 locations.

 .DBYT  assign 16 bit value to next 2 locations, reverse.

 .BYTE  assign 8 bit operand value to next location.

 .NLST  turn listing mode off.

 .LIST  turn listing mode on.
Constant types:

% binary number prefix.
@ or 0 octal number prefix.
$ hexadecimal number prefix.

 '       ASCII character prefix.

 "       ASCII character string prefix and suffix.
default (leading digit 1 through 9) decimal number.
Operand field operators:

+ addition ^ logical exclusive OR
- subtraction ~ logical 1's complement
/ integer division $ logical AND
* multiplication | logical OR
% modulo < low byte

                             >     high byte
 

FILES

/BIN/as6502 the assembler
6502.out object (with -o option)
 

SEE ALSO

J. H. Van Ornum, "as6502 User Notes"
 

DIAGNOSTICS

File handling diagnostics:
      Invalid argument count - as6502 invoked without a source file or with too many source files.
      Open error for file <name> - as6502 cannot open source file.
      Create error (6502.out) - as6502 cannot create object file.
      Close error - as6502 cannot close the source file.
      Close error (6502.out) - as6502 cannot close object file. Assembly error diagnostics:
      Symbol table full - symbol table overflowed allotted space. Number of symbols is a function of symbol sizes.
      Label multiply defined - symbol defined more than once.
      Sync error - the pass 2 value of symbol in the label field is different than the pass 1 value.
      Invalid operation code - op code mnemonic is invalid.
      Operand field missing - the op code mnemonic requires an operand, and none was found.
      Invalid operand field - operand field contains an operator which is not recognized by as6502.
      Invalid branch address - branch instruction to a location which is out of range.
      Invalid addressing mode - tried to use an addressing mode which is not available to the operation code.
      Operand field size error - operand is larger than hex FF.
      Undefined symbol in operand field - a symbol in the operand field never appeared in the label field.  

BUGS


 

Index

NAME
SYNOPSIS
DESCRIPTION
FILES
SEE ALSO
DIAGNOSTICS
BUGS

This document was created by man2html, using the manual pages.
Time: 14:10:52 GMT, February 10, 2023