Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <cpu name=6502 endian=Intel><!-- I'm almost certain I made a mistake somewhere -->
- <arg id=BYT type=Constant max=$FF />
- <arg id=ZPG type=AdrAbs max=$FF />
- <arg id=WRD type=AdrAbs max=$FFFF />
- <arg id=BRA type=RelPC offset=2 min=-128 max=127 />
- <arg id=AdMode type=AssMask shape=columns >
- "#~BYT~", "IM",
- "(~BYT~},X)", "IX",
- "(~BYT~),Y", "IY",
- "~BYT~,X", "ZX",
- "~BYT~,Y", "ZY",
- "~BYT~", "ZP",
- "~WRD~", "AB",
- "~WRD~,X", "AX",
- "~WRD~,Y", "AY",
- "(~WRD~)", "AI",
- "", "NO",
- "~BRA~", "BR",
- </arg >
- <arg id=MainOp type=OpMaskMatrix row=inline column=AdMode >
- ---, "IM","ZP","ZX","ZY","AB","AX","AY","IY","IX","NO","AI"
- "ADC", $69, $65, $75, ---, $6D, $7D, $79, $71, $61, ---, ---
- "AND", $29, $25, $35, ---, $2D, $3D, $39, $31, $21, ---, ---
- "CMP", $C9, $C5, $D5, ---, $CD, $DD, $D9, $D1, $C1, ---, ---
- "EOR", $49, $45, $55, ---, $4D, $5D, $59, $51, $41, ---, ---
- "ORA", $09, $05, $15, ---, $0D, $1D, $19, $11, $01, ---, ---
- "SBC", $E9, $E5, $F5, ---, $ED, $FD, $F9, $F1, $E1, ---, ---
- "LDA", $A9, $A5, $B5, ---, $AD, $BD, $B9, $B1, $A1, ---, ---
- "STA", ---, $85, $95, ---, $8D, $9D, $99, $91, $81, ---, ---
- "STX", ---, $86, ---, $96, $8E, ---, ---, ---, ---, ---, ---
- "STY", ---, $84, $94, ---, $8C, ---, ---, ---, ---, ---, ---
- "ASL", ---, $06, $16, ---, $0E, $1E ---, ---, ---, ---, ---
- "LSR", ---, $46, $56, ---, $4E, $5E, ---, ---, ---, $0A, ---
- "ASR", ---, $44, $54, ---, ---, ---, ---, ---, ---, $43, ---
- "ROL", ---, $26, $36, ---, $2E, $3E, ---, ---, ---, $2A, ---
- "ROR", ---, $66, $76, ---, $6E, $7E, ---, ---, ---, $6A, ---
- "BIT", ---, $24, $34, ---, $2C, $3C, ---, ---, ---, ---, ---
- "INC", $E6, $F6, $EE, ---, $FE, ---, ---, ---, ---, $1A, ---
- "DEC", $C6, $D6, $CE, ---, $DE, ---, ---, ---, ---, $3A, ---
- "LDX", $A2, $A6, ---, $B6, $AE, ---, $BE, ---, ---, ---, ---
- "LDY", $A0, $A4, $B4, ---, $AC, $BC, ---, ---, ---, ---, ---
- "LDZ", $A3, ---, ---, ---, $AB, $BB, ---, ---, ---, ---, ---
- "CPX", $E0, $E4, ---, ---, $EC, ---, ---, ---, ---, ---, ---
- "CPY", $C0, $C4, ---, ---, $CC, ---, ---, ---, ---, ---, ---
- "JMP", ---, ---, ---, ---, $4C, ---, ---, ---, ---, ---, $6C
- "JSR", ---, ---, ---, ---, $20, ---, ---, ---, ---, ---, ---
- </arg >
- <arg id=BranchOp type=AssCode shape=columns >
- "BCC", $90,
- "BCS", $B0,
- "BEQ", $F0,
- "BNE", $D0,
- "BMI", $30,
- "BPL", $10,
- "BRA", $80,
- "BVC", $50,
- "BVS", $70,
- </arg >
- <arg id=Implied type=AssCode shape=row:row >
- "BRK","CLC","CLD","CLI","CLV","NEG","NOP","PHA","PHP",
- $00, $18, $D8, $58, $B8, $42, $EA, $48, $08,
- "PLA","PLP","RTI","SEC","SED","SEI","RTS",
- $68, $28, $40, $38, $F8, $78, $60,
- "DEX","DEY","INX","INY","TAX","TAY","TSX","TXA","TXS","TYA",
- $CA, $88, $E8, $C8, $AA, $A8, $BA, $8A, $9A, $98,
- </arg >
- <arg id=JustByte type=AnyOfThese >
- "#~BYT~", "IM",
- "(~BYT~},X)", "IX",
- "(~BYT~),Y", "IY",
- "~BYT~,X", "ZX",
- "~BYT~,Y", "ZY",
- "~BYT~", "ZP",
- </arg>
- <arg id=JustWord type=AnyOfThese>
- "~WRD~", "AB",
- "~WRD~,X", "AX",
- "~WRD~,Y", "AY",
- "(~WRD~)", "AI",
- </arg>
- <opc mask="~AnyIn(Implied)~" >
- out 8, Picked(Implied);
- </opc >
- <opc mask="~ThatSupports(MainOp, Row, JustByte)[Op]~ ~AnyIn(JustByte)~ " >
- out 8, InMatrix(Picked(JustByte),[Op]); out 8, Picked(JustByte).BYT;
- </opc >
- <opc mask="~ThatSupports(MainOp, Row, JustWord)[Op]~ ~AnyIn(JustWord)~ " >
- out 8, InMatrix(Picked(JustWord),[Op]); out 16, Picked(JustWord).BYT;
- </opc >
- <opc mask="~AnyIn(BranchOp)~ ~BRA~" >
- out 8, Picked(BranchOp); out 8, BRA;
- </opc >
- </cpu >
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement