IOP16 Instructions Detail - douggilliland/IOP16 GitHub Wiki
- Details of the instructions follow
- Some instructions are psuedo-ops which are replaced with equivalent instructions
- Used as convenience
- Instruction to load register
- Load a register with an immediate value
- Peripheral read/write instructions
- Read peripheral address into a register
- Write value from register to peripheral address
- Shift/rotate instructions
- Logical/arithmetic operations
- The bottom 3-bits of the instruction have the count
- Count is set to 1
- Barrel shifter could be written to have other counts
- Shift/rotate instruction do not set the Condition Code Z-bit
- Shift register left by 1
- Shifts in 0 to Least Significant bit
- Shift register right by 1
- Shifts in 0 to Most Significant bit
- Shift register left by 1
- Shifts in 0 to Least Significant bit
- Shift register right by 1
- Shifts in 1 to Most Significant bit
- Rotate Register left by 1
- Rotate Register MSB into Register Least Significant bit
- Rotate register right by 1
- Rotate Register LSB into Register Most Significant bit
- Logical and Mathematical instructions
- Set Conditional Code Zero-bit
- Exclusive-OR Register with immediate value
- Store back into register
- Set Conditional Code Zero-bit
- Logical OR Register with immediate value
- Store back into register
- Set Conditional Code Zero-bit
- Logical AND Register with immediate value
- Store back into register
- Set Conditional Code Zero-bit
- Add Register with immediate value
- Store back into register
- Set Conditional Code Zero-bit
- Compare register with Immediate value
- Set Conditional Code Zero-bit
- Various instructions that can alter program flow
- Some are conditional branches, Bxx
- Pops the program stack to use as a return address
- Push next address onto stack
- Jump to address
- Jump to address
- If CCR Zero bit is set take branch
- If CCR Zero bit is not set take branch
- Psuedo-Instruction (same as BEZ)
- If CCR Equal bit is set take branch
- Psuedo-Instruction (Same as BNZ)
- If CCR Equal bit is clear take branch
- Psuedo-Instruction
- Coded as ORI Reg8,0x00
- Psuedo-Instruction performs branch to self