q/src/build/asm/Mnemonic.go

47 lines
471 B
Go

package asm
type Mnemonic uint8
const (
NONE Mnemonic = iota
ADD
CALL
JUMP
LABEL
MOVE
RETURN
SUB
SYSCALL
)
// String returns a human readable version.
func (m Mnemonic) String() string {
switch m {
case ADD:
return "add"
case CALL:
return "call"
case JUMP:
return "jump"
case LABEL:
return "label"
case MOVE:
return "move"
case RETURN:
return "return"
case SUB:
return "sub"
case SYSCALL:
return "syscall"
}
return "NONE"
}