The 65020 is an attempt to extend the 6502 to a more modern 32 bit design. This page might be a little difficult to understand if you are not familiar with the 6502.
The basic trick involved is to extend the 6502's concept of a byte to a 16 bit word. Opcodes take one byte, so they are now 16 bits. Addresses take two bytes, so they are now 32 bits. The instruction set is designed so that it behaves like the old 8 bit processor if the top 8 bits of each word are set to '1'.
32 bit data is stored in the same format.
The 65020 instruction set in a rather ugly example of an HTML table. HTML is not my best language.
The only instruction added to the original set is PSH - push immediate. It takes the slot you'd expect STA immediate to have. All other new operations are implemented through the 'P' bit (see below).
0:ADC AND CMP EOR LDA ORA SBC STA
| 1: | ASL DEC INC LSR ROL ROR
| 2: | BCC BCS BEQ BMI DNE BPL BVC BVS
| 3: | BIT JMP JSR
| 4: | BRK
| 5: | CLC CLD CLI CLV SEC SED SEI NOP
| 6: | CPX CPY LDX LDY STX STY
| 7: | DEX DEY INX INY
| 8: | PHA PHP PLA PLP PSH
| 9: | RTI RTS
| 10: | TAX TAY TSX TXA TXS TYA
| |
0:PDRRSSSS | used by ACC modes, PHA, RTS, TAX groups
| 1: | PDNNNXXX | used by DEX group
| 2: | PVVVVVVV | used by BRK group
| 3: | PDRRIXXX | used by all others
| |
D: Data Size. '1' means this is an 8 bit instruction. '0' means it is a 32 bit instruction.
R: Main Register Select. On an LDA instruction, for example, it selects one of the four A registers. On CPX, it selects one of four X registers.
I: Index Size. '1' means the index (if it is used) is 8 bits (the bottom 8 bits of the register). '0' means the index is 32 bits.
X: Index Register Select.
000:PC | 100: | X0/Y0
| 001: | Z0 | 101: | X1/Y1
| 010: | Z1 | 110: | X2/Y2
| 011: | SP | 111: | X3/Y3
| |
N: Constant to INC/DEC by.
000:8 | 100: | 4
| 001: | 7 | 101: | 3
| 010: | 6 | 110: | 2
| 011: | 5 | 111: | 1
| |
S: Stack Register Select / Second Register Select.
0000:A0 | 1000: | X0
| 0001: | A1 | 1001: | X1
| 0010: | A2 | 1010: | X2
| 0011: | A3 | 1011: | X3
| 0100: | Y0 | 1100: | PC
| 0101: | Y1 | 1101: | Z0
| 0110: | Y2 | 1110: | Z1
| 0111: | Y3 | 1111: | SP
| |
The ACC mode uses this field to select the second register. All of the ADC group instructions now have an ACC mode, and the ACC mode can access any register. Register-to-register operations are now possible, as long as the destination is an A register.
V: BRK vector number. The vector is at $FFFFFF00+2*V.
ASL group instructions with ACC mode use the S field to select the register instead of the R field. This means they can work on any register.