1;;; -*- TI-Asm -*- 2 3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 4;;; 5;;; TI-73/82/83/83+/84+/85/86 ROM Dumper 6;;; 7;;; Copyright (c) 2012 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 2 27 28;;; Link port 29 30linkPort equ 0 31LINK_STATUS_MASK equ 0Ch 32LINK_RESET equ 0C0h 33LINK_D0L equ 0C1h 34LINK_D1L equ 0C2h 35 36;;; RAM addresses 37 38curRow equ 800Ch 39curCol equ 800Dh 40saveSScreen equ 8265h 41 42;;; Flags 43 44apdFlags equ 08h 45apdRunning equ 3 46 47;;; System calls 48 49_ClrScrnFull equ 475Dh 50_DispHL equ 4709h 51_GetCSC equ 4014h 52_PutC equ 4705h 53_PutS equ 470Dh 54_RunIndicOff equ 4795h 55 56;;; Macros 57 58#define CLEAR_LCD call _ClrScrnFull 59#define GET_CSC call _GetCSC 60#define PUT_CHAR call _PutC 61#define PUT_DECIMAL call _DispHL 62#define PUT_STRING call _PutS 63#define RUN_INDIC_OFF call _RunIndicOff 64 65#define SET_ROM_PAGE push af \ and 8 \ rlca \ or LINK_RESET \ out (linkPort), a \ pop af \ and 7 \ or 88h \ out (2), a 66 67#define EXIT_KEY_STR db 0C1h, "MODE]" 68 69;;; Miscellaneous 70 71#define CALC_ROM_SIZE 256 72