nDelta must be a power of 2 ===========================================================================
| 3685 | // nDelta must be a power of 2 |
| 3686 | //=========================================================================== |
| 3687 | void _CursorMoveUpAligned ( int nDelta ) |
| 3688 | { |
| 3689 | if (g_iWindowThis == WINDOW_DATA) |
| 3690 | { |
| 3691 | if (g_aMemDump[0].eDevice == DEV_MEMORY) |
| 3692 | { |
| 3693 | g_aMemDump[0].nAddress -= nDelta; |
| 3694 | g_aMemDump[0].nAddress &= _6502_MEM_END; |
| 3695 | } |
| 3696 | } |
| 3697 | else |
| 3698 | { |
| 3699 | int nNewAddress = g_nDisasmTopAddress; // BUGFIX: g_nDisasmCurAddress; |
| 3700 | |
| 3701 | if ((nNewAddress & (nDelta-1)) == 0) |
| 3702 | nNewAddress -= nDelta; |
| 3703 | else |
| 3704 | nNewAddress -= (nNewAddress & (nDelta-1)); // .22 Fixed: Shift-PageUp Shift-PageDown Ctrl-PageUp Ctrl-PageDown -> _CursorMoveUpAligned() & _CursorMoveDownAligned() |
| 3705 | |
| 3706 | g_nDisasmTopAddress = nNewAddress & _6502_MEM_END; // .21 Fixed: _CursorMoveUpAligned() & _CursorMoveDownAligned() not wrapping around past FF00 to 0, and wrapping around past 0 to FF00 |
| 3707 | } |
| 3708 | } |
| 3709 | |
| 3710 | |
| 3711 | //=========================================================================== |
no outgoing calls
no test coverage detected