RE: A82: Detecting ROM version


[Prev][Next][Index][Thread]

RE: A82: Detecting ROM version



At 08:54 PM 6/30/97 -0400, you wrote:
>On Monday, June 30, 1997 8:39 PM, Ryan N
Gillespie[SMTP:ryan.gillespie@juno.com] wrote:
>> "Thomas J. Hruska" <thruska@tir.com> writes:
>> >Does anyone know how to detect ROM version numbers on the TI-82?  If 
>> >so,
>> >could they send me some assembly code on how to do it?
>> >
>> >TIA,
>> >Thomas J. Hruska
>> 
>> Try this code, Thomas.
>
>Hmmm... well... it doesn't say where the ROM version is located in
82-ROM.TXT (since it must be in ROM somewhere -- anything past and
including $8000 is RAM).  My guess would be that it is at $7FFF in ROM page
7.  To change ROM pages to 7, compile the following:
>	ld	A, 10001111b
>	out	(2), A
>
>then you can just:
>	ld	A, $7FFF
>
>	now A should have the version byte (note, on the TI-85, it's not the same
as the actual number, so you'll have to have a list of equivelancies in
your program).
>	Sam

Here is the program I wrote using your idea (don't compile or run it as it
will crash your calculator):

#include "ti-82.h"

.ORG 0
.DB "Test ROM Ver.",0

  ROM_CALL(CLEARLCD)
  ld hl,0              ; 0 -> l, 0 -> h
  ld (CURSOR_POS),hl   ; l -> (CURSOR_ROW), h -> (CURSOR_COL)
  ld A, 10001111b      ; Switch to ROM page 7
  out (2), A
  ld A, ($7FFF)        ; Now A should have the version byte
                       ; (note, on the TI-85, it's not the same as the
                       ; actual number, so you'll have to have a list of
                       ; equivelancies in your program).
  ROM_CALL(TX_CHARPUT) ; Display A

KeyLoop:
  ROM_CALL(_getkey)
  cp $40
  ret Z
  jr KeyLoop

.END

Is there anything wrong with my code?  I had to change ld A,$7FFF because
it compiled with errors to ld A,($7FFF) which I think is the correct way to
put it (if you want the value and not the address stored into A).
Displaying and clearing the screen seems to pose no problem so I believe
that your code is incorrect.  Also, the compiled program doesn't show up in
the EXEC program listing (all my others do).  Any other suggestions?

TIA,
Thomas J. Hruska

|----------------------------------------------------|
|             Shining Light Productions              |
|      "Meeting the needs of fellow programmers"     |
|                                                    |
|   C/C++ programs                                   |
|   QBasic programs                                  |
|   JavaScript                                       |
|   TI-Basic                                         |
|   HTML                                             |
|                                                    |
| Search for our web site at                         |
| www.geocities.com/SiliconValley/Heights/8504/      |
|                                                    |
| We use a dynamic web server for most of our        |
| documents!!!                                       |
| Soon to go to a full JavaScript 1.1 web site!      |
|----------------------------------------------------|


Follow-Ups: References: