當前位置: 首頁>>代碼示例>>C++>>正文


C++ Breakpoint::GetOperandFlags方法代碼示例

本文整理匯總了C++中Breakpoint::GetOperandFlags方法的典型用法代碼示例。如果您正苦於以下問題:C++ Breakpoint::GetOperandFlags方法的具體用法?C++ Breakpoint::GetOperandFlags怎麽用?C++ Breakpoint::GetOperandFlags使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Breakpoint的用法示例。


在下文中一共展示了Breakpoint::GetOperandFlags方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: if

bool Core65c02::Execute (unsigned int count)
{
  bool hit_breakpoint = false;
  Breakpoint * bp = 0;

  unbuild_P(P);

  while (count && !hit_breakpoint)
    {
      --count;

      /* check for interrupts */
      if (interrupt_flags)
	{
	  if ((I == 0) && (interrupt_flags & F_IRQ))
	    interrupt(IRQ_VECTOR, F_IRQ);
	  else if (interrupt_flags & F_NMI)
	    interrupt(NMI_VECTOR, F_NMI);
	  else if (interrupt_flags & F_RESET)
	    interrupt(RES_VECTOR, F_RESET);
	  else if ((I==0) && (interrupt_flags & F_PAD_A_IRQ))
      {
        printf("got keyboard interrupt\n");
        interrupt(PAD_A_IRQ_VECTOR, F_PAD_A_IRQ);
      }
	}

      /* fetch, decode, and execute and instruction */
      opcode = READ(emPC); ++emPC;
      EXECUTE(opcode);
      ++num_instructions;

      /* tick the clock for interested parties */
      if (num_clockusers != 0)
	{
	  unsigned long long time = 1000000000;
	  time = (time * cycle_clock) / frequency;

	  for (int idx = 0; idx < num_clockusers; ++idx)
	    clockuser[idx]->TellTime(time);
	}

      /* check for encountered breakpoints */
      int nbkpts = bpm->NumBreakpoints();

      if (nbkpts != 0)
	{
	  /* must count down (not up) because of automatic breakpoint deletion */
	  while (nbkpts--)
	    {
	      bp = bpm->GetBreakpointAtIndex(nbkpts);

	      if (bp->IsEnabled() == false)
		continue;

	      if (bp->GetOperandFlags() == bp_PC)
		{
		  if (bp->GetConditionFlags() == bp_equal)
		    if (bp->GetAddress() == emPC)
		      {
			hit_breakpoint = true;
			if (bp->IsAutomatic())
			  bpm->DeleteBreakpoint(bp);
		      }
		}
	      else if (bp->GetOperandFlags() == bp_S)
		{
		  if (bp->GetConditionFlags() == bp_equal)
		    if (bp->GetValue() == S)
		      {
			hit_breakpoint = true;
			if (bp->IsAutomatic())
			  bpm->DeleteBreakpoint(bp);
		      }
		}
	    }
	}
    }

  P = build_P();

  return hit_breakpoint;
}
開發者ID:cwolsen7905,項目名稱:photokeychain,代碼行數:83,代碼來源:Core65c02.cpp


注:本文中的Breakpoint::GetOperandFlags方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。