16 lines
300 B
Go
16 lines
300 B
Go
package register
|
|
|
|
import (
|
|
"git.akyoto.dev/cli/q/src/asm"
|
|
"git.akyoto.dev/cli/q/src/cpu"
|
|
)
|
|
|
|
func (f *Machine) MemoryRegister(mnemonic asm.Mnemonic, a asm.Memory, b cpu.Register) {
|
|
f.Assembler.MemoryRegister(mnemonic, a, b)
|
|
|
|
if mnemonic == asm.LOAD {
|
|
f.UseRegister(b)
|
|
}
|
|
|
|
f.postInstruction()
|
|
}
|