19 lines
347 B
Go
Raw Normal View History

2024-06-10 13:51:39 +00:00
package asm
2024-06-15 09:36:57 +00:00
import (
"fmt"
"git.akyoto.dev/cli/q/src/build/cpu"
)
2024-06-10 13:51:39 +00:00
// RegisterNumber operates with a register and a number.
type RegisterNumber struct {
2024-06-18 14:42:56 +00:00
Register cpu.Register
2024-06-24 14:55:15 +00:00
Number int
2024-06-10 13:51:39 +00:00
}
2024-06-15 09:36:57 +00:00
// String returns a human readable version.
func (data *RegisterNumber) String() string {
2024-06-26 20:51:14 +00:00
return fmt.Sprintf("%s, %d", data.Register, data.Number)
2024-06-15 09:36:57 +00:00
}