examples: add sum example (its not pretty)

This commit is contained in:
Michael McLoughlin
2018-12-11 23:02:50 -08:00
parent 19d1761694
commit 2189d38d1e
6 changed files with 71 additions and 4 deletions

View File

@@ -65,7 +65,7 @@ func (m Mem) Asm() string {
type Imm uint64
func (i Imm) Asm() string {
return fmt.Sprintf("%#x", i)
return fmt.Sprintf("$%#x", i)
}
// Rel is an offset relative to the instruction pointer.