anchor.diff:        // scan for it in B
         for (jj <= 0; jj < fr.args.bLen; jj <= jj + 1)
   	 seq
  -	    strB.request.put(BRAMRequest{write: False, responseOnWrite: False, address: bstart + jj, datain: ?});
  +	    strB.request.put(BRAMRequest{write: False, responseOnWrite: False, address: fr.args.bStart + jj, datain: ?});
   	    action
   	       let tmp <- strB.response.get();
   	       bData <= tmp;
   	    endaction
   	    if (aData == bData)
   	       seq
  -		  matL.request.put(BRAMRequest{write: True, responseOnWrite: False, address: outcounter, datain: aData});
  +		  matL.request.put(BRAMRequest{write: True, responseOnWrite: False, address: outcounter, datain: zeroExtend(aData)});
   		  outcounter <= outcounter + 1;
   		  break;
   	       endseq
   	 endseq
  -      fr.nextpc(HCSComplete);
  +      fr.doreturn();
      endseq;
   
      FSM hC2fsm <- mkFSM(hirschC2Stmt);
  
positive.code: 	 endseq
        
        fr.docall(HCS1, HCS5, CArgs {aStart: fr.args.aStart, aLen: fr.vars.midi, bStart: fr.args.bStart, bLen: fr.vars.maxj}, fr.vars);
     endseq
  
     FSM hc4fsm <- mkFSM(hirschC4Stmt);
     
     rule hc3 (fr.pc == HCS3 && chirschB0.done() && chirschB1.done);
        hc4fsm.start();
        fr.nextPC(HCS4);
     endrule
     
     rule hc5 (fr.pc == HCS5);
        fr.docall(HCS1, HCS6, CArgs{aStart: fr.args.aStart + fr.vars.midi, aLen: fr.args.aLen - fr.vars.midi, bStart: fr.args.bStart + fr.vars.maxj, bLen: fr.args.bLen - fr.vars.maxj}, fr.vars);
     endrule
     
     rule hc6 (fr.pc == HCS6);
        fr.doreturn();
     endrule
     
     method Action setupA(Bit#(7) start, Bit#(7) length);
        aStartReg <= start;
        aLenReg <= length;
     endmethod
     
     method Action setupB(Bit#(7) start, Bit#(7) length);
        bStartReg <= start;
        bLenReg <= length;
     endmethod
  
negative.code: import StmtFSM::*;
  import BRAM::*;
  import MCSAlgorithm::*;
  import StackReg::*;
  
  /* frame arguments */
  typedef struct {
  