6805_AS(6ACK)

NAME
6805_as - assembler for Motorola 6805

SYNOPSIS
~em/lib/6805/as [options] argument ...

DESCRIPTION
This assembler is made with the general framework described in uni_ass(6). It is an assembler generating relocatable object code in ack.out(5) format.

SYNTAX

registers
    The 6805 has an accumulator register A and an index register X. An instruction (from the read-modify-write group) that references the A-register has an "a" suffixed to the mnemonic. In a similar way the X-register, apart from indexing operations, is addressed with an "x" suffix, i.e. "lsra" and "negx".

addressing modes
    The assembler automatically selects the shortest opcode if appropriate and possible. Thus "sub 10" will use the direct addressing mode whereas "neg 0,x" will use indexed (no offset) mode. There are sick constructions where the assembler can't find out the shortest form in time. In those cases the longest form is used.
    Branches are handled in much the same way. If a branch is out of range it is replaced by a reversed condition branch, followed by a jump, automatically.

    syntax		meaning (name)
    #expr		a one byte value (immediate)
    <expr		1-byte zero page address. Allowed in
    		the register/memory and read-modify-
    		write instruction groups. (direct)
    >expr		2-byte address. Allowed in the register
    		memory group. (extended)
    expr		1-byte address if appropriate, 2-byte
    		in other cases. (auto-direct/extended)
    ,x		indexed with zero offset. (indexed)
    <expr,x		indexed with 8 bit offset. (indexed-1)
    >expr,x		indexed with 16 bit offset. (indexed-2)
    expr,x		indexed with the shortest possible off-
    		set. (auto indexed)
    bit,expr	bit number and direct address.
    		(bit set/clear)
    bit,expr,tag	bit number, direct address and branch
    		tag. Automatically changed to reversed
    		condition branch and jump if appropri-
    		ate. (bit test and branch)
    tag		branch tag. Converted to reversed con-
    		dition branch and jump if appropriate.
    		(branch)

PSEUDO INSTRUCTIONS

     .cmos    assemble cmos version instructions.

SEE ALSO
uni_ass(6), ack(1), ack.out(5)
M6805 HMOS, M146805 CMOS family, Motorola, Prentice-Hall, Inc., 1983, (ISBN 0-13-541375-3).

AUTHOR
Written by Gijs Mos. Not a member of the ACK group.

BUGS
The assembler has not been well tested.