C# Class Organic.Assembler

Show file Open project: SirCmpwn/organic Class Usage Examples

Public Properties

Property Type Description
FileNames Stack
ForceLongLiterals bool
IfStack Stack
IncludePath string
LabelValues List
LineNumbers Stack
Macros List
NonBasicOpcodeTable byte>.Dictionary
OpcodeTable byte>.Dictionary
PriorGlobalLabel string
ReferencedValues List
RelativeLabels ushort>.Dictionary
ValueTable byte>.Dictionary
Values ushort>.Dictionary
WorkingDirectories Stack
currentAddress ushort
noList bool

Private Properties

Property Type Description
CreateJson string
DisplayHelp void
DisplaySplash void
EvaluateAssembly List
GetDirectory string
GetRootNumber int
ListPlugins void
LoadTable void
LongHex string
Main int
MatchString StringMatch
ParseDirectives void

Public Methods

Method Description
Assemble ( string code ) : List

Assembles the provided code. This will use the current directory to fetch include files and such.

Assemble ( string code, string FileName ) : List

Assembles the provided code. This will use the current directory to fetch include files and such.

Assembler ( ) : System

Initializes all values for this assembler. Assembler is designed to handle one assembly per instance. If you intend to assemble several times, create new instances of this class each time.

CreateListing ( List output ) : string
DumpArray ( ushort array ) : string

Creates a string of an array's content

Private Methods

Method Description
CreateJson ( List output ) : string
DisplayHelp ( ) : void
DisplaySplash ( ) : void
EvaluateAssembly ( List output ) : List
GetDirectory ( string filePath ) : string
GetRootNumber ( Stack LineNumbers ) : int
ListPlugins ( Assembler assembler ) : void
LoadTable ( ) : void
LongHex ( ushort p ) : string
Main ( string args ) : int
MatchString ( string value, byte>.Dictionary keys ) : StringMatch
ParseDirectives ( List output, string line ) : void

Method Details

Assemble() public method

Assembles the provided code. This will use the current directory to fetch include files and such.
public Assemble ( string code ) : List
code string
return List

Assemble() public method

Assembles the provided code. This will use the current directory to fetch include files and such.
public Assemble ( string code, string FileName ) : List
code string
FileName string
return List

Assembler() public method

Initializes all values for this assembler. Assembler is designed to handle one assembly per instance. If you intend to assemble several times, create new instances of this class each time.
public Assembler ( ) : System
return System

CreateListing() public static method

public static CreateListing ( List output ) : string
output List
return string

DumpArray() public static method

Creates a string of an array's content
public static DumpArray ( ushort array ) : string
array ushort
return string

Property Details

FileNames public property

public Stack FileNames
return Stack

ForceLongLiterals public property

public bool ForceLongLiterals
return bool

IfStack public property

public Stack IfStack
return Stack

IncludePath public property

Path to search for include files in.
public string IncludePath
return string

LabelValues public property

public List LabelValues
return List

LineNumbers public property

public Stack LineNumbers
return Stack

Macros public property

public List Macros
return List

NonBasicOpcodeTable public property

public Dictionary NonBasicOpcodeTable
return byte>.Dictionary

OpcodeTable public property

public Dictionary OpcodeTable
return byte>.Dictionary

PriorGlobalLabel public property

public string PriorGlobalLabel
return string

ReferencedValues public property

public List ReferencedValues
return List

RelativeLabels public property

public Dictionary RelativeLabels
return ushort>.Dictionary

ValueTable public property

public Dictionary ValueTable
return byte>.Dictionary

Values public property

Values (such as labels and equates) found in the code
public Dictionary Values
return ushort>.Dictionary

WorkingDirectories public property

public Stack WorkingDirectories
return Stack

currentAddress public property

public ushort currentAddress
return ushort

noList public property

public bool noList
return bool