6500_AS(1)

NAME
6500_as - assembler for Mostek 6500

SYNOPSIS
/usr/em/lib/6500_as [options] argument ...

DESCRIPTION
This assembler is made with the general framework described in uni_ass(6).

SEGMENTS and TYPES
An additional segment, the zeropage, can be started by the .zero pseudo-instruction. Some adressing-modes require an address between 0 and 255. Such an address must be defined with the means of the .zero pseudo-instruction. A plain number between 0 and 255 is not allowed. The assembler will complain that it must be a zero page expression.

example
    .zero
    answer: .space 1
    .text
    and (answer, x)

SYNTAX

expressions
    An two-byte expression followed by the pseudo-operator .h (.l) has the value of the higher (lower) byte of the expression. .h and .l bind stronger than all other operators. E.g. -1.h parses as -[1.h] which has value 0. You have to write [-1].h to get 0xFF.

addressing modes
    syntax		meaning (name)
    #expr		8-bit value (immediate)
    expr		address (direct)
    expr, x		expr + contents of x
       or			or
    expr, y		expr + contents of y
    			yields address (indexed)
    (expr)		address of address (only with JMP) (indirect)
    In the next two addressing modes `expr' has to be
    a zeropage expression.
    (expr, x)	expr + contents of x
    			yields address (pre-indexed indirect)
    (expr), y	contents of expr + contents of y
    			yields address (post-indexed indirect)

instructions
    There are two mnemonics that do not map onto one machine-instruction: `add' and `sub'. `Add mode' maps onto `clc; adc mode'. `Sub mode' maps onto `sec; sbc mode'.

SEE ALSO
uni_ass(6), ack(1)