home *** CD-ROM | disk | FTP | other *** search
- From: markz@ssc.UUCP (Mark Zenier)
- Newsgroups: alt.sources
- Subject: Frankenstein Cross Assemblers, 6502 flavor, part 1 of 2
- Message-ID: <613@ssc.UUCP>
- Date: 6 Dec 90 07:19:51 GMT
-
- ---- Cut Here and feed the following to sh ----
- #!/bin/sh
- # This is Frankasm/As6502, a shell archive (shar 3.43)
- # made 12/04/1990 08:45 UTC by markz@ssc.uucp
- # Source directory /usr/mark/frank.shar
- #
- # existing files will NOT be overwritten unless -c is specified
- # This format requires very little intelligence at unshar time.
- # "if test", "echo", "true", and "sed" may be needed.
- #
- # This shar contains:
- # length mode name
- # ------ ---------- ------------------------------------------
- # 1648 -r--r----- as6502.1
- # 9447 -r--r----- as6502.doc
- # 2771 -r--r----- as6502.tst
- # 5954 -r--r--r-- as6502.tut
- # 41188 -r--r--r-- as6502.y
- #
- # ============= as6502.1 ==============
- if test -f 'as6502.1' -a X"$1" != X"-c"; then
- echo 'x - skipping as6502.1 (File already exists)'
- else
- echo 'x - extracting as6502.1 (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'as6502.1' &&
- X.TH AS6502 1L
- X.SH NAME
- Xas6502, as65c00, asr65c00 \- cross assemblers for microcomputers
- X.SH SYNOPSIS
- X.nf
- Xas6502 [-p cpu] [-l listfile] [-o hexfile] [-d] [-s symbolfile] input
- Xas65c00 [-p cpu] [-l listfile] [-o hexfile] [-d] [-s symbolfile] input
- Xasr65c00 [-p cpu] [-l listfile] [-o hexfile] [-d] [-s symbolfile] input
- X.fi
- X.SH DESCRIPTION
- XThe as6502, as65c00, asr65c00 command assembles the input file into a
- Xtext output file representing the program memory for a microcomputer.
- X
- XOptions
- X.IP "-p cpu"
- XOverride the instruction set selection.
- X.RS 10
- XValid Values for Cpu
- X.RS 5
- X65, 65c, r65, r65c, 21
- X.RE
- X.RE
- X.IP "-l listfile"
- XOutput a file formated with the memory address, data, and source input lines.
- X.IP "-o hexfile"
- XOutput the memory data image in a form accepted by most prom programmers.
- X.IP "-h hexfile"
- XSame as \-o.
- X.IP \-d
- XSave the intermediate data file (see FILE) and abort the execution at the
- Xend of processing.
- X.IP "-s symbolfile"
- XPrint the symbol table values and names, one per line in the specified file.
- X.SH FILES
- X/usr/tmp/frtXXXXXX
- X.SH SEE ALSO
- XFrankenstein Cross Assemblers Users Manual (file base.doc)
- XAppendix for as6502 Frankenstein Assembler (file as6502.doc)
- X.SH NOTES
- XThere is only one input file.
- X
- XThe program can select which subset of instructions is accepted.
- XThe program first uses the name with which it is invoked.
- XThis is scanned for a substring which indicates which set to use.
- XThe -p options overrides this selction by performing the same substring
- Xsearch.
- XFinally the input file can select which subset to use with the CPU statement.
- X
- XThere should only be one executable file with all of its names linked to it.
- SHAR_EOF
- true || echo 'restore of as6502.1 failed'
- fi
- # ============= as6502.doc ==============
- if test -f 'as6502.doc' -a X"$1" != X"-c"; then
- echo 'x - skipping as6502.doc (File already exists)'
- else
- echo 'x - extracting as6502.doc (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'as6502.doc' &&
- X.HM A 1 1 1 1 1 1
- X.H 1 "Appendix for as6502 Frankenstein Assembler"
- X.H 2 "Pseudo Operations"
- X.H 3 "Standard Pseudo Operation Mnemonics"
- X.VL 40 5 1
- X.LI "End"
- XEND
- X.LI "File Inclusion"
- XINCL
- XINCLUDE
- X.LI "If"
- XIF
- X.LI "Else"
- XELSE
- X.LI "End If"
- XENDI
- X.LI "Equate"
- XEQU
- X.LI "Set"
- XSET
- X.LI "Org"
- XORG
- X.LI "Reserve Memory"
- XRESERVE
- XRMB
- X.LI "Define Byte Data"
- XBYTE
- XDB
- XFCB
- X.LI "Define Word Data"
- XDW
- XFDB
- XWORD
- X.LI "Define String Data"
- XFCC
- XSTRING
- X.LI "Define Character Set Translation"
- XCHARSET
- X.LI "Define Character Value"
- XCHARDEF
- XCHD
- X.LI "Use Character Translation"
- XCHARUSE
- X.LE
- X.H 3 "Machine Dependent Pseudo Operations"
- X.H 4 "Define Word Data"
- XThe define word pseudo-operations generates the byte reversed (low byte, high
- Xbyte) representation.
- X.H 4 "Instruction Set Selection"
- X.DS I N
- XCPU string
- X.DE
- XThe instruction set can be specified in the source file with the CPU
- Xpseudooperation.
- XThe string, delimited by quotes or apostrophes, is scanned for a
- Xsubstring which selects which instruction set is used.
- XWhen the program is invoked, this operation is performed on the name of
- Xthe program, then the -p optional arguement, if any, and then any CPU
- Xstatements.
- XThe last one selects which subset of the instructions the assembler will
- Xaccept.
- XThe instruction set can be changed at any place in the source file.
- X.DS
- X.VL 30 5 1
- X.LI "Instruction Set"
- XSubstrings
- X.LI "ROCKWELL CMOS"
- XR65C
- Xr65c
- X.LI "CMOS"
- X65C
- X65c
- X.LI "ROCKWELL Extended"
- XR65
- Xr65
- X.LI "R65C00/21"
- X21
- X.LI "Standard NMOS"
- X65
- X.LE
- X.DE
- X.H 2 "Instructions"
- X.H 3 "Instruction List"
- X.TS H
- X;
- Xl l l.
- XOpcode Syntax Selection Criteria
- X.sp
- X.TH
- X.sp
- XADC '#' topexpr
- XADC '(' topexpr ')' ',' INDEX DIRECT INDEXY
- XADC '(' topexpr ')' DIRECT INSTCMOS
- XADC '(' topexpr ',' INDEX ')' DIRECT INDEXX
- XADC topexpr ',' INDEX DIRECT INDEXX
- XADC topexpr ',' INDEX EXTENDED INDEXX
- XADC topexpr ',' INDEX INDEXY
- XADC topexpr DIRECT
- XADC topexpr EXTENDED
- X.sp
- XAND '#' topexpr
- XAND '(' topexpr ')' ',' INDEX DIRECT INDEXY
- XAND '(' topexpr ')' DIRECT INSTCMOS
- XAND '(' topexpr ',' INDEX ')' DIRECT INDEXX
- XAND topexpr ',' INDEX DIRECT INDEXX
- XAND topexpr ',' INDEX EXTENDED INDEXX
- XAND topexpr ',' INDEX INDEXY
- XAND topexpr DIRECT
- XAND topexpr EXTENDED
- X.sp
- XASL ACCUM
- XASL topexpr ',' INDEX DIRECT INDEXX
- XASL topexpr ',' INDEX EXTENDED INDEXX
- XASL topexpr DIRECT
- XASL topexpr EXTENDED
- X.sp
- XBBR0 topexpr ',' topexpr INSTROCKWELL
- X.sp
- XBBR1 topexpr ',' topexpr INSTROCKWELL
- X.sp
- XBBR2 topexpr ',' topexpr INSTROCKWELL
- X.sp
- XBBR3 topexpr ',' topexpr INSTROCKWELL
- X.sp
- XBBR4 topexpr ',' topexpr INSTROCKWELL
- X.sp
- XBBR5 topexpr ',' topexpr INSTROCKWELL
- X.sp
- XBBR6 topexpr ',' topexpr INSTROCKWELL
- X.sp
- XBBR7 topexpr ',' topexpr INSTROCKWELL
- X.sp
- XBBS0 topexpr ',' topexpr INSTROCKWELL
- X.sp
- XBBS1 topexpr ',' topexpr INSTROCKWELL
- X.sp
- XBBS2 topexpr ',' topexpr INSTROCKWELL
- X.sp
- XBBS3 topexpr ',' topexpr INSTROCKWELL
- X.sp
- XBBS4 topexpr ',' topexpr INSTROCKWELL
- X.sp
- XBBS5 topexpr ',' topexpr INSTROCKWELL
- X.sp
- XBBS6 topexpr ',' topexpr INSTROCKWELL
- X.sp
- XBBS7 topexpr ',' topexpr INSTROCKWELL
- X.sp
- XBCC topexpr
- X.sp
- XBCS topexpr
- X.sp
- XBEQ topexpr
- X.sp
- XBGE topexpr
- X.sp
- XBIT '#' topexpr INSTCMOS
- XBIT topexpr ',' INDEX DIRECT INDEXX INSTCMOS
- XBIT topexpr ',' INDEX EXTENDED INDEXX INSTCMOS
- XBIT topexpr DIRECT
- XBIT topexpr EXTENDED
- X.sp
- XBLT topexpr
- X.sp
- XBMI topexpr
- X.sp
- XBNE topexpr
- X.sp
- XBPL topexpr
- X.sp
- XBRA topexpr INST21
- XBRA topexpr INSTCMOS
- X.sp
- XBRK '#' topexpr
- XBRK
- X.sp
- XBVC topexpr
- X.sp
- XBVS topexpr
- X.sp
- XCLC
- X.sp
- XCLD
- X.sp
- XCLI
- X.sp
- XCLV
- X.sp
- XCMP '#' topexpr
- XCMP '(' topexpr ')' ',' INDEX DIRECT INDEXY
- XCMP '(' topexpr ')' DIRECT INSTCMOS
- XCMP '(' topexpr ',' INDEX ')' DIRECT INDEXX
- XCMP topexpr ',' INDEX DIRECT INDEXX
- XCMP topexpr ',' INDEX EXTENDED INDEXX
- XCMP topexpr ',' INDEX INDEXY
- XCMP topexpr DIRECT
- XCMP topexpr EXTENDED
- X.sp
- XCPX '#' topexpr
- XCPX topexpr DIRECT
- XCPX topexpr EXTENDED
- X.sp
- XCPY '#' topexpr
- XCPY topexpr DIRECT
- XCPY topexpr EXTENDED
- X.sp
- XDEC ACCUM INSTCMOS
- XDEC topexpr ',' INDEX DIRECT INDEXX
- XDEC topexpr ',' INDEX EXTENDED INDEXX
- XDEC topexpr DIRECT
- XDEC topexpr EXTENDED
- X.sp
- XDEX
- X.sp
- XDEY
- X.sp
- XEOR '#' topexpr
- XEOR '(' topexpr ')' ',' INDEX DIRECT INDEXY
- XEOR '(' topexpr ')' DIRECT INSTCMOS
- XEOR '(' topexpr ',' INDEX ')' DIRECT INDEXX
- XEOR topexpr ',' INDEX DIRECT INDEXX
- XEOR topexpr ',' INDEX EXTENDED INDEXX
- XEOR topexpr ',' INDEX INDEXY
- XEOR topexpr DIRECT
- XEOR topexpr EXTENDED
- X.sp
- XINC ACCUM INSTCMOS
- XINC topexpr ',' INDEX DIRECT INDEXX
- XINC topexpr ',' INDEX EXTENDED INDEXX
- XINC topexpr DIRECT
- XINC topexpr EXTENDED
- X.sp
- XINX
- X.sp
- XINY
- X.sp
- XJMP '(' topexpr ')'
- XJMP '(' topexpr ',' INDEX ')' INSTCMOS INDEXX
- XJMP topexpr
- X.sp
- XJSR topexpr
- X.sp
- XLDA '#' topexpr
- XLDA '(' topexpr ')' ',' INDEX DIRECT INDEXY
- XLDA '(' topexpr ')' DIRECT INSTCMOS
- XLDA '(' topexpr ',' INDEX ')' DIRECT INDEXX
- XLDA topexpr ',' INDEX DIRECT INDEXX
- XLDA topexpr ',' INDEX EXTENDED INDEXX
- XLDA topexpr ',' INDEX INDEXY
- XLDA topexpr DIRECT
- XLDA topexpr EXTENDED
- X.sp
- XLDX '#' topexpr
- XLDX topexpr ',' INDEX DIRECT INDEXY
- XLDX topexpr ',' INDEX EXTENDED INDEXY
- XLDX topexpr DIRECT
- XLDX topexpr EXTENDED
- X.sp
- XLDY '#' topexpr
- XLDY topexpr ',' INDEX DIRECT INDEXX
- XLDY topexpr ',' INDEX EXTENDED INDEXX
- XLDY topexpr DIRECT
- XLDY topexpr EXTENDED
- X.sp
- XLSR ACCUM
- XLSR topexpr ',' INDEX DIRECT INDEXX
- XLSR topexpr ',' INDEX EXTENDED INDEXX
- XLSR topexpr DIRECT
- XLSR topexpr EXTENDED
- X.sp
- XMUL INST21
- X.sp
- XNOP
- X.sp
- XORA '#' topexpr
- XORA '(' topexpr ')' ',' INDEX DIRECT INDEXY
- XORA '(' topexpr ')' DIRECT INSTCMOS
- XORA '(' topexpr ',' INDEX ')' DIRECT INDEXX
- XORA topexpr ',' INDEX DIRECT INDEXX
- XORA topexpr ',' INDEX EXTENDED INDEXX
- XORA topexpr ',' INDEX INDEXY
- XORA topexpr DIRECT
- XORA topexpr EXTENDED
- X.sp
- XPHA
- X.sp
- XPHP
- X.sp
- XPHX INST21
- XPHX INSTCMOS
- X.sp
- XPHY INST21
- XPHY INSTCMOS
- X.sp
- XPLA
- X.sp
- XPLP
- X.sp
- XPLX INST21
- XPLX INSTCMOS
- X.sp
- XPLY INST21
- XPLY INSTCMOS
- X.sp
- XRMB0 topexpr INSTROCKWELL
- X.sp
- XRMB1 topexpr INSTROCKWELL
- X.sp
- XRMB2 topexpr INSTROCKWELL
- X.sp
- XRMB3 topexpr INSTROCKWELL
- X.sp
- XRMB4 topexpr INSTROCKWELL
- X.sp
- XRMB5 topexpr INSTROCKWELL
- X.sp
- XRMB6 topexpr INSTROCKWELL
- X.sp
- XRMB7 topexpr INSTROCKWELL
- X.sp
- XROL ACCUM
- XROL topexpr ',' INDEX DIRECT INDEXX
- XROL topexpr ',' INDEX EXTENDED INDEXX
- XROL topexpr DIRECT
- XROL topexpr EXTENDED
- X.sp
- XROR ACCUM
- XROR topexpr ',' INDEX DIRECT INDEXX
- XROR topexpr ',' INDEX EXTENDED INDEXX
- XROR topexpr DIRECT
- XROR topexpr EXTENDED
- X.sp
- XRTI
- X.sp
- XRTS
- X.sp
- XSBC '#' topexpr
- XSBC '(' topexpr ')' ',' INDEX DIRECT INDEXY
- XSBC '(' topexpr ')' DIRECT INSTCMOS
- XSBC '(' topexpr ',' INDEX ')' DIRECT INDEXX
- XSBC topexpr ',' INDEX DIRECT INDEXX
- XSBC topexpr ',' INDEX EXTENDED INDEXX
- XSBC topexpr ',' INDEX INDEXY
- XSBC topexpr DIRECT
- XSBC topexpr EXTENDED
- X.sp
- XSEC
- X.sp
- XSED
- X.sp
- XSEI
- X.sp
- XSMB0 topexpr INSTROCKWELL
- X.sp
- XSMB1 topexpr INSTROCKWELL
- X.sp
- XSMB2 topexpr INSTROCKWELL
- X.sp
- XSMB3 topexpr INSTROCKWELL
- X.sp
- XSMB4 topexpr INSTROCKWELL
- X.sp
- XSMB5 topexpr INSTROCKWELL
- X.sp
- XSMB6 topexpr INSTROCKWELL
- X.sp
- XSMB7 topexpr INSTROCKWELL
- X.sp
- XSTA '(' topexpr ')' ',' INDEX DIRECT INDEXY
- XSTA '(' topexpr ')' DIRECT INSTCMOS
- XSTA '(' topexpr ',' INDEX ')' DIRECT INDEXX
- XSTA topexpr ',' INDEX DIRECT INDEXX
- XSTA topexpr ',' INDEX EXTENDED INDEXX
- XSTA topexpr ',' INDEX INDEXY
- XSTA topexpr DIRECT
- XSTA topexpr EXTENDED
- X.sp
- XSTX topexpr ',' INDEX DIRECT INDEXY
- XSTX topexpr DIRECT
- XSTX topexpr EXTENDED
- X.sp
- XSTY topexpr ',' INDEX DIRECT INDEXX
- XSTY topexpr DIRECT
- XSTY topexpr EXTENDED
- X.sp
- XSTZ topexpr ',' INDEX DIRECT INDEXX INSTCMOS
- XSTZ topexpr ',' INDEX EXTENDED INDEXX INSTCMOS
- XSTZ topexpr DIRECT INSTCMOS
- XSTZ topexpr EXTENDED INSTCMOS
- X.sp
- XTAX
- X.sp
- XTAY
- X.sp
- XTRB topexpr DIRECT INSTCMOS
- XTRB topexpr EXTENDED INSTCMOS
- X.sp
- XTSB topexpr DIRECT INSTCMOS
- XTSB topexpr EXTENDED INSTCMOS
- X.sp
- XTSX
- X.sp
- XTXA
- X.sp
- XTXS
- X.sp
- XTYA
- X.TE
- X.H 3 "Operands"
- X.VL 25 5
- X.LI ACCUM
- XThe a or (A) reserved symbol
- X.LI INDEX
- XThe x or y (or X or Y) reserved symbols
- X.LE
- X.H 3 "Selection Criteria Keywords"
- X.VL 25 5
- X.LI DIRECT
- XThe instruction can use the direct addressing mode.
- XThe expression must have a value between 0 and 255 that is defined when the
- Xinstruction is processed in the input pass.
- X.LI EXTENDED
- XThe instruction can use the extended (16 bit address) mode.
- X.LI INDEXX
- XThe instruction can use the X index.
- X.LI INDEXY
- XThe instruction can use the Y index.
- X.LI INSTCMOS
- XThe instruction is in the CMOS and ROCKWELL CMOS instruction sets.
- X.LI INSTROCKWELL
- XThe instruction is in the ROCKWELL, ROCKWELL CMOS, and R65c00/21 instruction
- Xsets.
- X.LI INST21
- XThe instruction is in the R65c00/21 instruction set.
- X.LE
- X.H 3 "Apostrophes"
- XThe apostrophes in the syntax field are a notation used for the
- Xparser generator and are not put in the assembler source statement.
- X.H 2 "Notes"
- X.H 3 "Top Expressions"
- XThe syntax of some of the instructions combined with the standard expression
- Xsyntax resulted in confusion whether an operand was an expression surrounded
- Xby parenthesis, or a indexed reference.
- XTo get around this, the expressions in these ambiguous cases were restricted
- Xto those forms of expression that don't have surrounding parenthesis at the
- Xtop level.
- XSubexpressions may be parenthesized, but only if an operator seperates or
- Xprecedes the subexpression.
- X.DS I N
- XExample
- X.SP
- Xlda 47h,y ; load absolute, y
- Xlda +(47h),y ; load absolute, y
- Xlda (47h),y ; load (indirect), y
- Xlda ((47h)),y ; error
- X.DE
- X.H 3 "Reserved Symbols"
- X.H 4 "Machine Dependent Reserved Symbols"
- XA
- XX
- XY
- Xa
- Xx
- Xy
- X.H 4 "Standard Reserved Symbols"
- XAND
- XDEFINED
- XEQ
- XGE
- XGT
- XHIGH
- XLE
- XLOW
- XLT
- XMOD
- XNE
- XNOT
- XOR
- XSHL
- XSHR
- XXOR
- Xand
- Xdefined
- Xeq
- Xge
- Xgt
- Xhigh
- Xle
- Xlow
- Xlt
- Xmod
- Xne
- Xnot
- Xor
- Xshl
- Xshr
- Xxor
- X.TC 1 1 7
- SHAR_EOF
- true || echo 'restore of as6502.doc failed'
- fi
- # ============= as6502.tst ==============
- if test -f 'as6502.tst' -a X"$1" != X"-c"; then
- echo 'x - skipping as6502.tst (File already exists)'
- else
- echo 'x - extracting as6502.tst (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'as6502.tst' &&
- X cpu "r65c"
- Ximmed equ $55
- Xdirect equ $44
- Xextend equ $1234
- X adc # immed
- X adc ( direct, x )
- X adc (direct)
- X adc (direct),y
- X adc direct
- X adc direct,x
- X adc extend
- X adc extend,x
- X adc extend,y
- X and # immed
- X and ( direct, x )
- X and (direct)
- X and (direct),y
- X and direct
- X and direct,x
- X and extend
- X and extend,x
- X and extend,y
- X asl a
- X asl direct
- X asl direct,x
- X asl extend
- X asl extend,x
- X bbr0 direct, jmpdst
- X bbr1 direct, jmpdst
- X bbr2 direct, jmpdst
- X bbr3 direct, jmpdst
- X bbr4 direct, jmpdst
- X bbr5 direct, jmpdst
- X bbr6 direct, jmpdst
- X bbr7 direct, jmpdst
- X bbs0 direct, jmpdst
- X bbs1 direct, jmpdst
- X bbs2 direct, jmpdst
- X bbs3 direct, jmpdst
- X bbs4 direct, jmpdst
- X bbs5 direct, jmpdst
- X bbs6 direct, jmpdst
- X bbs7 direct, jmpdst
- Xjmpdst bcc jmpdst
- X bcs jmpdst
- X beq jmpdst
- X bge jmpdst
- X bit # immed
- X bit direct
- X bit direct ,x
- X bit extend
- X bit extend, x
- X blt jmpdst
- X bmi jmpdst
- X bne jmpdst
- X bpl jmpdst
- X bra jmpdst
- X brk
- X brk #99
- X bvc jmpdst
- X bvs jmpdst
- X clc
- X cld
- X cli
- X clv
- X cmp # immed
- X cmp ( direct, x )
- X cmp (direct)
- X cmp (direct),y
- X cmp direct
- X cmp direct,x
- X cmp extend
- X cmp extend,x
- X cmp extend,y
- X cpx # immed
- X cpx direct
- X cpx extend
- X cpy # immed
- X cpy direct
- X cpy extend
- X dec a
- X dec direct
- X dec direct,x
- X dec extend
- X dec extend,x
- X dex
- X dey
- X eor # immed
- X eor ( direct, x )
- X eor (direct)
- X eor (direct),y
- X eor direct
- X eor direct,x
- X eor extend
- X eor extend,x
- X eor extend,y
- X inc a
- X inc direct
- X inc direct,x
- X inc extend
- X inc extend,x
- X inx
- X iny
- X jmp (jmpdst)
- X jmp (jmpdst,x)
- X jmp jmpdst
- X jsr jmpdst
- X lda # immed
- X lda ( direct, x )
- X lda (direct)
- X lda (direct),y
- X lda direct
- X lda direct,x
- X lda extend
- X lda extend,x
- X lda extend,y
- X ldx # immed
- X ldx direct
- X ldx direct ,y
- X ldx extend
- X ldx extend, y
- X ldy # immed
- X ldy direct
- X ldy direct ,x
- X ldy extend
- X ldy extend, x
- X lsr a
- X lsr direct
- X lsr direct,x
- X lsr extend
- X lsr extend,x
- X mul
- X nop
- X ora # immed
- X ora ( direct, x )
- X ora (direct)
- X ora (direct),y
- X ora direct
- X ora direct,x
- X ora extend
- X ora extend,x
- X ora extend,y
- X pha
- X php
- X phx
- X phy
- X pla
- X plp
- X plx
- X ply
- X rmb0 direct
- X rmb1 direct
- X rmb2 direct
- X rmb3 direct
- X rmb4 direct
- X rmb5 direct
- X rmb6 direct
- X rmb7 direct
- X rol a
- X rol direct
- X rol direct,x
- X rol extend
- X rol extend,x
- X ror a
- X ror direct
- X ror direct,x
- X ror extend
- X ror extend,x
- X rti
- X rts
- X sbc # immed
- X sbc ( direct, x )
- X sbc (direct)
- X sbc (direct),y
- X sbc direct
- X sbc direct,x
- X sbc extend
- X sbc extend,x
- X sbc extend,y
- X sec
- X sed
- X sei
- X smb0 direct
- X smb1 direct
- X smb2 direct
- X smb3 direct
- X smb4 direct
- X smb5 direct
- X smb6 direct
- X smb7 direct
- X sta ( direct, x )
- X sta (direct)
- X sta (direct),y
- X sta direct
- X sta direct,x
- X sta extend
- X sta extend,x
- X sta extend,y
- X stx direct
- X stx direct,y
- X stx extend
- X sty direct
- X sty direct,x
- X sty extend
- X stz direct
- X stz direct ,x
- X stz extend
- X stz extend, x
- X tax
- X tay
- X trb direct
- X trb extend
- X tsb direct
- X tsb extend
- X tsx
- X txa
- X txs
- X tya
- SHAR_EOF
- true || echo 'restore of as6502.tst failed'
- fi
- # ============= as6502.tut ==============
- if test -f 'as6502.tut' -a X"$1" != X"-c"; then
- echo 'x - skipping as6502.tut (File already exists)'
- else
- echo 'x - extracting as6502.tut (Text)'
- sed 's/^X//' << 'SHAR_EOF' > 'as6502.tut' &&
- X00000055 immed 00000044 direct 00001234 extend
- X00000065 jmpdst
- X cpu "r65c"
- X 0x55 immed equ $55
- X 0x44 direct equ $44
- X 0x1234 extend equ $1234
- X0000 69 55 adc # immed
- X0002 61 44 adc ( direct, x )
- X0004 72 44 adc (direct)
- X0006 71 44 adc (direct),y
- X0008 65 44 adc direct
- X000a 75 44 adc direct,x
- X000c 6d 34 12 adc extend
- X000f 7d 34 12 adc extend,x
- X0012 79 34 12 adc extend,y
- X0015 29 55 and # immed
- X0017 21 44 and ( direct, x )
- X0019 32 44 and (direct)
- X001b 31 44 and (direct),y
- X001d 25 44 and direct
- X001f 35 44 and direct,x
- X0021 2d 34 12 and extend
- X0024 3d 34 12 and extend,x
- X0027 39 34 12 and extend,y
- X002a 0a asl a
- X002b 06 44 asl direct
- X002d 16 44 asl direct,x
- X002f 0e 34 12 asl extend
- X0032 1e 34 12 asl extend,x
- X0035 0f 44 2d bbr0 direct, jmpdst
- X0038 1f 44 2a bbr1 direct, jmpdst
- X003b 2f 44 27 bbr2 direct, jmpdst
- X003e 3f 44 24 bbr3 direct, jmpdst
- X0041 4f 44 21 bbr4 direct, jmpdst
- X0044 5f 44 1e bbr5 direct, jmpdst
- X0047 6f 44 1b bbr6 direct, jmpdst
- X004a 7f 44 18 bbr7 direct, jmpdst
- X004d 8f 44 15 bbs0 direct, jmpdst
- X0050 9f 44 12 bbs1 direct, jmpdst
- X0053 af 44 0f bbs2 direct, jmpdst
- X0056 bf 44 0c bbs3 direct, jmpdst
- X0059 cf 44 09 bbs4 direct, jmpdst
- X005c df 44 06 bbs5 direct, jmpdst
- X005f ef 44 03 bbs6 direct, jmpdst
- X0062 ff 44 00 bbs7 direct, jmpdst
- X0065 90 fe jmpdst bcc jmpdst
- X0067 b0 fc bcs jmpdst
- X0069 f0 fa beq jmpdst
- X006b b0 f8 bge jmpdst
- X006d 89 55 bit # immed
- X006f 24 44 bit direct
- X0071 34 44 bit direct ,x
- X0073 2c 34 12 bit extend
- X0076 3c 34 12 bit extend, x
- X0079 90 ea blt jmpdst
- X007b 30 e8 bmi jmpdst
- X007d d0 e6 bne jmpdst
- X007f 10 e4 bpl jmpdst
- X0081 80 e2 bra jmpdst
- X0083 00 brk
- X0084 00 63 brk #99
- X0086 50 dd bvc jmpdst
- X0088 70 db bvs jmpdst
- X008a 18 clc
- X008b d8 cld
- X008c 58 cli
- X008d b8 clv
- X008e c9 55 cmp # immed
- X0090 c1 44 cmp ( direct, x )
- X0092 d2 44 cmp (direct)
- X0094 d1 44 cmp (direct),y
- X0096 c5 44 cmp direct
- X0098 d5 44 cmp direct,x
- X009a cd 34 12 cmp extend
- X009d dd 34 12 cmp extend,x
- X00a0 d9 34 12 cmp extend,y
- X00a3 e0 55 cpx # immed
- X00a5 e4 44 cpx direct
- X00a7 ec 34 12 cpx extend
- X00aa c0 55 cpy # immed
- X00ac c4 44 cpy direct
- X00ae cc 34 12 cpy extend
- X00b1 3a dec a
- X00b2 c6 44 dec direct
- X00b4 d6 44 dec direct,x
- X00b6 ce 34 12 dec extend
- X00b9 de 34 12 dec extend,x
- X00bc ca dex
- X00bd 88 dey
- X00be 49 55 eor # immed
- X00c0 41 44 eor ( direct, x )
- X00c2 52 44 eor (direct)
- X00c4 51 44 eor (direct),y
- X00c6 45 44 eor direct
- X00c8 55 44 eor direct,x
- X00ca 4d 34 12 eor extend
- X00cd 5d 34 12 eor extend,x
- X00d0 59 34 12 eor extend,y
- X00d3 1a inc a
- X00d4 e6 44 inc direct
- X00d6 f6 44 inc direct,x
- X00d8 ee 34 12 inc extend
- X00db fe 34 12 inc extend,x
- X00de e8 inx
- X00df c8 iny
- X00e0 6c 65 00 jmp (jmpdst)
- X00e3 7c 65 00 jmp (jmpdst,x)
- X00e6 4c 65 00 jmp jmpdst
- X00e9 20 65 00 jsr jmpdst
- X00ec a9 55 lda # immed
- X00ee a1 44 lda ( direct, x )
- X00f0 b2 44 lda (direct)
- X00f2 b1 44 lda (direct),y
- X00f4 a5 44 lda direct
- X00f6 b5 44 lda direct,x
- X00f8 ad 34 12 lda extend
- X00fb bd 34 12 lda extend,x
- X00fe b9 34 12 lda extend,y
- X0101 a2 55 ldx # immed
- X0103 a6 44 ldx direct
- X0105 b6 44 ldx direct ,y
- X0107 ae 34 12 ldx extend
- X010a be 34 12 ldx extend, y
- X010d a0 55 ldy # immed
- X010f a4 44 ldy direct
- X0111 b4 44 ldy direct ,x
- X0113 ac 34 12 ldy extend
- X0116 bc 34 12 ldy extend, x
- X0119 4a lsr a
- X011a 46 44 lsr direct
- X011c 56 44 lsr direct,x
- X011e 4e 34 12 lsr extend
- X0121 5e 34 12 lsr extend,x
- X mul
- X ERROR - invalid operands/illegal instruction for cpu
- X0124 ea nop
- X0125 09 55 ora # immed
- X0127 01 44 ora ( direct, x )
- X0129 12 44 ora (direct)
- X012b 11 44 ora (direct),y
- X012d 05 44 ora direct
- X012f 15 44 ora direct,x
- X0131 0d 34 12 ora extend
- X0134 1d 34 12 ora extend,x
- X0137 19 34 12 ora extend,y
- X013a 48 pha
- X013b 08 php
- X013c da phx
- X013d 5a phy
- X013e 68 pla
- X013f 28 plp
- X0140 fa plx
- X0141 7a ply
- X0142 07 44 rmb0 direct
- X0144 17 44 rmb1 direct
- X0146 27 44 rmb2 direct
- X0148 37 44 rmb3 direct
- X014a 47 44 rmb4 direct
- X014c 57 44 rmb5 direct
- X014e 67 44 rmb6 direct
- X0150 77 44 rmb7 direct
- X0152 2a rol a
- X0153 26 44 rol direct
- X0155 36 44 rol direct,x
- X0157 2e 34 12 rol extend
- X015a 3e 34 12 rol extend,x
- X015d 6a ror a
- X015e 66 44 ror direct
- X0160 76 44 ror direct,x
- X0162 6e 34 12 ror extend
- X0165 7e 34 12 ror extend,x
- X0168 40 rti
- X0169 60 rts
- X016a e9 55 sbc # immed
- X016c e1 44 sbc ( direct, x )
- X016e f2 44 sbc (direct)
- X0170 f1 44 sbc (direct),y
- X0172 e5 44 sbc direct
- X0174 f5 44 sbc direct,x
- X0176 ed 34 12 sbc extend
- X0179 fd 34 12 sbc extend,x
- X017c f9 34 12 sbc extend,y
- X017f 38 sec
- X0180 f8 sed
- X0181 78 sei
- X0182 87 44 smb0 direct
- X0184 97 44 smb1 direct
- X0186 a7 44 smb2 direct
- X0188 b7 44 smb3 direct
- X018a c7 44 smb4 direct
- X018c d7 44 smb5 direct
- X018e e7 44 smb6 direct
- X0190 f7 44 smb7 direct
- X0192 81 44 sta ( direct, x )
- X0194 92 44 sta (direct)
- X0196 91 44 sta (direct),y
- X0198 85 44 sta direct
- X019a 95 44 sta direct,x
- X019c 8d 34 12 sta extend
- X019f 9d 34 12 sta extend,x
- X01a2 99 34 12 sta extend,y
- X01a5 86 44 stx direct
- X01a7 96 44 stx direct,y
- X01a9 8e 34 12 stx extend
- X01ac 84 44 sty direct
- X01ae 94 44 sty direct,x
- X01b0 8c 34 12 sty extend
- X01b3 64 44 stz direct
- X01b5 74 44 stz direct ,x
- X01b7 9c 34 12 stz extend
- X01ba 9e 34 12 stz extend, x
- X01bd aa tax
- X01be a8 tay
- X01bf 14 44 trb direct
- X01c1 1c 34 12 trb extend
- X01c4 04 44 tsb direct
- X01c6 0c 34 12 tsb extend
- X01c9 ba tsx
- X01ca 8a txa
- X01cb 9a txs
- X01cc 98 tya
- X ERROR SUMMARY - ERRORS DETECTED 1
- X - WARNINGS 0
- SHAR_EOF
- true || echo 'restore of as6502.tut failed'
- fi
- true || echo 'restore of as6502.y failed'
- echo End of part 1, continue with part 2
- exit 0
-