APPENDIX 8Series MELPS 7700 Machine InstructionsIMPSymbolImplied addressing modeDescriptionySymbolExclUSive ORDescriptionIMMImmediate addressing modeNegationAAccumulator addressmg modeMovement to the arrow directionDIRDirect addressing modeAceAccumulatorDIR, bDIR, XDirect bit addressmg modeDirect Indexed X addressing modeACCHACCLAccumulator's upper 8 bitsAccumulator's lower 8 bitsDIR, Y(DIR)(DIR, X)(DIR), Yl (DIR)l (DIR), YABSDirect Indexed Y addressing modeDirect indirect addressing modeDirect Indexed X indirect addressing modeDirect Indirect Indexed Y addressing modeDirect indirect long addressing modeDirect indirect long mdexed Y addressing modeAbsolute addressing modeAAHALBBHBLXAccumulator AAccumulator A's upper 8 bitsAccumulator A's lower a bitsAccumulator BAccumulator B's upper 8 bitsAccumulator B's lower 8 bitsIndex register XABS, bABS, XABS, YAbsolute bit addressing modeAbsolute mdexed X addressing modeAbsolute mdexed Y addressing modeXHXLYIndex register X's upper a bitsIndex register X's lower 8 bitsIndex register VABlAbsolute long addressing modeYHIndex register V's upper 8 bitsABl, X(ABS)l(ABS)Absolute long mdexed X addressing modeAbsolute indirect addressing modeAbsolute mdlrect long addressing modeYLSPCIndex register V's lower 8 bitsStack pOinterProgram counter(ABS, X)Absolute mdexed X indirect addressing modePCHProgram counter's upper 8 bitsSTKRElStack addressing modeRelative addressing modePCLPGProgram counter's lower 8 bitsProgram bank registerDIR, b, RElDirect bit relative addressing modeDTData bank registerABS,b,RElAbsolute bit relative addressing modeDPRDirect page registerSRStack pOinter relative addressing modeDPR HDirect page register's upper 8 bits(SR), YBlKCZIoxStack pOinter relative indirect Indexed Y addressingmodeBlock transfer addressing modeCarry flagZero flagInterrupt disable flagDeCimal operation mode flagIndex register length selection flagDPRLPSPSHPS LPSbM(S)Direct page register's lower 8 bitsProcessor status registerProcessor status register's upper 8 bitsProcessor status register's lower 8 bitsProcessor status register's b-th bitContents of memory at address indicated by stackpOinterb-th memory locationmData length selection flagValue of 24-blt address's upper a-bit (A,,-A,,)VOverflow flagValue of 24-bIt address's middle a-bit (A15-A,)NNegative flagValue of 24-blt address's lower a-bit (A,-Ao)IPl+*//\VProcessor Interrupt Priority levelAdditionSubtractionMultiplicationDIVISionLogical ANDLogical OROperation codeNumber of cycleNumber of byteNumber of transfer byte or rotationNumber of registers pushed or pulled265
APPENDIX CSeries MELPS 7700 Instruction Code TableINSTRUCTION CODE TABLE-1~(~HexadeCimal0000 0001 0010 0011 0100 0101 0110 01110 7 ...... 0 4 notation 0 1 2 3 4 5 6 70000 0 BRK0001 1 BPL0010 20011 3 BMIORA ORA SEB ORA ASL ORAA,(DIR,X) A,SR DIR,b , A,DIR DIR A,L(DIR)ORA ORA ORA CLB ORA ASL ORAA,(DIR),Y A,(OIR) A,(SR),Y DIR,b A,DIR,X DIR,X A,LiDIR),YJSR AND JSR AND BBS AND ROL ANDABS A,(DIR,X) ABL A,SR DIR,b,R A,DIR DIR A,L(DIR)AND AND AND BBC AND ROL ANDA,(DIR),Y A,(DIR) A,(SR),Y DIR,b,R A,DIR,X DIR,X A,L(DIR),EOR EOR EOR LSR EOR0100 4 RTI Note 1 MVPA,(DIR,X) A,SR A,DIR DIR A,L(DIR)EOR EOR EOR EOR LSR EOR0101 5 BVC MVNA,(DIR),Y A,(DIR) A,(SR),Y A,DIR,X DIR,X ,LiDIR),YADC ADC LDM ADC ROR ADC0110 6 RTS PERA,(DIR,X) A,SR DIR A.DIR DIR A,L(DIR)0111 7 BVS1000 81001 9 BCC1010 A1011 B BCS1100 CADC ADC ADC LDM ADC ROR ADCA,(DIR),Y A,(DIR) A,(SR),Y DIR,X A,DIR,X DIR,X A,L(DlR),BRA STA BRA STA STY STA STX STAREL A,(DIR,X) REL A,SR DIR A,DIR DIR A,L(DIR)STA STA STA STY STA STX STAA,(DIR),Y A,(DIR) A,(SR),Y DIR,X A,DIR,X DIR,Y A,L(DIR),LDY LDA LDX LDA LDY LDA LDX LDAIMM A,(DIR,X) IMM A,SR DIR A,DIR DIR A,L(DIA)LDA LDA LDA LDY LDA LDX LDAA,(DIR),Y A,(OIR) A,(SR)'Y DIR,X A,DIR,X DIR,Y A,L(DIR),YCPY CMP CLP CMP CPY CMP DEC CMPIMM A,(DIR,x) IMM A,SR DIR A,DIR DIR A,L(DIR)CMP CMP CMP CMP DEC CMP1101 D BNE PElA,(DIR),Y A,(DIR) A,(SR),Y A,DIR,X DIR,X A,L(OIR),1110 E,CPX SBC SEP SBC CPX SBC INC SBCIMM A,(DIR,X) IMM A,SR DIR A,DIR DIR A,LiDIR)SBC SBC SBC SBC INC SBC1111 F BEQ PEAA,(DIR),Y A,(DIR) A,(SR),Y A,DIR,X DIR,X A,L(DlR),YNotel: 42,. specifies the contents of the INSTRUCTION CODE TABLE-2,About the second word's codes, refer to the INSTRUCTION CODE TABLE-2Note 2 : 89,. specifies the contents of the INSTRUCTION CODE TABLE-3About the third word's codes, refer to the INSTRUCTION CODE TABLE-21000 1001 1010 1011 1100 1101 11108 9 A B C D EORA DEC CLB ORA ASL ORACLCTASA,ABS,Y A ABS,b A,ABS,X ABS,X A,ABL,XAND INC BBC AND ROL ANDSECTSAA,ABS,Y A ABS,b,R A,ABS,X ABS,X A,ABL,XEOR JMP EOR LSRCLI PHY TADA,ABS,Y ABL A,ABS,X ABS,XADC JMP ADC ROR ADCSEI PLY TDAA,ABS,Y(ABS,X) A,ABS,X ABS,X A,ABL,XDEY Note 2 TXA PHTSTY STA STXABS A,ABS ABSSTA LDM STA LDMTYA TXS TXYA,ABS,Y ABS A,ABS,X ABS,XLDA LDY LDA LDXTAY TAX PLTA,IMM ABS A,ABS ABSLDA LDY LDA LOX LDACLV TSX TYXA,ABS,YABS,X A,ABS,X ABS,Y A,ABL,XCMP CPY CMP DECINY DEX WITA,IMM ABS A,ABS ABSCMP JMP CMP DEC CMPCLM PHX STPA,ABS,YL(ABS) A,ABS,X ABS,X A,ABL,XSBC CPX SBC INCINX NOP PSHA,IMM ABS A,ABS ABS1111ORA ASL SEB ORA ASL ORAPHPPHDA,IMM A ABS,b A,ABS ABS A,ABLAND ROL BBS AND ROL ANDPLPPLDA,IMM A ABS,b,R A,ABS ABS A,ABLEOR LSR JMP EOR LSR EORPHAPHGA,IMM A ABS A,ABS ABS A,ABLSBC JSR SBC INC SBCSEM PLX PULA,ABS,Y(ABS,X) A,ABS,X ABS,X A,ABL,XFEORA,ABL,XADC ROR JMP ADC ROR ADCPLARTLA,IMM A (ABS) A,ABS ABS A,ABLSTAA,ABLSTAA,ABL,XLDAA,ABLCMPA,ABLSBCA,ABL266
- Page 1 and 2:
MITSUBISHI SEMICONDUCTORSMELPS 7700
- Page 4:
ContentsContents1. Introduction of
- Page 7 and 8:
Register Configuration2. Register C
- Page 9 and 10:
Register Configuration2.4 Stack Poi
- Page 11 and 12:
Register Configuration2.9 Processor
- Page 13 and 14:
Addressing Modes3. Addressi ng Mode
- Page 15 and 16:
ImmediateModeFunctionImmediate addr
- Page 17 and 18:
DirectModeFunctionDirect addressing
- Page 19 and 20:
Direct Indexed XModeFunctionDirect
- Page 21 and 22:
Direct Indexed YModeFunctionDirect
- Page 23 and 24:
D;,rect Indexed X IndirectModeFunct
- Page 25 and 26:
Direct Indexed X Indirectex.: Mnemo
- Page 27 and 28:
Direct Indirect Indexed Yex.: Mnemo
- Page 29 and 30:
Direct Indirect LongModeFunctionDir
- Page 31 and 32:
Direct Indirect Long Indexed Yex.:
- Page 33 and 34:
AbsoluteModeFunctionAbsolute addres
- Page 35 and 36:
Absolute BitModeFunctionAbsolute bi
- Page 37 and 38:
Absolute Indexed Xex.: MnemonicAOC
- Page 39 and 40:
Absolute Indexed Yex.: MnemonicLOX
- Page 41 and 42:
Absolute Long Indexed XModeFunction
- Page 43 and 44:
Absolute Indirect LongModeFunctionI
- Page 45 and 46:
StackModeFunctionStack addressing m
- Page 47 and 48:
RelativeModeFunctionRelative addres
- Page 49 and 50:
Direct Bit Relativeex.: Mnemonic Ma
- Page 51 and 52:
Absolute Bit Relativeex. : Mnemonic
- Page 53 and 54:
Stack Pointer Relative Indirect Ind
- Page 55 and 56:
Block TransferModeFunctionBlock tra
- Page 57 and 58:
Instructions4. Instructions4.1 Inst
- Page 59 and 60:
Instructions4.1.2 Arithmetic Instru
- Page 61 and 62:
InstructionsCategory Instruction De
- Page 63 and 64:
InstructionsThe table below lists t
- Page 65 and 66:
AND logical AND ANDOperation Acc f-
- Page 67 and 68:
BBC Branch on Bit Clear BBCOperatio
- Page 69 and 70:
BeeBranch on Carry ClearBeeOperatio
- Page 71 and 72:
BEQBranch on EqualBEQOperationWhen
- Page 73 and 74:
BNEBranch on Not EqualBNEOperationW
- Page 75 and 76:
BRABranch AlwaysBRAOperationFor sho
- Page 77 and 78:
eveBranch on Overflow CleareveOpera
- Page 79 and 80:
CLBClear BitCLBOperationM (- MA IMM
- Page 81 and 82:
,Cli Clear Interrupt Disable Status
- Page 83 and 84:
CLPClear Processor StatusCLPOperati
- Page 85 and 86:
CMP Compare CMPOperationAcc - MDesc
- Page 87 and 88:
CpyCompare Memory and Index Registe
- Page 89 and 90:
DEXDecrement Index Register X by On
- Page 91 and 92:
DIV Divide DIVOperationB(remainder}
- Page 93 and 94:
EOR Exclusive OR Memory with Accumu
- Page 95 and 96:
INX Increment Index Register X by O
- Page 97 and 98:
JMPJumpJMPOperationIf absolute addr
- Page 99 and 100:
LOA Load Accumulator from Memory LO
- Page 101 and 102:
LOT Load Immediate to Data Bank Reg
- Page 103 and 104:
LOYLoad Index Register Y from Memor
- Page 105 and 106:
MPYMultiplyMPYOperationB, A b A x M
- Page 107 and 108:
MVP Move Positive MVPOperationMn-k
- Page 109 and 110:
ORA OR Memory with Accumulator ORAO
- Page 111 and 112:
PElPush Effective Indirect AddressP
- Page 113 and 114:
PHAPush Accumulator A on StackPHAOp
- Page 115 and 116:
PHDOperationPush Direct Page Regist
- Page 117 and 118:
PHPPush Processor Status on StackPH
- Page 119 and 120:
PHXPush Index Register X on StackPH
- Page 121 and 122:
PLAPull Accumulator A from StackPLA
- Page 123 and 124:
PLDOperationPull Direct Page Regist
- Page 125 and 126:
PLTPull Data Bank Register from Sta
- Page 127 and 128:
PLYPull Index Register Y from Stack
- Page 129 and 130:
PSHPushPSHM(8) f- OPRH8 f- 8-1M(8)
- Page 131 and 132:
PULPullPULSf- S+1PSL f- M(S)Sf- S+1
- Page 133 and 134:
ROL Rotate One Bit Left ROLOperatio
- Page 135 and 136:
RTIReturn from InterruptRTIOperatio
- Page 137 and 138:
RTSReturn from SubroutineRTSOperati
- Page 139 and 140:
SEBSet BitSEBOperationM f- M V IMMI
- Page 141 and 142:
SEI Set Interrupt Disable Status SE
- Page 143 and 144:
SEPSet Processor StatusSEPOperation
- Page 145 and 146:
STPStopSTPOperationDescriptionStop
- Page 147 and 148:
STYStore Index Register Y in Memory
- Page 149 and 150:
lASTransfer Accumulator A to Stack
- Page 151 and 152:
TAYTransfer Accumulator A to Ind~x
- Page 153 and 154:
TBSTransfer Accumulator B to Stack
- Page 155 and 156:
TBvTransfer Accumulator B to Index
- Page 157 and 158:
TOBTransfer Direct Page Register to
- Page 159 and 160:
TSBTransfer Stack Pointer to Accumu
- Page 161 and 162:
TXATransfer Index Register X to Acc
- Page 163 and 164:
TXSTransfer Index Register X to Sta
- Page 165 and 166:
TVATransfer Index Register Y to Acc
- Page 167 and 168:
TYXTransfer Index Register Y to XTY
- Page 169 and 170:
XABExchange Accumulator A and 8XABO
- Page 171 and 172:
Notes for Programming(11) The code
- Page 173 and 174:
Instruction Execution Sequence6.2 C
- Page 175 and 176:
Instruction Execution SequenceIE)·
- Page 177 and 178:
Instruction Execution Sequence{Exam
- Page 179 and 180:
Instruction Execution Sequence(Exam
- Page 181 and 182:
Instruction Execution Sequence(Exam
- Page 183 and 184:
Instruction Execution Sequence(Exam
- Page 185 and 186:
Instruction Execution SequenceWhen
- Page 187 and 188:
Instruction Execution SequenceOpera
- Page 189 and 190:
Instruction Execution SequenceOpera
- Page 191 and 192:
Instruction Execution Sequence(Exam
- Page 193 and 194:
APPENDIX ACPU Instruction Execution
- Page 195 and 196:
ImpliedInstruction :CLC. CLI. CLM.
- Page 197 and 198:
ImpliedInstructionR T STiming¢I CP
- Page 199 and 200:
ImpliedInstructionBRKTiming00194
- Page 201 and 202:
ImmediateInstruction :. L D TTiming
- Page 203 and 204:
ImmediateInstructionDIV, MPYTimingr
- Page 205 and 206:
DirectInstructionADC, AND, CMP, CPX
- Page 207 and 208:
DirectInstructionDIV, MPYTiming~cpu
- Page 209 and 210:
Direct Indexed XInstructionADC, AND
- Page 211 and 212:
Direct Indexed XInstructionDIV. MPY
- Page 213 and 214:
Direct IndirectInstructionADC. AND.
- Page 215 and 216:
Direct Indexed X IndirectInstructio
- Page 217 and 218:
Direct Indirect Indexed YInstructio
- Page 219 and 220: Direct Indirect LongInstructionADC,
- Page 221 and 222: Direct Indirect Long Indexed YInstr
- Page 223 and 224: AbsoluteInstructionADC, AND, CMP, C
- Page 225 and 226: AbsoluteInstructionDIV, MPYTimingt/
- Page 227 and 228: Absolute BitInstruction : C L B, S
- Page 229 and 230: Absolute Indexed XInstruction : A S
- Page 231 and 232: Absolute Indexed XAbsolute Indexed
- Page 233 and 234: Absolute LongInstructionAD C, AND,
- Page 235 and 236: Absolute LongInstructionJ M PTiming
- Page 237 and 238: Absolute Long Indexed XInstructionD
- Page 239 and 240: Absolute Indirect LongInstructionJ
- Page 241 and 242: StackInstructionPEA. Timing¢CPUAp(
- Page 243 and 244: StackInstructionP H BTiming4tcpuAp(
- Page 245 and 246: StackInstructionPLPTimingAp(cpu)DAT
- Page 247 and 248: StackInstructionPULTimingPSDATA{Cpu
- Page 249 and 250: Direct Bit RelativeInstructionBBG,
- Page 251 and 252: Stack Pointer RelativeInstruction :
- Page 253 and 254: Stack Pointer Relative Indirect Ind
- Page 255 and 256: Block TransferInstructionMVNTimingI
- Page 257 and 258: APPENDIX BSeries MELPS 7700 Machine
- Page 259 and 260: APPENDIX BSeries MELPS 7700 Machine
- Page 261 and 262: APPENDIX 8Series MELPS 7700 Machine
- Page 263 and 264: APPENDIX BSeries MELPS 7700 Machine
- Page 265 and 266: APPENDIX BSeries MELPS 7700 Machine
- Page 267 and 268: APPENDIX BSeries MELPS 7700 Machine
- Page 269: APPENDIX BSeries MELPS 7700 Machine
- Page 273 and 274: APPENDIX CSeries MELPS 7700 Instruc
- Page 275 and 276: MITSUBISHI SEMICONDUCTORSMELPS 7700