MCPcopy Create free account
hub / github.com/djhworld/simple-computer / String

Method String

asm/instructions.go:67–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

65}
66
67func (d DATA) String() string {
68 if v, ok := d.Data.(NUMBER); ok {
69 return fmt.Sprintf("DATA R%d, %s", d.ToRegister, utils.ValueToString(v.Value))
70 } else if v, ok := d.Data.(SYMBOL); ok {
71 return fmt.Sprintf("DATA R%d, %s", d.ToRegister, v.String())
72 }
73
74 return fmt.Sprintf("DATA R%d, %v", d.ToRegister, d.Data)
75}
76
77// SHL
78// ----------------------

Callers

nothing calls this directly

Calls 2

ValueToStringFunction · 0.92
StringMethod · 0.65

Tested by

no test coverage detected