/// <summary> /// HLT /// </summary> /// <param name="context"></param> /// <returns></returns> public override Result VisitLOAD(LowLevelAssemblyParser.LOADContext context) { string sourceRegister = context.register_8bit().GetText(); string opcode = "10010"; opcode += GetRegisterOpCode_GeneralPurpose(sourceRegister); opcode += " ; LOAD " + sourceRegister; assembly.Add(opcode); return(base.VisitLOAD(context)); }
/// <summary> /// Visit a parse tree produced by <see cref="LowLevelAssemblyParser.LOAD"/>. /// <para> /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/> /// on <paramref name="context"/>. /// </para> /// </summary> /// <param name="context">The parse tree.</param> /// <return>The visitor result.</return> public virtual Result VisitLOAD([NotNull] LowLevelAssemblyParser.LOADContext context) { return(VisitChildren(context)); }