Skip to content

Group 0 Instructions (OpG 0x0)

Infinity edited this page Jun 25, 2023 · 3 revisions

Introduction

Group 0, or SYS, is a non-conforming Group, instructions in this group have no predetermined 2nd Operand, instead varying between instructions, with instruction width also varying between instructions.

Instructions

NOP OpCode: 0x0
No Operation, a very standard operation, Behaves the same as every other ISA.
EI OpCode: 0x1
Enable Interrupt, sets the Interrupt flag, allowing Interrupts to be triggered.
DI OpCode: 0x2
Disable Interrupt, clears the Interrupt flag, stopping Interrupts from being triggered.
INT OpCode: 0x3
INTerrupt, triggers an interrupt of 8-bit value specified.
IN OpCode: 0x4
IN, fetches data from Input Port specified and places it in register specified in second operand.
Second Operand:
DST HL PORT
OUT OpCode: 0x5
OUT, fetches data from register specified and sends it to Output Port.
Second Operand:
SRC HL PORT
JMP OpCode: 0x6
JuMP, jumps straight to address given or an offset address if Immediate is given.
CLL OpCode: 0x7
CaLL, pushes current value of IP to Stack and jumps straight to address given or an offset address if Immediate is given.
RET OpCode: 0x8
RETurn, pops IP from Stack and jumps back to that address.
HLT OpCode: 0x9
HaLT, stops CPU execution. Currently there is no resume function in the Emulator, but this is intended to be done via an Interrupt.
RST OpCode: 0xA
ReSeT, sets IP back to 0x0.
Clone this wiki locally