===========================================================================
| 3268 | |
| 3269 | //=========================================================================== |
| 3270 | void DrawZeroPagePointers ( int line ) |
| 3271 | { |
| 3272 | if (! ((g_iWindowThis == WINDOW_CODE) || ((g_iWindowThis == WINDOW_DATA)))) |
| 3273 | return; |
| 3274 | |
| 3275 | int nFontWidth = g_aFontConfig[ FONT_INFO ]._nFontWidthAvg; |
| 3276 | |
| 3277 | RECT rect; |
| 3278 | rect.top = line * g_nFontHeight; |
| 3279 | rect.bottom = rect.top + g_nFontHeight; |
| 3280 | rect.left = DISPLAY_ZEROPAGE_COLUMN; |
| 3281 | rect.right = rect.left + (10 * nFontWidth); |
| 3282 | |
| 3283 | DebuggerSetColorBG( DebuggerGetColor( BG_INFO_ZEROPAGE )); |
| 3284 | |
| 3285 | const int nMaxSymbolLen = 7; |
| 3286 | |
| 3287 | for (int iZP = 0; iZP < MAX_ZEROPAGE_POINTERS; iZP++) |
| 3288 | { |
| 3289 | RECT rect2 = rect; |
| 3290 | |
| 3291 | Breakpoint_t *pZP = &g_aZeroPagePointers[iZP]; |
| 3292 | bool bEnabled = pZP->bEnabled; |
| 3293 | |
| 3294 | #if DEBUG_FORCE_DISPLAY // Zero-Page |
| 3295 | bEnabled = true; |
| 3296 | #endif |
| 3297 | if (bEnabled) |
| 3298 | { |
| 3299 | DebuggerSetColorFG( DebuggerGetColor( FG_INFO_TITLE ) ); |
| 3300 | PrintTextCursorX( "Z", rect2 ); |
| 3301 | |
| 3302 | DebuggerSetColorFG( DebuggerGetColor( FG_INFO_BULLET )); |
| 3303 | PrintTextCursorX( StrFormat( "%X ", iZP ).c_str(), rect2 ); |
| 3304 | |
| 3305 | // DebuggerSetColorFG( DebuggerGetColor( FG_INFO_OPERATOR )); |
| 3306 | // PrintTextCursorX( " ", rect2 ); |
| 3307 | |
| 3308 | BYTE nZPAddr1 = (g_aZeroPagePointers[iZP].nAddress ) & 0xFF; // +MJP missig: "& 0xFF", or "(BYTE) ..." |
| 3309 | BYTE nZPAddr2 = (g_aZeroPagePointers[iZP].nAddress+1) & 0xFF; |
| 3310 | |
| 3311 | std::string sAddressBuf1; |
| 3312 | std::string sAddressBuf2; |
| 3313 | std::string const& sSymbol1 = GetSymbol(nZPAddr1, 2, sAddressBuf1); // 2:8-bit value (if symbol not found) |
| 3314 | std::string const& sSymbol2 = GetSymbol(nZPAddr2, 2, sAddressBuf2); // 2:8-bit value (if symbol not found) |
| 3315 | |
| 3316 | std::string sText; |
| 3317 | |
| 3318 | // if ((sSymbol1.length() == 1) && (sSymbol2.length() == 1)) |
| 3319 | // sText = sSymbol1 + sSymbol2; |
| 3320 | |
| 3321 | DebuggerSetColorFG( DebuggerGetColor( FG_DISASM_ADDRESS )); |
| 3322 | |
| 3323 | if (!sSymbol1.empty() && sSymbol1[0] == '$') |
| 3324 | { |
| 3325 | // sText = pSymbol1; |
| 3326 | // sZPAddr = WordToHexStr( nZPAddr1 ); |
| 3327 | } |
no test coverage detected