Added assembler merging
This commit is contained in:
parent
b6be9357bf
commit
5c12992fca
6 changed files with 122 additions and 63 deletions
|
@ -62,6 +62,11 @@ func (a *Assembler) Finalize(verbose bool) ([]byte, []byte) {
|
|||
return code, data
|
||||
}
|
||||
|
||||
// Merge combines the contents of this assembler with another one.
|
||||
func (a *Assembler) Merge(b *Assembler) {
|
||||
a.Instructions = append(a.Instructions, b.Instructions...)
|
||||
}
|
||||
|
||||
// MoveRegisterData moves a data section address into the given register.
|
||||
func (a *Assembler) MoveRegisterData(reg register.ID, data []byte) {
|
||||
a.Instructions = append(a.Instructions, Instruction{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue