1;;; -*- TI-Asm -*- 2 3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4;;; 5;;; TI-73/82/83/83+/84+/85/86 ROM Dumper 6;;; 7;;; Copyright (c) 2012-2013 Benjamin Moody 8;;; 9;;; This program is free software; you can redistribute it and/or modify 10;;; it under the terms of the GNU General Public License as published by 11;;; the Free Software Foundation; either version 2 of the License, or 12;;; (at your option) any later version. 13;;; 14;;; This program is distributed in the hope that it will be useful, 15;;; but WITHOUT ANY WARRANTY; without even the implied warranty of 16;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17;;; GNU General Public License for more details. 18;;; 19;;; You should have received a copy of the GNU General Public License 20;;; along with this program. If not, see <http://www.gnu.org/licenses/>. 21;;; 22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 23 24;;; Memory mapping 25 26memPort equ 6 27memExtPort equ 0Eh 28 29;;; Link port 30 31linkPort equ 0 32LINK_STATUS_MASK equ 3 33LINK_RESET equ 0 34LINK_D0L equ 1 35LINK_D1L equ 2 36 37;;; RAM addresses 38 39saveSScreen equ 8798h 40curRow equ 8459h 41 42;;; Flags 43 44apdFlags equ 08h 45apdRunning equ 3 46 47appFlags equ 0Dh 48appTextSave equ 1 49 50remoteKeyFlag equ 1Fh 51remoteKeyPress equ 5 52 53;;; System calls 54 55APP_PUSH_ERRORH equ 59h 56APP_POP_ERRORH equ 5Ch 57 58_ClrScrnFull equ 453Dh 59_DispHL equ 44FEh 60_GetCSC equ 4018h 61_PutC equ 44FBh 62_PutS equ 4501h 63_RecAByteIO equ 4EE8h 64_RunIndicOff equ 4567h 65_SendAByte equ 4ECAh 66 67;;; Macros 68 69.addinstr B_CALL * EF 3 NOP 1 70 71#define CLEAR_LCD B_CALL _ClrScrnFull 72#define GET_CSC B_CALL _GetCSC 73#define PUT_CHAR B_CALL _PutC 74#define PUT_DECIMAL B_CALL _DispHL 75#define PUT_STRING B_CALL _PutS 76#define RUN_INDIC_OFF B_CALL _RunIndicOff 77#define SET_ROM_PAGE rlca \ out (memExtPort), a \ srl a \ out (memPort), a 78 79#define EXIT_KEY_STR db 0C1h, "MODE]" 80 81;;; Miscellaneous 82 83#define CALC_LINK_ASSIST 84#define CALC_ROM_SIZE 4096 85