What is GISC
GISC (pronounced "Jee-isc") stands for General Instruction Set Computer and is a custom Instruction Set Architecture (ISA) designed from scratch.
GISC offers a unique instruction set with a rich control flow and a hybrid architecture between RISC and CISC.
Current GISC version
The current GISC version is: GISC-1.2
Features:
- 16-bit instruction format
- 5 general-purpose registers (including an accumulator)
- 256 bytes of memory
- Fully working hardware CPU built in logisim
- Python-based interpreter and assembler with GUI
- Rich control flow:
- - JMP, JZ, JP, JN
- - COM (compare + branch)
- - GOTO (counted loop instruction)
GISC Logisim hardware simulations
The following videos show real simulated footage of a GISC-1 CPU
Full CPU running at 1 Hz
Cropped footage of CPU running at 2 Hz
Plans for GISC-2 and the future of GISC
- Other - Real hardware implementation of a GISC cpu
- GISC-2 - 64 bit instructions
- GISC-2 - More registers
- GISC-? - Multiple GOTO tracking
GISC opcodes
As of GISC-1 these are the available GISC instructions:
- Load [opcode][register][literal value (2 hexadecimals)]
- ADD [opcode][emptyspace][register1][register2]
- SUB [opcode][emptyspace][minuend][subtrahend]
- MOV [opcode][emptyspace][destination][source]
- LOADM [opcode][emptyspace][register][memoryaddr]
- JMP [opcode][emptyspace][address(2 bytes)]
- JZ [opcode][register][address(2 bytes)]
- JP [opcode][register][address(2 bytes)]
- JN [opcode][register][address(2 bytes)]
- COM [opcode][address][register1][register2]
- GOTO [opcode][address (2 bytes)][times to loop]
- SAVEM [opcode][emptyspace][register][memoryaddr]
- HLT [opcode][emptyspace (3 bytes)]
- OUT [opcode][emptyspace][emptyspace][register]
Example GISC instruction usage
This example usage of GISC-1 instructions:
- 1309 - Load the value 9 into register 3
- 2001 - Add together the contents of register 0 (ACC) and register 1
- 3021 - Subtract the contents of register 1 from register 2
- 4040 - Move the contents of register 0 (ACC) to register 4
- 502c - Copy the contents of memory address 12 to register 2
- 6050 - Jump to ROM address 0x50
- 7360 - If register 3 == 0, jump to line 60 (hexadecimal, literal is 96)
- 8370 - If register 3 is positive, jump to line 70
- 9380 - If register 3 is negative, jump to line 80
- af32 - If register 3 = register 2 goto line 15 (f)
- b2a4 - GOTO line 2a, 4 times
- c0c3 - Save the contents of register 3 to memory address 12
- d*** - Halt all processes (*** = any number can go here)
- e**1 - Output the value in register 1 to the TTY in ASCII form
Try GISC
Write programs using the custom GISC instruction set and run them using the provided interpreter and hardware simulation.