diff --git a/src/build/core/CompileAssign.go b/src/build/core/CompileAssign.go index fd48f87..489b28e 100644 --- a/src/build/core/CompileAssign.go +++ b/src/build/core/CompileAssign.go @@ -50,7 +50,7 @@ func (f *Function) CompileAssign(node *ast.Assign) error { return err } - f.Assembler.MemoryNumber(asm.STORE, asm.Memory{Base: variable.Register, Offset: byte(offset), Length: 1}, num) + f.MemoryNumber(asm.STORE, asm.Memory{Base: variable.Register, Offset: byte(offset), Length: 1}, num) return nil } diff --git a/src/build/core/Instructions.go b/src/build/core/Instructions.go index 9bdf8fa..44e8116 100644 --- a/src/build/core/Instructions.go +++ b/src/build/core/Instructions.go @@ -29,6 +29,11 @@ func (f *Function) Jump(mnemonic asm.Mnemonic, label string) { f.postInstruction() } +func (f *Function) MemoryNumber(mnemonic asm.Mnemonic, a asm.Memory, b int) { + f.Assembler.MemoryNumber(mnemonic, a, b) + f.postInstruction() +} + func (f *Function) Register(mnemonic asm.Mnemonic, a cpu.Register) { f.Assembler.Register(mnemonic, a)