Reordered counters
This commit is contained in:
parent
1bf288b8fd
commit
c925fe69b3
4 changed files with 11 additions and 8 deletions
|
@ -38,11 +38,11 @@ func (f *Function) TokenToRegister(t token.Token, register cpu.Register) error {
|
|||
return nil
|
||||
|
||||
case token.String:
|
||||
value := t.Text()[1 : len(t.Bytes)-1]
|
||||
f.count.data++
|
||||
label := fmt.Sprintf("%s_data_%d", f.Name, f.count.data)
|
||||
value := t.Text()[1 : len(t.Bytes)-1]
|
||||
f.assembler.Data[label] = []byte(value)
|
||||
f.RegisterLabel(asm.MOVE, register, label)
|
||||
f.count.data++
|
||||
return nil
|
||||
|
||||
default:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue