Refactored code structure
This commit is contained in:
parent
9e52e2dd1c
commit
fd6e874b44
54 changed files with 583 additions and 450 deletions
|
@ -44,6 +44,16 @@ func (a *Assembler) Label(name string) {
|
|||
})
|
||||
}
|
||||
|
||||
// Comment adds a comment at the current position.
|
||||
func (a *Assembler) Comment(text string) {
|
||||
a.Instructions = append(a.Instructions, Instruction{
|
||||
Mnemonic: COMMENT,
|
||||
Data: &Label{
|
||||
Name: text,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
// Call calls a function whose position is identified by a label.
|
||||
func (a *Assembler) Call(name string) {
|
||||
a.Instructions = append(a.Instructions, Instruction{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue