; Assembly Source File ; Created 6/19/2002, 3:51:31 PM section ".data" ; Assembly Source File ; Created 12/20/2001, 8:00:42 PM ; Home Screen Restore - Restores the Home Screen Application to its original state ; after an assembly language program messes it up. ; Copyright (C) 2001-2002 Greg Dietsche ; ; This program is free software; you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation; either version 2 of the License, or ; (at your option) any later version. ; ; This program is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ; GNU General Public License for more details. ; ; You should have received a copy of the GNU General Public License ; along with this program; if not, write to the Free Software ; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ; ;Contact Information: ;Email: gforce@calc.org ;Webpage: http://gforce.calc.org include "os.h" ;;;;;;;;;;;;;;;;;;;;; ;;my macros... these aren't found in os.h at the moment... ;;;;;;;;;;;;;;;;;;;;; ;this macro requires that a4 be initialized with move.l $c8,a4 ;prior to its use ROM_CALL3 macro move.l \1*4(a4),a0 jsr (a0) endm ;this macro makes use of the line 1111 emulator for making rom calls... ;There are several other F-line instructions available, but this is the most usefull at the moment ;so i have only defined a macro for this instruction ROM_CALLF macro dc.w $F800+\1 endm ;makes use of the line 1010 emulator... error codes are those listed in the calc's guide book... ERR_THROW macro dc.w $A000+\1 endm ;;;;;;;;;;;;;;;;;;;;;; xdef _main xdef _ti89 xdef _ti92plus xdef _nostub FL_getHardwareParmBloc equ $16b ;SMALL set 0 _main: movem.l a0-a6/d0-d7,-(sp) move.l $c8,a4 ROM_CALL3 MenuUpdate ifd SMALL move.w #10,-(sp) ROM_CALL3 ST_refDsp ROM_CALL3 ST_eraseHelp endc ifnd SMALL pea.l ProgName(pc) ROM_CALL3 ST_helpMsg endc move.l #30,-(sp) move.w #$ff,-(sp) ;Detect Calc, this won't work on TI-92p AMS 1.00 ; ROM_CALL3 FL_getHardwareParmBloc ; cmp.l #3,2(a0) ; bne \NotTI89 ;Thanks to Extended For this calc detection routine (modified to fit my needs) move.l a4,d0 andi.l #$400000,d0 bne.s \NotTI89 ;TI-92p move.l ScrRect*4(a4),a0 cmp.b #239,2(a0) beq.s \NotTI89 ;V200 pea $56e6 bra \DrawLine \NotTI89: pea $5a2e \DrawLine: ROM_CALL3 memset move.l (a4),a0 ;FirstWindow move.l (a0),a0 ;dereference the pointer \DirtyWindows: ori.w #$2000,(a0) ;Set Dirty Flag tst.l 34(a0) ;is there another window? movea.l 34(a0),a0 ;movea doesn't affect ccr bne.s \DirtyWindows ifd SMALL lea 12(sp),sp endc ifnd SMALL lea 14(sp),sp endc movem.l (sp)+,a0-a6/d0-d7 rts ifnd SMALL ProgName: dc.b 'HSR v3.0',0 endc