Reordered counters

This commit is contained in:
Eduard Urbach 2024-07-16 11:44:10 +02:00
parent 1bf288b8fd
commit c925fe69b3
Signed by: eduard
GPG key ID: 49226B848C78F6C8
4 changed files with 11 additions and 8 deletions

View file

@ -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: