Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/djhworld/simple-computer
/ types & classes
Types & classes
92 in github.com/djhworld/simple-computer
⨍
Functions
604
◇
Types & classes
92
↓ 2 callers
TypeAlias
IO_MODE
asm/instructions.go:14
↓ 1 callers
TypeAlias
REGISTER
asm/instructions.go:13
Struct
ADD
ADDS ---------------------- 0x0080 = ADD R0, R0 0x0081 = ADD R0, R1 0x0082 = ADD R0, R2 0x0083 = ADD R0, R3 0x0084 = ADD R1, R0 0x0085 = ADD R1, R1 0x
asm/instructions.go:572
Struct
ALU
alu/alu.go:23
Struct
AND
ANDS ---------------------- 0x00C0 = AND R0, R0 0x00C1 = AND R0, R1 0x00C2 = AND R0, R2 0x00C3 = AND R0, R3 0x00C4 = AND R1, R0 0x00C5 = AND R1, R1 0x
asm/instructions.go:424
Struct
ANDGate
circuit/gates.go:21
Struct
ANDGate3
components/big_gates.go:281
Struct
ANDGate4
components/big_gates.go:210
Struct
ANDGate5
components/big_gates.go:248
Struct
ANDGate8
components/big_gates.go:168
Struct
ANDer
components/components.go:244
Struct
Add2
components/adder.go:61
Struct
Adder
components/adder.go:8
Struct
Assembler
asm/assembler.go:20
Struct
Bit
components/storage.go:8
Struct
Bus
components/bus.go:5
Struct
BusOne
components/components.go:492
Struct
CALL
PSUEDO INSTRUCTIONS - these are composite instructions that may map to multiple opcodes
asm/instructions.go:628
Struct
CLF
CLF (CLEAR FLAGS) ---------------------- 0x0060 CLF
asm/instructions.go:484
Struct
CMP
CMP ---------------------- 0x00F0 = CMP R0, R0 0x00F1 = CMP R0, R1 0x00F2 = CMP R0, R2 0x00F3 = CMP R0, R3 0x00F4 = CMP R1, R0 0x00F5 = CMP R1, R1 0x0
asm/instructions.go:463
Struct
CPU
cpu/cpu.go:298
Struct
Cell
memory/memory.go:11
Struct
Comparator
components/components.go:429
Struct
Compare2
components/components.go:364
Interface
Component
components/components.go:9
Struct
DATA
DATA put value in memory into register (2 byte instruction) ---------------------- 0x0020 = DATA R0 0x0021 = DATA R1 0x0022 = DATA R2 0x0023 = DATA R3
asm/instructions.go:41
Struct
DEFLABEL
PLACEHOLDER INSTRUCTIONS - these are used by the assembler
asm/instructions.go:591
Struct
DEFSYMBOL
asm/instructions.go:608
Struct
Decoder2x4
components/decoders.go:7
Struct
Decoder3x8
components/decoders.go:51
Struct
Decoder4x16
components/decoders.go:114
Struct
Decoder8x256
Decoder is constructed from 16 4x16 decoders https://www.quora.com/How-can-I-construct-a-8X256-decoder-using-4X16-decoders-only
components/decoders.go:182
Struct
DisplayAdapter
[cpu] -------> display adapter --------> display RAM <--------- screen control ---------> [screenChannel] write write
io/display.go:14
Struct
DumbPeripheral
Dumb peripheral that just contains a register In 'ENABLE' state: emits the values 0x00DA for data mode, and 0x00AD for address mode In SET state: sets
cpu/cpu_test.go:1018
Struct
DummyComponent
components/components_test.go:11
Interface
Enableable
cpu/cpu.go:267
Struct
Enabler
components/components.go:15
Struct
GlfwIO
GlfwIO is for running the system using GLFW. libglfw3 will be required on the system
cmd/simulator/glfw_io.go:14
Struct
IN
IN ---------------------- 0x0070 = IN Data, R0 0x0071 = IN Data, R1 0x0072 = IN Data, R2 0x0073 = IN Data, R3 0x0074 = IN Addr, R0 0x0075 = IN Addr, R
asm/instructions.go:300
Struct
IOBus
components/iobus.go:14
Interface
Instruction
asm/instructions.go:28
Struct
InstructionDecoder3x8
cpu/cpu.go:281
Struct
Instructions
Instructions - useful list data structure for convienience
asm/instructions.go:664
Struct
IsZero
components/components.go:155
Struct
JMP
asm/instructions.go:534
Struct
JMPF
asm/instructions.go:500
Struct
JR
JR set instruction address register to value in register ---------------------- 0x0030 = JR R0 0x0031 = JR R1 0x0032 = JR R2 0x0033 = JR R3
asm/instructions.go:130
Struct
KeyPress
io/keyboard.go:12
Struct
Keyboard
io/keyboard.go:123
Struct
KeyboardAdapter
[cpu] <-------------> keyboard adapter <----------- keyboard <----------- [keyPressChannel] read/write write no
io/keyboard.go:19
Struct
LABEL
asm/markers.go:9
Struct
LOAD
LOADS ---------------------- arg A = memory address to load from arg B = register to store value in 0x0000 = LD R0, R0 0x0001 = LD R0, R1 0x0002 = LD
asm/instructions.go:235
FuncType
LabelResolver
func(LABEL) (uint16, error)
asm/instructions.go:10
Struct
LeftShifter
TODO not sure if this is exactly how this should look...
components/components.go:57
Struct
Memory64K
memory/memory.go:44
Struct
NANDGate
circuit/gates.go:3
Struct
NORGate
circuit/gates.go:93
Struct
NOT
NOT ---------------------- 0x00B0 = NOT R0 0x00B5 = NOT R1 0x00BA = NOT R2 0x00BF = NOT R3
asm/instructions.go:153
Struct
NOTGate
circuit/gates.go:39
Struct
NOTer
components/components.go:208
Struct
NUMBER
asm/markers.go:31
Struct
OR
ORS ---------------------- 0x00D0 = OR R0, R0 0x00D1 = OR R0, R1 0x00D2 = OR R0, R2 0x00D3 = OR R0, R3 0x00D4 = OR R1, R0 0x00D5 = OR R1, R1 0x00D6 =
asm/instructions.go:385
Struct
ORGate
circuit/gates.go:57
Struct
ORGate3
components/big_gates.go:5
Struct
ORGate4
components/big_gates.go:39
Struct
ORGate5
components/big_gates.go:77
Struct
ORGate6
components/big_gates.go:120
Struct
ORer
components/components.go:284
Struct
OUT
OUT ---------------------- 0x0078 = OUT Data, R0 0x0079 = OUT Data, R1 0x007A = OUT Data, R2 0x007B = OUT Data, R3 0x007C = OUT Addr, R0 0x007D = OUT
asm/instructions.go:264
Struct
Parser
asm/parser.go:29
Interface
Peripheral
io/peripheral.go:7
Struct
PrintStateConfig
computer/computer.go:17
Struct
Register
components/register.go:11
Struct
RightShifter
components/components.go:106
Struct
SHL
SHL ---------------------- 0x00A0 = SHL R0 0x00A5 = SHL R1 0x00AA = SHL R2 0x00AF = SHL R3
asm/instructions.go:83
Struct
SHR
SHR ---------------------- 0x0090 = SHL R0 0x0095 = SHL R1 0x009A = SHL R2 0x009F = SHL R3
asm/instructions.go:106
Struct
STORE
STORES ---------------------- arg A = memory address for value arg B = value to store in memory 0x0010 = ST R0, R0 0x0011 = ST R0, R1 0x0012 = ST R0,
asm/instructions.go:194
Struct
SYMBOL
asm/markers.go:20
Struct
ScreenControl
io/display.go:155
Interface
Settable
cpu/cpu.go:272
Struct
SimpleComputer
computer/computer.go:22
Struct
Stepper
components/stepper.go:9
FuncType
SymbolResolver
func(SYMBOL) (uint16, error)
asm/instructions.go:11
Interface
Updatable
cpu/cpu.go:277
Struct
Wire
circuit/wires.go:3
Struct
Word
components/storage.go:43
Struct
XOR
XORS ---------------------- 0x00E0 = XOR R0, R0 0x00E1 = XOR R0, R1 0x00E2 = XOR R0, R2 0x00E3 = XOR R0, R3 0x00E4 = XOR R1, R0 0x00E5 = XOR R1, R1 0x
asm/instructions.go:346
Struct
XORGate
circuit/gates.go:75
Struct
XORer
components/components.go:324
Struct
displayRAM
Display RAM is special as the writes (inputs) and reads (outputs) are two separate units that operate independently.
io/display_ram.go:11
Struct
glfwDisplay
cmd/simulator/glfw_io.go:79
Interface
marker
asm/markers.go:5