home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Crawly Crypt Collection 1
/
crawlyvol1.bin
/
program
/
compiler
/
fasbin21
/
fas_src
/
as6502
/
as6502.doc
< prev
next >
Wrap
Text File
|
1990-12-11
|
10KB
|
499 lines
.HM A 1 1 1 1 1 1
.H 1 "Appendix for as6502 Frankenstein Assembler"
.H 2 "Pseudo Operations"
.H 3 "Standard Pseudo Operation Mnemonics"
.VL 40 5 1
.LI "End"
END
.LI "File Inclusion"
INCL
INCLUDE
.LI "If"
IF
.LI "Else"
ELSE
.LI "End If"
ENDI
.LI "Equate"
EQU
.LI "Set"
SET
.LI "Org"
ORG
.LI "Reserve Memory"
RESERVE
RMB
.LI "Define Byte Data"
BYTE
DB
FCB
.LI "Define Word Data"
DW
FDB
WORD
.LI "Define String Data"
FCC
STRING
.LI "Define Character Set Translation"
CHARSET
.LI "Define Character Value"
CHARDEF
CHD
.LI "Use Character Translation"
CHARUSE
.LE
.H 3 "Machine Dependent Pseudo Operations"
.H 4 "Define Word Data"
The define word pseudo-operations generates the byte reversed (low byte, high
byte) representation.
.H 4 "Instruction Set Selection"
.DS I N
CPU string
.DE
The instruction set can be specified in the source file with the CPU
pseudooperation.
The string, delimited by quotes or apostrophes, is scanned for a
substring which selects which instruction set is used.
When the program is invoked, this operation is performed on the name of
the program, then the -p optional arguement, if any, and then any CPU
statements.
The last one selects which subset of the instructions the assembler will
accept.
The instruction set can be changed at any place in the source file.
.DS
.VL 30 5 1
.LI "Instruction Set"
Substrings
.LI "ROCKWELL CMOS"
R65C
r65c
.LI "CMOS"
65C
65c
.LI "ROCKWELL Extended"
R65
r65
.LI "R65C00/21"
21
.LI "Standard NMOS"
65
.LE
.DE
.H 2 "Instructions"
.H 3 "Instruction List"
.TS H
;
l l l.
Opcode Syntax Selection Criteria
.sp
.TH
.sp
ADC '#' topexpr
ADC '(' topexpr ')' ',' INDEX DIRECT INDEXY
ADC '(' topexpr ')' DIRECT INSTCMOS
ADC '(' topexpr ',' INDEX ')' DIRECT INDEXX
ADC topexpr ',' INDEX DIRECT INDEXX
ADC topexpr ',' INDEX EXTENDED INDEXX
ADC topexpr ',' INDEX INDEXY
ADC topexpr DIRECT
ADC topexpr EXTENDED
.sp
AND '#' topexpr
AND '(' topexpr ')' ',' INDEX DIRECT INDEXY
AND '(' topexpr ')' DIRECT INSTCMOS
AND '(' topexpr ',' INDEX ')' DIRECT INDEXX
AND topexpr ',' INDEX DIRECT INDEXX
AND topexpr ',' INDEX EXTENDED INDEXX
AND topexpr ',' INDEX INDEXY
AND topexpr DIRECT
AND topexpr EXTENDED
.sp
ASL ACCUM
ASL topexpr ',' INDEX DIRECT INDEXX
ASL topexpr ',' INDEX EXTENDED INDEXX
ASL topexpr DIRECT
ASL topexpr EXTENDED
.sp
BBR0 topexpr ',' topexpr INSTROCKWELL
.sp
BBR1 topexpr ',' topexpr INSTROCKWELL
.sp
BBR2 topexpr ',' topexpr INSTROCKWELL
.sp
BBR3 topexpr ',' topexpr INSTROCKWELL
.sp
BBR4 topexpr ',' topexpr INSTROCKWELL
.sp
BBR5 topexpr ',' topexpr INSTROCKWELL
.sp
BBR6 topexpr ',' topexpr INSTROCKWELL
.sp
BBR7 topexpr ',' topexpr INSTROCKWELL
.sp
BBS0 topexpr ',' topexpr INSTROCKWELL
.sp
BBS1 topexpr ',' topexpr INSTROCKWELL
.sp
BBS2 topexpr ',' topexpr INSTROCKWELL
.sp
BBS3 topexpr ',' topexpr INSTROCKWELL
.sp
BBS4 topexpr ',' topexpr INSTROCKWELL
.sp
BBS5 topexpr ',' topexpr INSTROCKWELL
.sp
BBS6 topexpr ',' topexpr INSTROCKWELL
.sp
BBS7 topexpr ',' topexpr INSTROCKWELL
.sp
BCC topexpr
.sp
BCS topexpr
.sp
BEQ topexpr
.sp
BGE topexpr
.sp
BIT '#' topexpr INSTCMOS
BIT topexpr ',' INDEX DIRECT INDEXX INSTCMOS
BIT topexpr ',' INDEX EXTENDED INDEXX INSTCMOS
BIT topexpr DIRECT
BIT topexpr EXTENDED
.sp
BLT topexpr
.sp
BMI topexpr
.sp
BNE topexpr
.sp
BPL topexpr
.sp
BRA topexpr INST21
BRA topexpr INSTCMOS
.sp
BRK '#' topexpr
BRK
.sp
BVC topexpr
.sp
BVS topexpr
.sp
CLC
.sp
CLD
.sp
CLI
.sp
CLV
.sp
CMP '#' topexpr
CMP '(' topexpr ')' ',' INDEX DIRECT INDEXY
CMP '(' topexpr ')' DIRECT INSTCMOS
CMP '(' topexpr ',' INDEX ')' DIRECT INDEXX
CMP topexpr ',' INDEX DIRECT INDEXX
CMP topexpr ',' INDEX EXTENDED INDEXX
CMP topexpr ',' INDEX INDEXY
CMP topexpr DIRECT
CMP topexpr EXTENDED
.sp
CPX '#' topexpr
CPX topexpr DIRECT
CPX topexpr EXTENDED
.sp
CPY '#' topexpr
CPY topexpr DIRECT
CPY topexpr EXTENDED
.sp
DEC ACCUM INSTCMOS
DEC topexpr ',' INDEX DIRECT INDEXX
DEC topexpr ',' INDEX EXTENDED INDEXX
DEC topexpr DIRECT
DEC topexpr EXTENDED
.sp
DEX
.sp
DEY
.sp
EOR '#' topexpr
EOR '(' topexpr ')' ',' INDEX DIRECT INDEXY
EOR '(' topexpr ')' DIRECT INSTCMOS
EOR '(' topexpr ',' INDEX ')' DIRECT INDEXX
EOR topexpr ',' INDEX DIRECT INDEXX
EOR topexpr ',' INDEX EXTENDED INDEXX
EOR topexpr ',' INDEX INDEXY
EOR topexpr DIRECT
EOR topexpr EXTENDED
.sp
INC ACCUM INSTCMOS
INC topexpr ',' INDEX DIRECT INDEXX
INC topexpr ',' INDEX EXTENDED INDEXX
INC topexpr DIRECT
INC topexpr EXTENDED
.sp
INX
.sp
INY
.sp
JMP '(' topexpr ')'
JMP '(' topexpr ',' INDEX ')' INSTCMOS INDEXX
JMP topexpr
.sp
JSR topexpr
.sp
LDA '#' topexpr
LDA '(' topexpr ')' ',' INDEX DIRECT INDEXY
LDA '(' topexpr ')' DIRECT INSTCMOS
LDA '(' topexpr ',' INDEX ')' DIRECT INDEXX
LDA topexpr ',' INDEX DIRECT INDEXX
LDA topexpr ',' INDEX EXTENDED INDEXX
LDA topexpr ',' INDEX INDEXY
LDA topexpr DIRECT
LDA topexpr EXTENDED
.sp
LDX '#' topexpr
LDX topexpr ',' INDEX DIRECT INDEXY
LDX topexpr ',' INDEX EXTENDED INDEXY
LDX topexpr DIRECT
LDX topexpr EXTENDED
.sp
LDY '#' topexpr
LDY topexpr ',' INDEX DIRECT INDEXX
LDY topexpr ',' INDEX EXTENDED INDEXX
LDY topexpr DIRECT
LDY topexpr EXTENDED
.sp
LSR ACCUM
LSR topexpr ',' INDEX DIRECT INDEXX
LSR topexpr ',' INDEX EXTENDED INDEXX
LSR topexpr DIRECT
LSR topexpr EXTENDED
.sp
MUL INST21
.sp
NOP
.sp
ORA '#' topexpr
ORA '(' topexpr ')' ',' INDEX DIRECT INDEXY
ORA '(' topexpr ')' DIRECT INSTCMOS
ORA '(' topexpr ',' INDEX ')' DIRECT INDEXX
ORA topexpr ',' INDEX DIRECT INDEXX
ORA topexpr ',' INDEX EXTENDED INDEXX
ORA topexpr ',' INDEX INDEXY
ORA topexpr DIRECT
ORA topexpr EXTENDED
.sp
PHA
.sp
PHP
.sp
PHX INST21
PHX INSTCMOS
.sp
PHY INST21
PHY INSTCMOS
.sp
PLA
.sp
PLP
.sp
PLX INST21
PLX INSTCMOS
.sp
PLY INST21
PLY INSTCMOS
.sp
RMB0 topexpr INSTROCKWELL
.sp
RMB1 topexpr INSTROCKWELL
.sp
RMB2 topexpr INSTROCKWELL
.sp
RMB3 topexpr INSTROCKWELL
.sp
RMB4 topexpr INSTROCKWELL
.sp
RMB5 topexpr INSTROCKWELL
.sp
RMB6 topexpr INSTROCKWELL
.sp
RMB7 topexpr INSTROCKWELL
.sp
ROL ACCUM
ROL topexpr ',' INDEX DIRECT INDEXX
ROL topexpr ',' INDEX EXTENDED INDEXX
ROL topexpr DIRECT
ROL topexpr EXTENDED
.sp
ROR ACCUM
ROR topexpr ',' INDEX DIRECT INDEXX
ROR topexpr ',' INDEX EXTENDED INDEXX
ROR topexpr DIRECT
ROR topexpr EXTENDED
.sp
RTI
.sp
RTS
.sp
SBC '#' topexpr
SBC '(' topexpr ')' ',' INDEX DIRECT INDEXY
SBC '(' topexpr ')' DIRECT INSTCMOS
SBC '(' topexpr ',' INDEX ')' DIRECT INDEXX
SBC topexpr ',' INDEX DIRECT INDEXX
SBC topexpr ',' INDEX EXTENDED INDEXX
SBC topexpr ',' INDEX INDEXY
SBC topexpr DIRECT
SBC topexpr EXTENDED
.sp
SEC
.sp
SED
.sp
SEI
.sp
SMB0 topexpr INSTROCKWELL
.sp
SMB1 topexpr INSTROCKWELL
.sp
SMB2 topexpr INSTROCKWELL
.sp
SMB3 topexpr INSTROCKWELL
.sp
SMB4 topexpr INSTROCKWELL
.sp
SMB5 topexpr INSTROCKWELL
.sp
SMB6 topexpr INSTROCKWELL
.sp
SMB7 topexpr INSTROCKWELL
.sp
STA '(' topexpr ')' ',' INDEX DIRECT INDEXY
STA '(' topexpr ')' DIRECT INSTCMOS
STA '(' topexpr ',' INDEX ')' DIRECT INDEXX
STA topexpr ',' INDEX DIRECT INDEXX
STA topexpr ',' INDEX EXTENDED INDEXX
STA topexpr ',' INDEX INDEXY
STA topexpr DIRECT
STA topexpr EXTENDED
.sp
STX topexpr ',' INDEX DIRECT INDEXY
STX topexpr DIRECT
STX topexpr EXTENDED
.sp
STY topexpr ',' INDEX DIRECT INDEXX
STY topexpr DIRECT
STY topexpr EXTENDED
.sp
STZ topexpr ',' INDEX DIRECT INDEXX INSTCMOS
STZ topexpr ',' INDEX EXTENDED INDEXX INSTCMOS
STZ topexpr DIRECT INSTCMOS
STZ topexpr EXTENDED INSTCMOS
.sp
TAX
.sp
TAY
.sp
TRB topexpr DIRECT INSTCMOS
TRB topexpr EXTENDED INSTCMOS
.sp
TSB topexpr DIRECT INSTCMOS
TSB topexpr EXTENDED INSTCMOS
.sp
TSX
.sp
TXA
.sp
TXS
.sp
TYA
.TE
.H 3 "Operands"
.VL 25 5
.LI ACCUM
The a or (A) reserved symbol
.LI INDEX
The x or y (or X or Y) reserved symbols
.LE
.H 3 "Selection Criteria Keywords"
.VL 25 5
.LI DIRECT
The instruction can use the direct addressing mode.
The expression must have a value between 0 and 255 that is defined when the
instruction is processed in the input pass.
.LI EXTENDED
The instruction can use the extended (16 bit address) mode.
.LI INDEXX
The instruction can use the X index.
.LI INDEXY
The instruction can use the Y index.
.LI INSTCMOS
The instruction is in the CMOS and ROCKWELL CMOS instruction sets.
.LI INSTROCKWELL
The instruction is in the ROCKWELL, ROCKWELL CMOS, and R65c00/21 instruction
sets.
.LI INST21
The instruction is in the R65c00/21 instruction set.
.LE
.H 3 "Apostrophes"
The apostrophes in the syntax field are a notation used for the
parser generator and are not put in the assembler source statement.
.H 2 "Notes"
.H 3 "Top Expressions"
The syntax of some of the instructions combined with the standard expression
syntax resulted in confusion whether an operand was an expression surrounded
by parenthesis, or a indexed reference.
To get around this, the expressions in these ambiguous cases were restricted
to those forms of expression that don't have surrounding parenthesis at the
top level.
Subexpressions may be parenthesized, but only if an operator seperates or
precedes the subexpression.
.DS I N
Example
.SP
lda 47h,y ; load absolute, y
lda +(47h),y ; load absolute, y
lda (47h),y ; load (indirect), y
lda ((47h)),y ; error
.DE
.H 3 "Reserved Symbols"
.H 4 "Machine Dependent Reserved Symbols"
A
X
Y
a
x
y
.H 4 "Standard Reserved Symbols"
AND
DEFINED
EQ
GE
GT
HIGH
LE
LOW
LT
MOD
NE
NOT
OR
SHL
SHR
XOR
and
defined
eq
ge
gt
high
le
low
lt
mod
ne
not
or
shl
shr
xor
.TC 1 1 7