break;
}
if (startAddress + pageSize > memory.endAddress()) {
startAddress = oldStartAddress;
throw new MemoryAccessException("Cannot draw screen starting at selected address.");
}
if (cursorPosition > memory.endAddress()) {
cursorPosition = oldCursorPosition;
throw new MemoryAccessException("Cannot position cursor past end of memory.");
}
notifyListeners();
}