|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.michab.simulator.mos6502.Opcodes
Defines instruction encodings. Note that the attribute names are used to formally encode the addressing mode. This is used in reflective code to compute a human readable instruction representation.
The general format is
<instructionName>_<addressingMode>
, where the name
is defined in numerous 6502 assembly language books and the addressingMode
is one of:
Suffix | Comment |
---|---|
IMP | Implicit |
IMM | Immediate |
ZP | Zero page |
ZPX | Zero page, x-register relative |
ZPY | Zero page, y-register relative |
ABS | Absolute |
ABSX | Absolute x |
ABSY | Absolute y |
IND | Indirect |
IZX | X indirect |
IZY | Y indirect |
REL | Relative |
Field Summary | |
static int |
ADC_ABS
|
static int |
ADC_ABSX
|
static int |
ADC_ABSY
|
static int |
ADC_IMM
|
static int |
ADC_IZX
|
static int |
ADC_IZY
|
static int |
ADC_ZP
|
static int |
ADC_ZPX
|
static int |
AND_ABS
|
static int |
AND_ABSX
|
static int |
AND_ABSY
|
static int |
AND_IMM
|
static int |
AND_IZX
|
static int |
AND_IZY
|
static int |
AND_ZP
|
static int |
AND_ZPX
|
static int |
ASL_ABS
|
static int |
ASL_ABSX
|
static int |
ASL_IMP
|
static int |
ASL_ZP
|
static int |
ASL_ZPX
|
static int |
BCC_REL
|
static int |
BCS_REL
|
static int |
BEQ_REL
|
static int |
BIT_ABS
|
static int |
BIT_ABSX
|
static int |
BIT_ZP
|
static int |
BIT_ZPX
|
static int |
BMI_REL
|
static int |
BNE_REL
|
static int |
BPL_REL
|
static int |
BRK_IMP
|
static int |
BVC_REL
|
static int |
BVS_REL
|
static int |
CLC_IMP
|
static int |
CLD_IMP
|
static int |
CLI_IMP
|
static int |
CLV_IMP
|
static int |
CMP_ABS
|
static int |
CMP_ABSX
|
static int |
CMP_ABSY
|
static int |
CMP_IMM
|
static int |
CMP_IZX
|
static int |
CMP_IZY
|
static int |
CMP_ZP
|
static int |
CMP_ZPX
|
static int |
CPX_ABS
|
static int |
CPX_IMM
|
static int |
CPX_ZP
|
static int |
CPY_ABS
|
static int |
CPY_IMM
|
static int |
CPY_ZP
|
static int |
DEC_ABS
|
static int |
DEC_ABSX
|
static int |
DEC_ZP
|
static int |
DEC_ZPX
|
static int |
DEX_IMP
|
static int |
DEY_IMP
|
static int |
EOR_ABS
|
static int |
EOR_ABSX
|
static int |
EOR_ABSY
|
static int |
EOR_IMM
|
static int |
EOR_IZX
|
static int |
EOR_IZY
|
static int |
EOR_ZP
|
static int |
EOR_ZPX
|
static int |
INC_ABS
|
static int |
INC_ABSX
|
static int |
INC_ZP
|
static int |
INC_ZPX
|
static int |
INX_IMP
|
static int |
INY_IMP
|
static int |
JMP_ABS
|
static int |
JMP_IND
|
static int |
JSR_ABS
|
static int |
LDA_ABS
|
static int |
LDA_ABSX
|
static int |
LDA_ABSY
|
static int |
LDA_IMM
|
static int |
LDA_IZX
|
static int |
LDA_IZY
|
static int |
LDA_ZP
|
static int |
LDA_ZPX
|
static int |
LDX_ABS
|
static int |
LDX_ABSY
|
static int |
LDX_IMM
|
static int |
LDX_ZP
|
static int |
LDX_ZPY
|
static int |
LDY_ABS
|
static int |
LDY_ABSX
|
static int |
LDY_IMM
|
static int |
LDY_ZP
|
static int |
LDY_ZPX
|
static int |
LSR_ABS
|
static int |
LSR_ABSX
|
static int |
LSR_IMP
|
static int |
LSR_ZP
|
static int |
LSR_ZPX
|
static int |
NOP_IMP
|
static int |
ORA_ABS
|
static int |
ORA_ABSX
|
static int |
ORA_ABSY
|
static int |
ORA_IMM
|
static int |
ORA_IZX
|
static int |
ORA_IZY
|
static int |
ORA_ZP
|
static int |
ORA_ZPX
|
static int |
PHA_IMP
|
static int |
PHP_IMP
|
static int |
PLA_IMP
|
static int |
PLP_IMP
|
static int |
ROL_ABS
|
static int |
ROL_ABSX
|
static int |
ROL_IMP
|
static int |
ROL_ZP
|
static int |
ROL_ZPX
|
static int |
ROR_ABS
|
static int |
ROR_ABSX
|
static int |
ROR_IMP
|
static int |
ROR_ZP
|
static int |
ROR_ZPX
|
static int |
RTI_IMP
|
static int |
RTS_IMP
|
static int |
SBC_ABS
|
static int |
SBC_ABSX
|
static int |
SBC_ABSY
|
static int |
SBC_IMM
|
static int |
SBC_IZX
|
static int |
SBC_IZY
|
static int |
SBC_ZP
|
static int |
SBC_ZPX
|
static int |
SEC_IMP
|
static int |
SED_IMP
|
static int |
SEI_IMP
|
static int |
STA_ABS
|
static int |
STA_ABSX
|
static int |
STA_ABSY
|
static int |
STA_IZX
|
static int |
STA_IZY
|
static int |
STA_ZP
|
static int |
STA_ZPX
|
static int |
STX_ABS
|
static int |
STX_ZP
|
static int |
STX_ZPY
|
static int |
STY_ABS
|
static int |
STY_ZP
|
static int |
STY_ZPX
|
static int |
TAX_IMP
|
static int |
TAY_IMP
|
static int |
TSX_IMP
|
static int |
TXA_IMP
|
static int |
TXS_IMP
|
static int |
TYA_IMP
|
static int |
uLSE_ABS
|
static int |
uLSE_ABSX
|
static int |
uLSE_ABSY
|
static int |
uLSE_IZX
|
static int |
uLSE_IZY
|
static int |
uLSE_ZP
|
static int |
uLSE_ZPX
|
static int |
uSAX_ABS
|
static int |
uSAX_IZX
|
static int |
uSAX_ZP
|
static int |
uSAX_ZPY
|
Method Summary | |
static int |
getEncodingLength(int opcode)
Get the length that an instruction based on the passed opcode uses in memory. |
static java.lang.String |
getText(int opcode)
Returns the textual representation for the passed opcode. |
static int |
getTime(int opcode)
Get the number of cycles required to execute the passed opcode. |
static boolean |
isValidOpcode(int opcode)
Checks whether the passed opcode is valid. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int ADC_IMM
public static final int ADC_ZP
public static final int ADC_ZPX
public static final int ADC_ABS
public static final int ADC_ABSX
public static final int ADC_ABSY
public static final int ADC_IZX
public static final int ADC_IZY
public static final int AND_IMM
public static final int AND_ZP
public static final int AND_ZPX
public static final int AND_IZX
public static final int AND_IZY
public static final int AND_ABS
public static final int AND_ABSX
public static final int AND_ABSY
public static final int ASL_IMP
public static final int ASL_ZP
public static final int ASL_ZPX
public static final int ASL_ABS
public static final int ASL_ABSX
public static final int BCC_REL
public static final int BCS_REL
public static final int BEQ_REL
public static final int BIT_ZP
public static final int BIT_ZPX
public static final int BIT_ABS
public static final int BIT_ABSX
public static final int BMI_REL
public static final int BNE_REL
public static final int BPL_REL
public static final int BRK_IMP
public static final int BVC_REL
public static final int BVS_REL
public static final int CLC_IMP
public static final int CLD_IMP
public static final int CLI_IMP
public static final int CLV_IMP
public static final int CMP_IMM
public static final int CMP_ZP
public static final int CMP_ZPX
public static final int CMP_IZX
public static final int CMP_IZY
public static final int CMP_ABS
public static final int CMP_ABSX
public static final int CMP_ABSY
public static final int CPX_IMM
public static final int CPX_ZP
public static final int CPX_ABS
public static final int CPY_IMM
public static final int CPY_ZP
public static final int CPY_ABS
public static final int DEC_ZP
public static final int DEC_ZPX
public static final int DEC_ABS
public static final int DEC_ABSX
public static final int DEX_IMP
public static final int DEY_IMP
public static final int EOR_IMM
public static final int EOR_ZP
public static final int EOR_ZPX
public static final int EOR_ABS
public static final int EOR_ABSX
public static final int EOR_ABSY
public static final int EOR_IZX
public static final int EOR_IZY
public static final int INC_ZP
public static final int INC_ZPX
public static final int INC_ABS
public static final int INC_ABSX
public static final int INX_IMP
public static final int INY_IMP
public static final int JMP_ABS
public static final int JMP_IND
public static final int JSR_ABS
public static final int LDA_IMM
public static final int LDA_ZP
public static final int LDA_ZPX
public static final int LDA_ABS
public static final int LDA_ABSX
public static final int LDA_ABSY
public static final int LDA_IZX
public static final int LDA_IZY
public static final int LDX_IMM
public static final int LDX_ZP
public static final int LDX_ZPY
public static final int LDX_ABS
public static final int LDX_ABSY
public static final int LDY_IMM
public static final int LDY_ZP
public static final int LDY_ZPX
public static final int LDY_ABS
public static final int LDY_ABSX
public static final int LSR_IMP
public static final int LSR_ZP
public static final int LSR_ZPX
public static final int LSR_ABS
public static final int LSR_ABSX
public static final int NOP_IMP
public static final int ORA_IMM
public static final int ORA_ZP
public static final int ORA_ZPX
public static final int ORA_IZX
public static final int ORA_IZY
public static final int ORA_ABS
public static final int ORA_ABSX
public static final int ORA_ABSY
public static final int PHA_IMP
public static final int PHP_IMP
public static final int PLA_IMP
public static final int PLP_IMP
public static final int ROL_IMP
public static final int ROL_ZP
public static final int ROL_ZPX
public static final int ROL_ABS
public static final int ROL_ABSX
public static final int ROR_IMP
public static final int ROR_ZP
public static final int ROR_ZPX
public static final int ROR_ABS
public static final int ROR_ABSX
public static final int RTI_IMP
public static final int RTS_IMP
public static final int SBC_IMM
public static final int SBC_ZP
public static final int SBC_ZPX
public static final int SBC_ABS
public static final int SBC_ABSX
public static final int SBC_ABSY
public static final int SBC_IZX
public static final int SBC_IZY
public static final int SEC_IMP
public static final int SED_IMP
public static final int SEI_IMP
public static final int STA_ZP
public static final int STA_ZPX
public static final int STA_ABS
public static final int STA_ABSX
public static final int STA_ABSY
public static final int STA_IZX
public static final int STA_IZY
public static final int STX_ZP
public static final int STX_ZPY
public static final int STX_ABS
public static final int STY_ZP
public static final int STY_ZPX
public static final int STY_ABS
public static final int TAX_IMP
public static final int TAY_IMP
public static final int TSX_IMP
public static final int TXA_IMP
public static final int TXS_IMP
public static final int TYA_IMP
public static final int uLSE_ZP
public static final int uLSE_ZPX
public static final int uLSE_IZX
public static final int uLSE_IZY
public static final int uLSE_ABS
public static final int uLSE_ABSX
public static final int uLSE_ABSY
public static final int uSAX_ZP
public static final int uSAX_ZPY
public static final int uSAX_IZX
public static final int uSAX_ABS
Method Detail |
public static java.lang.String getText(int opcode)
java.text.MessageFormat
compatible way. Note that only the lower eight bits of the passed
opcode are used for lookup.
opcode
- The opcode to decode.
public static int getEncodingLength(int opcode)
opcode
- The opcode to decode.
public static int getTime(int opcode)
opcode
- The opcode.
public static boolean isValidOpcode(int opcode)
opcode
- The opcode to check.
true
in case the opcode can be translated into a
mnemonic.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |