Assembler Class

Definition

Line 40 of cmsxa/Assembler.cm

Inheritance

Constructors & Destructor

public Assembler(const String<char>& objectFileName)

Member Functions

private void AlignAt()
public void Assemble(List<UniquePtr<Instruction>>& instructions)
public void EmitAbsoluteRegisterValue(const Value& registerNumber, const String<char>& paramName, Symbol* symbol)
public void EmitForwardLongJump(Symbol* symbol)
public void EmitForwardShortJump(const String<char>& paramName, byte opCode, const Value& registerNumber, Symbol* symbol)
public void EmitLinkClsIdCommand(const Uuid& typeId)
public void EmitLongOffset(uint offset)
public void EmitOpCode(byte opCode)
public void EmitPureByteValue(const String<char>& paramName, const Value& v)
public void EmitRegisterValue(const String<char>& paramName, const Value& v)
public void EmitSetReg255Value(ulong value)
public void EmitShortOffset(ushort offset)
public Value Evaluate(Node* node)
private void ProcessValue(ulong value, const Span& span)
public override void Visit(At&)
public override void Visit(BinaryExpression& expr)
public override void Visit(CharacterConstant& cc)
public override void Visit(ClsIdConstant& clsIdConstant)
public override void Visit(DecimalConstant& dc)
public override void Visit(HexConstant& hc)
public override void Visit(Instruction& inst)
public override void Visit(OpCode& opCode)
public override void Visit(OperandList& operandList)
public override void Visit(ParenthesizedExpression& expr)
public override void Visit(StringConstant& sc)
public override void Visit(SymbolNode& node)
public override void Visit(UnaryExpression& expr)
public void WriteObjectFile()

Member Variables

private byte currentAlignment
public Symbol* currentFunctionSymbol
private Instruction* currentInstruction
public Section* currentSection
public Segment currentSegment
public Symbol* currentStructureSymbol
public Symbol* currentSymbol
public Value currentValue
private int externalLinkCommandOffset
public bool inSpec
public ObjectFile objectFile
private int parentSymbolIndex
public Stack<bool> specStack
public Stage stage
public String<char> str

Constructor& Destructor Details

Assembler Constructor

public Assembler(const String<char>& objectFileName)

Definition
Line 42 of cmsxa/Assembler.cm


Member Function Details

AlignAt Member Function

private void AlignAt()

Definition
Line 1126 of cmsxa/Assembler.cm


Assemble Member Function

public void Assemble(List<UniquePtr<Instruction>>& instructions)

Definition
Line 47 of cmsxa/Assembler.cm


EmitAbsoluteRegisterValue Member Function

public void EmitAbsoluteRegisterValue(const Value& registerNumber, const String<char>& paramName, Symbol* symbol)

Definition
Line 192 of cmsxa/Assembler.cm


EmitForwardLongJump Member Function

public void EmitForwardLongJump(Symbol* symbol)

Definition
Line 232 of cmsxa/Assembler.cm


EmitForwardShortJump Member Function

public void EmitForwardShortJump(const String<char>& paramName, byte opCode, const Value& registerNumber, Symbol* symbol)

Definition
Line 245 of cmsxa/Assembler.cm


EmitLinkClsIdCommand Member Function

public void EmitLinkClsIdCommand(const Uuid& typeId)

Definition
Line 275 of cmsxa/Assembler.cm


EmitLongOffset Member Function

public void EmitLongOffset(uint offset)

Definition
Line 284 of cmsxa/Assembler.cm


EmitOpCode Member Function

public void EmitOpCode(byte opCode)

Definition
Line 80 of cmsxa/Assembler.cm


EmitPureByteValue Member Function

public void EmitPureByteValue(const String<char>& paramName, const Value& v)

Definition
Line 106 of cmsxa/Assembler.cm


EmitRegisterValue Member Function

public void EmitRegisterValue(const String<char>& paramName, const Value& v)

Definition
Line 88 of cmsxa/Assembler.cm


EmitSetReg255Value Member Function

public void EmitSetReg255Value(ulong value)

Definition
Line 124 of cmsxa/Assembler.cm


EmitShortOffset Member Function

public void EmitShortOffset(ushort offset)

Definition
Line 288 of cmsxa/Assembler.cm


Evaluate Member Function

public Value Evaluate(Node* node)

Definition
Line 71 of cmsxa/Assembler.cm


ProcessValue Member Function

private void ProcessValue(ulong value, const Span& span)

Definition
Line 659 of cmsxa/Assembler.cm


Visit Member Function

public override void Visit(At&)

Definition
Line 809 of cmsxa/Assembler.cm


Visit Member Function

public override void Visit(BinaryExpression& expr)

Definition
Line 897 of cmsxa/Assembler.cm


Visit Member Function

public override void Visit(CharacterConstant& cc)

Definition
Line 747 of cmsxa/Assembler.cm


Visit Member Function

public override void Visit(ClsIdConstant& clsIdConstant)

Definition
Line 442 of cmsxa/Assembler.cm


Visit Member Function

public override void Visit(DecimalConstant& dc)

Definition
Line 739 of cmsxa/Assembler.cm


Visit Member Function

public override void Visit(HexConstant& hc)

Definition
Line 743 of cmsxa/Assembler.cm


Visit Member Function

public override void Visit(Instruction& inst)

Definition
Line 292 of cmsxa/Assembler.cm


Visit Member Function

public override void Visit(OpCode& opCode)

Definition
Line 447 of cmsxa/Assembler.cm


Visit Member Function

public override void Visit(OperandList& operandList)

Definition
Line 832 of cmsxa/Assembler.cm


Visit Member Function

public override void Visit(ParenthesizedExpression& expr)

Definition
Line 1117 of cmsxa/Assembler.cm


Visit Member Function

public override void Visit(StringConstant& sc)

Definition
Line 813 of cmsxa/Assembler.cm


Visit Member Function

public override void Visit(SymbolNode& node)

Definition
Line 460 of cmsxa/Assembler.cm


Visit Member Function

public override void Visit(UnaryExpression& expr)

Definition
Line 840 of cmsxa/Assembler.cm


WriteObjectFile Member Function

public void WriteObjectFile()

Definition
Line 67 of cmsxa/Assembler.cm