every check mark is equivelant to a 4-bit value
every cross mark is equivelant to 0
Instruction | Name | A | B | C | Immediate | Description |
---|---|---|---|---|---|---|
0x00 | LOAD | REG | Loads REG[A] with IMM | |||
0x01 | ADD | REG | REG | REG | REG[C] = REG[A] + REG[B] (if IMM == 0 then replace REG[B] with IMM) | |
0x02 | SUB | REG | REG | REG | REG[C] = REG[A] - REG[B] (if IMM == 0 then replace REG[B] with IMM) | |
0x03 | MUL | REG | REG | REG | REG[C] = REG[A] * REG[B] (if IMM == 0 then replace REG[B] with IMM) | |
0x04 | DIV | REG | REG | REG | REG[C] = REG[A] / REG[B] (if IMM == 0 then replace REG[B] with IMM) | |
0x05 | AND | REG | REG | REG | REG[C] = REG[A] & REG[B] (if IMM == 0 then replace REG[B] with IMM) | |
0x06 | OR | REG | REG | REG | REG[C] = REG[A] | REG[B] (if IMM == 0 then replace REG[B] with IMM) | |
0x07 | XOR | REG | REG | REG | REG[C] = REG[A] ^ REG[B] (if IMM == 0 then replace REG[B] with IMM) | |
0x08 | NOT | REG | REG[A] = !REG[A] | |||
0x09 | SPLIT | REG | REG | VALUE | REG[B],REG[C] = REG[A] splitted (if IMM == 0: 8-bit split else 4-bit split) | |
0x0A | COMBINE | REG | REG | VALUE | REG[C] = REG[A] combined with REG[B] (if IMM == 0: 8-bit split else 4-bit split) | |
0x0B | JMP | REG | REG | InstrucionPointer = REG[A] combined with REG[B] (cuts eny value over 24-bit) | ||
0x0C | JMPI | InstrucionPointer = IMM | ||||
0x0D | CMP= | REG | REG | VALUE | if REG[A] == REG[B]: InstrucionPointer+=1(expected JMP) else InstrucionPointer+=2 (if C == 1 replace REG[B] with IMM) | |
0x0E | CMP< | REG | REG | VALUE | if REG[A] < REG[B]: InstrucionPointer+=1(expected JMP) else InstrucionPointer+=2 (if C == 1 replace REG[B] with IMM) | |
0x0F | CMP> | REG | REG | VALUE | if REG[A] > REG[B]: InstrucionPointer+=1(expected JMP) else InstrucionPointer+=2 (if C == 1 replace REG[B] with IMM) | |
0x10 | RAMPOS | RAMPointer = REG[A] combined with REG[B] | ||||
0x11 | RRAM | if B == 1 then index VRAM then RAM with RAMPointer | if C == 1 then IMM will replace RAMPointer | ||||
0x12 | WRAM | REG | VALUE | VALUE | if B == 1 then index VRAM then RAM with RAMPointer | if C == 1 then IMM will replace RAMPointer | |
0x13 | RSAV | REG[C] = SAV.data[REG[A]..REG[B]] | ||||
0x14 | IRSAV | REG[A] = SAV.data[IMM] | ||||
0x15 | WSAV | SAV.data[REG[A]..REG[B]] = REG[C] unless if IMM == 1 then push SAV to file(saving SAV data) | ||||
0x16 | IWSAV | SAV.data[IMM] = REG[A] | ||||
0x17 | RROM | REG[C] = ROM.data[REG[A]..REG[B]] | ||||
0x18 | IRROM | REG[A] = ROM.data[IMM] | ||||
0x19 | HALT | Halts index IMM located in [[System Specs]] | ||||
0x1A | Prints REG[A] in emulator terminal(for debugging ROMs only) | |||||
0x1B | FLAGS | REG | REG[A] = Flags[IMM] | |||
0x1C | DVCSEND | REG | Send message to device IMM[3], IMM[1-2] are for device Instruction and is sent with REG[A] | |||
0x1D | DVCRECV | REG | Send message to device IMM[3], IMM[1-2] are for device Instruction and is sent with REG[A] | |||
0x1E | ICOUT | REG | REG | REG[A],REG[B] = InstrucionPointer(32-bit for 24-bit) | ||
0x1F | COPY | REG | REG | REG[A] = REG[B] | ||
0x20 | EXECUTE | ExecuteLocation = IMM[6] and InstrucionPointer = IMM[0-5] (EL info located in [[System Specs]]) | ||||
0x21 | RBIOS | REG | REG | REG | REG[C] = BIOS.data[REG[A]..REG[B]] | |
0x22 | IRBIOS | REG | REG[A] = BIOS.data[IMM] | |||
0x23 | POP | REG | POPs from the stack to REG[A] (REG[A] = Stack[StackPointer..-1] and StackPointer-=2) | |||
0x24 | PUSH | REG | VALUE | PUSHs REG[A] into the stack (Stack[StackPointer..+1] = REG[A] and StackPointer+=2) (if B == 1 replace REG[A] with IMM) | ||
0x25 | CALL | Calling a function at IMM (InstructionPointer gets pushed into the stack) | ||||
0x26 | RET | Returning from a function (InstructionPointer goes back from poping stack) | ||||
0x27 | SWAPTOP | Swaps the top of stack... | ||||
0x28 | GetClock | REG | Value | if B == 0 then REG[A] = CPU.Clock else reset CPU.Clock | ||
0x29 | Delay | (DebugMode Only) if IMM > 0 then it'll wait IMM ms. else pause for input | ||||
0x2A | Name | Disc | ||||
0x2B | Name | Disc | ||||
0x2C | Name | Disc | ||||
0x2D | Name | Disc | ||||
0x2E | Name | Disc | ||||
0x2F | Name | Disc | ||||
0xFF | NOP | Does Nothing |