[net.micro.atari] as68.doc

info-atari@ucbvax.UUCP (01/08/86)

******************************************************************************
*                         A68 - MC68000 ASSEMBLER                            *
******************************************************************************

(C) COPYRIGHT 1985 ROBERT G. BROWN
ALL RIGHTS RESERVED

A68 VERSION 1.0 PLACED IN THE PUBLIC DOMAIN WITH THE PROVISION
THAT IT NOT BE SOLD FOR PROFIT WITHOUT THE AUTHOR'S CONSENT.

A68 VERSION 2.0 IS PLANNED AS A COMMERCIAL RELEASE IN MID DECEMBER.
CONTACT THE AUTHOR FOR FURTHUR INFO.

A68 TAKES A STANDARD 68000 ASSEMBLY LANGUAGE SOURCE FILE WITH THE
EXTENSION .A68 AND PRODUCES A GEMDOS .PRG FILE.

THE COMMAND LINE TAKES THE FORM
A68 filename

THE SOURCE FILE SHOULD CONTAIN STANDARD 68000 ASSEMBLY LANGUAGE
AS DESCRIBED IN THE M68000 PROGRAMMER'S REFERENCE MANUAL.

EACH LINE TAKES THE FORM:
[label] opcode[.ext] [source],[destination] [comments] or
*[comments]

LABELS -  must start in the first column with a letter. They are
valid to 6 characters and contain letters and digits. Lower case
letters are converted to upper case by a68. A label must be
follow by a white space character (TAB or SPACE).

COMMENT LINES - are indicated by a * in the first column.

OPCODE - must be preceded by white space. The ext is .b for byte
.w for word and .l for longword. If left out .w is assumed. The
branch instructions use .b and .w for short and long branch.

OPERANDS - must be prceded by white space and separated by a
comma. The addressing modes follow the standard as follows:

SP is not accepted in place of A7 or a7.

The absolute short addressing mode is not supported by GEMDOS.
Absolute long is assumed as the default unless .w is used as the extension.

The address register with displacement (with or without an index)
mode is treated as follows:
	d(An)    d is treate as an absolute displacement.

The program counter with displacement (with or without an index)
mode is treated as follows:
	d(PC)	d is treated as location to which a displacement
is calculated.

For the displacement with index modes the length of the index
must be specified by the .w or .l extension.

# indicates immediate data

$ indicates hex (i.e. #$ff is immediate data 255).

Only simple expressions are accepted by version 1.0. (no + - etc.)

THE FOLLOWING PSEUDO-OPS ARE SUPPORTED:

EQU
label EQU value
use the EQU to reference absolute memory locations. The locations
referenced by a EQU are not relocated by GEMDOS.

ORG
 ORG value
use only as the first opcode in a file to create an absolute file
without the GEMDOS relocation information.

DC.[ext]
 DC.B 'string',$hexvalue,decimalvalue etc.
defines constants of lenght .ext. Moves to next even address
after DC.B.

DS.[ext]
 DS.l value
reserves value number of locations of length .ext.

DCB.[ext]
 DCB.W count,value
defines constant value count number of times.

A68 ERROR MESSAGES ARE REPORTED AS THE SOURCE CODE IS DISPLAYED
ON THE CONSOLE IMMEDIATELY AFTER THE ERROR IN THE FORM <**En**>.

1 - Illegal opcode
2 - Duplicate label
3 - undefined label
4 - illegal operand
5 - illegal size
6 - branch out of range
7 - displacement out of range

THE SYMBOL TABLE IS LISTED AT THE CONCLUSION OF THE ASSEMBLY AND
A68 WAITS THE A SPACE BEFORE RETURNING.

IF YOU FIND A BUG PLEASE REPORT IT TO

BOB BROWN
53 CLIFF LANE
LEVITTOWN N.Y. 11756