MCPcopy Index your code
hub / github.com/djhworld/simple-computer / putValueInRAM

Method putValueInRAM

computer/computer.go:77–91  ·  view source on GitHub ↗
(address, value uint16)

Source from the content-addressed store, hash-verified

75}
76
77func (c *SimpleComputer) putValueInRAM(address, value uint16) {
78 c.memory.AddressRegister.Set()
79 c.mainBus.SetValue(address)
80 c.memory.Update()
81
82 c.memory.AddressRegister.Unset()
83 c.memory.Update()
84
85 c.mainBus.SetValue(value)
86 c.memory.Set()
87 c.memory.Update()
88
89 c.memory.Unset()
90 c.memory.Update()
91}
92
93func (c *SimpleComputer) Run(tickInterval <-chan time.Time, printStateConfig PrintStateConfig) {
94 log.Println("Starting computer....")

Callers 2

loadToRAMMethod · 0.95
RunMethod · 0.95

Calls 4

SetValueMethod · 0.80
SetMethod · 0.65
UpdateMethod · 0.65
UnsetMethod · 0.65

Tested by

no test coverage detected