Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
4
Table of Contents
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
5.13 END............................................................................................................................................. 91
5.14 NOP (for simple project only) .................................................................................................. 91
6. Step Ladder Instructions 92
6.1 Step Ladder ................................................................................................................................. 92
6.1.1 Outline ........................................................................................................................................... 92
6.1.2 Function and operation explanation ..............................................................................................92
6.1.3 Program examples ........................................................................................................................99
6.2 STL ............................................................................................................................................. 100
6.3 RET............................................................................................................................................. 101
7. Applied Instructions (Program Flow) 103
7.1 CJ / Conditional Jump .............................................................................................................. 104
7.2 CALL / Call Subroutine............................................................................................................. 111
7.3 SRET / Subroutine Return........................................................................................................ 116
7.4 IRET / Interrupt Return.............................................................................................................. 117
7.5 DI / Disable Interrupt................................................................................................................. 120
7.6 EI / Enable Interrupt .................................................................................................................. 121
7.7 FEND / Main Routine Program End ......................................................................................... 123
7.8 WDT / Watchdog Timer Refresh .............................................................................................. 125
7.9 FOR / Start a FOR/NEXT Loop ................................................................................................. 128
7.10 NEXT / End a FOR/NEXT Loop............................................................................................... 129
8. Applied Instructions (Move and Compare) 132
8.1 CMP / Compare.......................................................................................................................... 133
8.2 ZCP / Zone Compare................................................................................................................. 136
8.3 MOV / Move................................................................................................................................ 139
8.4 SMOV / Shift Move .................................................................................................................... 143
8.5 CML / Complement.................................................................................................................... 146
8.6 BMOV / Block Move .................................................................................................................. 149
8.7 FMOV / Fill Move ....................................................................................................................... 154
8.8 XCH / Exchange......................................................................................................................... 157
8.9 BCD / Conversion to Binary Coded Decimal.......................................................................... 159
8.10 BIN / Conversion to Binary..................................................................................................... 163
9. Applied Instructions (Arithmetic and Logical Operation) 167
9.1 ADDP / Addition ........................................................................................................................ 168
9.2 SUBP / Subtraction ................................................................................................................... 171
9.3 MULP / Multiplication................................................................................................................ 174
9.4 DIVP / Division........................................................................................................................... 178
9.5 INC / Increment.......................................................................................................................... 181
9.6 DEC / Decrement....................................................................................................................... 183
9.7 WAND / Logical Word AND ...................................................................................................... 185
9.8 WOR / Logical Word OR ........................................................................................................... 187
9.9 WXOR / Logical Exclusive OR ................................................................................................. 189
9.10 NEG / Negation........................................................................................................................ 192