public Condition NotEquals(U8 v) { if (v != 0 || Flags.Zero.LastReg != this) { CPU6502.CPY(v); } return(Condition.NotEqualsZero); }
public static void Init() { //Copy funcs to those RAM chunks Y.Set(0); Loop.Do_old(_ => { AddrWriteVerify[Y].Set(A.Set(LabelFor(_WriteVerify)[Y])); Y.Increment(); CPU6502.CPY(_lenTotalRamLength); }).While(() => Y.NotEquals(0)); }
/// <summary> /// /// </summary> /// <param name="start">Inclusive</param> /// <param name="length">Exclusive</param> /// <param name="block"></param> public static void Repeat(IndexingRegister reg, int length, Action <LoopLabels> block) { var labels = new LoopLabels(); //X.Reset(); var lblStart = Labels.New(); Context.Write(lblStart); Context.New(() => { var before = reg.State.Hash; block.Invoke(labels); reg.State.Verify(before); Context.Write(labels.ContinueLabel); reg.Inc(); if (Context.StartBranchable) { if (length < 256) { if (reg is RegisterX) { CPU6502.CPX((U8)length); } else { CPU6502.CPY((U8)length); } } CPU6502.BNE(Context.Start); } else { //TODO: verify this works! if (length < 256) { if (reg is RegisterX) { CPU6502.CPX((U8)length); } else { CPU6502.CPY((U8)length); } } CPU6502.BEQ(3); GoTo(lblStart); } }); Context.Write(labels.BreakLabel); }
public Condition LessThan(IOperand o) { CPU6502.CPY(o); return(Condition.IsLessThan); }
public Condition NotEquals(IOperand addr) { CPU6502.CPY(addr); return(Condition.NotEqualsZero); }