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

Method ResolveSymbol

asm/assembler.go:33–40  ·  view source on GitHub ↗
(symbol SYMBOL)

Source from the content-addressed store, hash-verified

31}
32
33func (a *Assembler) ResolveSymbol(symbol SYMBOL) (uint16, error) {
34 if v, ok := a.symbols[symbol.Name]; !ok {
35 fmt.Println(a.symbols)
36 return 0x0000, fmt.Errorf("Cannot find symbol: %s in symbol map", symbol.Name)
37 } else {
38 return v, nil
39 }
40}
41
42func (a *Assembler) Process(codeStartOffset uint16, instructions []Instruction) ([]uint16, error) {
43 a.labels = make(map[string]uint16)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected