Added build result struct

This commit is contained in:
Eduard Urbach 2024-06-26 20:16:18 +02:00
parent 2676ac1ebb
commit 03a7651cad
Signed by: eduard
GPG key ID: 49226B848C78F6C8
7 changed files with 61 additions and 54 deletions

View file

@ -11,13 +11,6 @@ type Assembler struct {
Instructions []Instruction
}
// New creates a new assembler.
func New() *Assembler {
return &Assembler{
Instructions: make([]Instruction, 0, 8),
}
}
// Finalize generates the final machine code.
func (a *Assembler) Finalize() ([]byte, []byte) {
code := make([]byte, 0, len(a.Instructions)*8)