===========================================================================
| 1720 | |
| 1721 | //=========================================================================== |
| 1722 | bool _CmdBreakpointAddReg ( Breakpoint_t *pBP, BreakpointSource_t iSrc, BreakpointOperator_t iCmp, WORD nAddress, int nLen, bool bIsTempBreakpoint ) |
| 1723 | { |
| 1724 | bool bStatus = false; |
| 1725 | |
| 1726 | if (pBP) |
| 1727 | { |
| 1728 | _ASSERT(nLen <= _6502_MEM_LEN); |
| 1729 | if (nLen > (int) _6502_MEM_LEN) nLen = (int) _6502_MEM_LEN; |
| 1730 | |
| 1731 | if (iSrc == BP_SRC_VIDEO_SCANNER) |
| 1732 | { |
| 1733 | if (nAddress >= NTSC_GetVideoLines()) |
| 1734 | nAddress = NTSC_GetVideoLines() - 1; |
| 1735 | |
| 1736 | if ((nAddress + (UINT)nLen) >= NTSC_GetVideoLines()) |
| 1737 | nLen = NTSC_GetVideoLines() - nAddress; |
| 1738 | } |
| 1739 | |
| 1740 | pBP->eSource = iSrc; |
| 1741 | pBP->eOperator = iCmp; |
| 1742 | pBP->nAddress = nAddress; |
| 1743 | pBP->nLength = nLen; |
| 1744 | pBP->bSet = true; |
| 1745 | pBP->bEnabled = true; |
| 1746 | pBP->bTemp = bIsTempBreakpoint; |
| 1747 | pBP->bStop = true; |
| 1748 | pBP->bHit = false; |
| 1749 | pBP->nHitCount = 0; |
| 1750 | // NB. Address prefix args are set in parent _CmdBreakpointAddCommonArg() |
| 1751 | bStatus = true; |
| 1752 | } |
| 1753 | |
| 1754 | return bStatus; |
| 1755 | } |
| 1756 | |
| 1757 | |
| 1758 | // @return Number of args processed |
no test coverage detected