Difference between revisions of "S1C88 InstructionSet"

From SublabWiki
Jump to: navigation, search
m
Line 1: Line 1:
 +
''' THIS PAGE IS IN PROCESS '''
 +
 
= 8-bit arithmetic and logic operation =
 
= 8-bit arithmetic and logic operation =
 
== '''ADD''': Addition ==
 
== '''ADD''': Addition ==

Revision as of 00:30, 11 July 2015

THIS PAGE IS IN PROCESS

Contents

8-bit arithmetic and logic operation

ADD: Addition

ADC: Addition with carry

SUB: Subtraction

SBC: Subtraction with carry

AND: Logical product

OR: Logical sum

XOR: Exclusive OR

CP: Comparison

BIT: Bit test

INC: 1 increment

DEC: 1 decrement

MLT: Multiplication

DIV: Division

CPL: Complement of 1

NEG: Complement of 2

8-bit transfer

LD: Load

EX: Byte exchange

SWAP: Nibble exchange

Rotate/shift

RL: Rotate to left

RLC: Rotate to left with carry

RR: Rotate to right

RRC: Rotate to right with carry

SLA: Arithmetic shift to left

SLL: Logical shift to left

SRA: Arithmetic shift to right

SRL: Logical shift to right

Auxiliary operation

PACK: Pack

UPCK: Unpack

SEP: Code extension

16-bit arithmetic operation

ADD: Addition

ADC: Addition with carry

SUB: Subtraction

SBC: Subtraction with carry

CP: Comparison

INC: 1 increment

DEC: 1 decrement

16-bit transfer

LD: Load

EX: Word exchange

Stack Control

PUSH: Push

POP: Pop

Branch

JRS: Relative short jump

JRL: Relative long jump

JP: Indirect jump

DJR: Loop

CARS: Relative short call

CARL: Relative long call

CALL: Indirect call

RET: Return

RETE: Exception processing return

RETS: Return and skip

INT: Software interrupt

System Control

NOP: No operation

HALT: Shifts to HALT status

SLP: Shifts to SLEEP status

Illegal Instructions

NOTE: This document is now out of date, as should be updated to the new mnemonic and register naming

The entire opcode table has been evaluated on Pokemon Mini units and new and exotic illegal opcodes have been found.

These opcodes are not officially supported (they are not used by commercial games and not even found in the Pokemon Channel emulator) and can produce random results or crashes in some cases. The illegal opcodes have been documented on this page's Discussion page.