From 263c0cfb8bf8a154de9498577e6c769b4d57d9c2 Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Sat, 20 Jul 2024 17:46:40 +0200 Subject: [PATCH] Fixed verbose output --- src/build/core/CompileAssign.go | 2 +- src/build/core/Instructions.go | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) 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)