Re: A82: Detecting ROM version


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

Re: A82: Detecting ROM version



"Thomas J. Hruska" <thruska@tir.com> writes:
>
>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

Try the following code:

#include "ti82.h"

.org 0
.db "Disp. ROM Ver.",0

	ROM_CALL(CLEARLCD)
	ld A, %10001111
	out (2), A			; ROM Page 7

	ld A, (ROM_VERS)		; ROM_VERS = $7FFF
	ROM_CALL(TR_CHARPUT)	; display %A

WaitKey:

	CALL GET_KEY
	cp $37
	jr nz, WaitKey

	ret

.end

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
I receive the binary "b" when I run this program and I am using ROM 
Version 18. I would appreciate if someone using a different ROM Version 
and another with the same could confirm that this works. Thanks. *Special

Thanks to Sam Davies for info. regarding ROM Version identification.*

			-Scoobie


Follow-Ups: References: