Added label type
This commit is contained in:
parent
f4b0020c49
commit
14a867bc8b
32 changed files with 102 additions and 63 deletions
|
@ -1,9 +1,11 @@
|
|||
package core
|
||||
|
||||
import "git.urbach.dev/cli/q/src/asm"
|
||||
|
||||
// AddBytes adds a sequence of bytes and returns its address as a label.
|
||||
func (f *Function) AddBytes(value []byte) string {
|
||||
func (f *Function) AddBytes(value []byte) asm.Label {
|
||||
f.count.data++
|
||||
label := f.CreateLabel("data", f.count.data)
|
||||
f.Assembler.SetData(label, value)
|
||||
label := f.CreateLabel("data", f.count.data, asm.DataLabel)
|
||||
f.Assembler.SetData(label.Name, value)
|
||||
return label
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue