q/src/asm/pointer.go

15 lines
394 B
Go

package asm
// Address represents a memory address.
type Address = int32
// pointer stores a relative memory address that we can later turn into an absolute one.
// Position: The machine code offset where the address was inserted.
// Resolve: The function that will return the final address.
type pointer struct {
Resolve func() Address
Position Address
OpSize uint8
Size uint8
}