Fixed verbose output

This commit is contained in:
Eduard Urbach 2024-07-20 17:46:40 +02:00
parent 155df7c44c
commit 263c0cfb8b
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0
2 changed files with 6 additions and 1 deletions

View File

@ -50,7 +50,7 @@ func (f *Function) CompileAssign(node *ast.Assign) error {
return err 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 return nil
} }

View File

@ -29,6 +29,11 @@ func (f *Function) Jump(mnemonic asm.Mnemonic, label string) {
f.postInstruction() 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) { func (f *Function) Register(mnemonic asm.Mnemonic, a cpu.Register) {
f.Assembler.Register(mnemonic, a) f.Assembler.Register(mnemonic, a)