asm

package
v0.0.0-...-e040fd4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2015 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package asm holds code shared among the assemblers.

Index

Constants

View Source
const (
	MAXALIGN = 7
	FPCHIP   = 1
	NSYMB    = 500
	BUFSIZ   = 8192
	HISTSZ   = 20
	EOF      = -1
	IGN      = -2
	NHASH    = 503
	NMACRO   = 10
)
View Source
const (
	CLAST = iota
	CMACARG
	CMACRO
	CPREPROC
)
View Source
const (
	NARG = 25
)
View Source
const (
	VARMAC = 0x80
)

Variables

View Source
var (
	LSCONST int
	LCONST  int
	LFCONST int
	LNAME   int
	LVAR    int
	LLAB    int

	Thechar     rune
	Thestring   string
	Thelinkarch *obj.LinkArch

	Arches map[string]*obj.LinkArch

	Cclean  func()
	Yyparse func()
	Syminit func(*Sym)

	Lexinit []Lextab
)

Initialized by client.

View Source
var (
	Dlist []string

	Lineno int32

	Pass int
	PC   int32

	Ctxt *obj.Link
)

Functions

func GETC

func GETC() int

func ISALPHA

func ISALPHA(c int) bool

func Main

func Main()

func Settext

func Settext(s *obj.LSym)

func Yyerror

func Yyerror(a string, args ...interface{})

func Yylex

func Yylex(yylval *Yylval) int

Types

type Io

type Io struct {
	Link *Io
	P    []byte
	F    *os.File
	B    [1024]byte
}

type Lextab

type Lextab struct {
	Name  string
	Type  int
	Value int64
}

type Macro

type Macro struct {
	Text string
	Narg int
	Dots bool
}

type Ref

type Ref struct {
	Class int
}

type Sym

type Sym struct {
	Link      *Sym
	Ref       *Ref
	Macro     *Macro
	Value     int64
	Type      int
	Name      string
	Labelname string
	Sym       int8
}

func LabelLookup

func LabelLookup(s *Sym) *Sym

func Lookup

func Lookup(symb string) *Sym

type Yylval

type Yylval struct {
	Sym  *Sym
	Lval int64
	Sval string
	Dval float64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL