A92: TI-92 Plus Assembly info


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

A92: TI-92 Plus Assembly info



For those of you who are dying to run assembly programs on your TI-92+, here is what I have found out so far about it.
 
The 'exec' function is very easy to use, but limited.  It takes in a string of hexadecimal opcodes (such as "4E75").  I have found, however, that the size of an asm program using this method is very limited, and it is twice the size of a binary representation.  The plus has an ASM program type, but I haven't figured it out yet.  Hopefully TI's link program will be out in a few days and that will reveal something about it.
 
Not much can be done in assembly without ROM addresses, so these are the ones I have found so far.  More are on the way.  The names and numbers are those from Fargo II's TIOS library.
 
00 ST_eraseHelp   4FFEF4
01 ST_showHelp    4FFFCE
02 HeapFree       49AF82
03 HeapAlloc      49B000
04 ER_catch       420B36*
05 ER_success     420B5C*
06 reset_link     421FB0
07 flush_link     422022
08 tx_free        42208A*
09 transmit       4220A8
0A receieve       422122*
0B HeapFreeIndir  49AF68
0C ST_busy        4FFEB8
0D ER_throwVar    420B0C
0E HeapRealloc    49B17C
0F sprintf        4E086C
10 DrawStrXY      48713A
11 DrawCharXY     487A84
12 FontSetSys     485BC4
13 DrawTo         485C8E*
14 MoveTo         485CCC*
15 PortSet        485CDA*
16 PortRestore    485CFE*
17 WinActivate    519F52*
18 WinClose       51A300*
19 WinOpen        51AAB6*
1A WinStrXY       51B302*
1C globals        004C00
21 SF_font        407280**
25 ROM_base       400000
37 rand           56E89C
* Not tested
** Font order different from original (Now medium,small,large)
 
The LCD memory starts at $4C00.
 
To dump the ROM, put the following in a string and run it using exec:
"207C0040000010181400E80A0202000F0602003013C20060000F12390060
000D020100CF13C10060000D12390060000D0201004067F414000202000F0
602003013C20060000F12390060000D020100CF13C10060000D12390060
000D0201004067F4B1FC00600000669C4E75"
 
You can recieve the dump using Hyperterminal.  The format is a modified hexadecimal.  Instead of "0123456789ABCDEF" it uses "0123456789:;<=>?".  This allows the program to be simpler.  The following C program can convert it to
binary:
#include <stdio.h>
void main()
{
        FILE *fin=fopen("ti92.txt","rb");
        FILE *fout=fopen("ti92.rom","wb");
        for (int count=0x200000;count;count--)
        {
                int h,l,c;
                h=fgetc(fin)-'0';
                l=fgetc(fin)-'0';
                c=(h<<4)+l;
                fputc(c,fout);
        }
        fclose(fin); fclose(fout);
}
 
That should get things started.  Until TI releases the real info in a month, we'll have to settle for what we can find.