-
Notifications
You must be signed in to change notification settings - Fork 0
Group 0 Instructions (OpG 0x0)
Infinity edited this page Jun 25, 2023
·
3 revisions
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.
NOP
OpCode: 0x0No Operation, a very standard operation, Behaves the same as every other ISA.
EI
OpCode: 0x1Enable Interrupt, sets the Interrupt flag, allowing Interrupts to be triggered.
DI
OpCode: 0x2Disable Interrupt, clears the Interrupt flag, stopping Interrupts from being triggered.
INT
OpCode: 0x3INTerrupt, triggers an interrupt of 8-bit value specified.
IN
OpCode: 0x4IN, fetches data from Input Port specified and places it in register specified in second operand.
Second Operand:
DST | HL | PORT |
OUT
OpCode: 0x5OUT, fetches data from register specified and sends it to Output Port.
Second Operand:
SRC | HL | PORT |
JMP
OpCode: 0x6JuMP, jumps straight to address given or an offset address if Immediate is given.
CLL
OpCode: 0x7CaLL, pushes current value of IP to Stack and jumps straight to address given or an offset address if Immediate is given.
RET
OpCode: 0x8RETurn, pops IP from Stack and jumps back to that address.
HLT
OpCode: 0x9HaLT, stops CPU execution. Currently there is no resume function in the Emulator, but this is intended to be done via an Interrupt.
RST
OpCode: 0xAReSeT, sets IP back to 0x0.