LZ-Adv: Ti-ROM math functions
[Prev][Next][Index][Thread]
LZ-Adv: Ti-ROM math functions
-
Subject: LZ-Adv: Ti-ROM math functions
-
From: Dines Justesen <c958362@student.dtu.dk>
-
Date: Wed, 30 Oct 1996 08:02:41 +0100
-
In-Reply-To: <>
This is a multi-part message in MIME format.
--------------32A42E173DC3
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I have attached the info on the math functions to this letter.
<pre>
--
_______________________________________
Dines Justesen
Email: dines@post1.com or
c958362@student.dtu.dk
WWW : http://www.gbar.dtu.dk/~c958362/
_______________________________________
--------------32A42E173DC3
Content-Type: text/plain; charset=us-ascii; name="add4.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="add4.txt"
In TI-RAM 827C is called buffer for name of last error. This is not the
whole truth, the buffer is also used for other prupose by the function
which handles errors. I have not seen it used other places, but i might be
used as more general buffer. Based on the functions i have seen my guess is
that the buffer is 80h bytes long, since this is the largest value i have
seen used.
The following function is called when an error happens.
--- Call 0A87 --- Error handler -------------------------------------------
Input : A holds number of error which has occured
Result : The standard error screen is displayed with the number of the
error and a string telling what it means. This functions uses alot
of memory adresses to determine what happens besides this.
When an error occurs a lot of memory adresses which we do not know the
function of is used to determine what happens, but it is possible to call
it from zshell without setting any of these. I have checked what happens
and as far as i can see, the adresses is used to determine if you can goto
the place the error happens, how much temperary memory was used and stuff
like that.
Before the the function there is a table of functions setting the value in
a and then calling this functions. Below is a list of the functions.
ERROR ADR
-------------
14 0A59
15 0A5D
0F 0A45 *
22 0A85
81 0A08
82 0A0C
83 0A10
84 0A14
85 0A18
86 0A61
87 0A1C
88 0A20
89 0A24
8A 0A28
8B 0A2C
8C 0A30
8D 0A34
8E 0A38
8F 0A3C
90 0A49
91 0A4D
92 0A51
93 0A55
97 0A65
98 0A69
99 0A6D
9C 0A71
9D 0A75
9E 0A79
A0 0A7D
A1 0A81
* This function will only generate an error if bit 2 of iy+13 is 1.
If you want to see how the error is written on the display have a look at
page 7 adress 4784 (this function was first documented by Rob Taylor).
I have found a tabel of constants in the ROM, the constants can be loaded
into a register with the following function. The table starts at 24E6.
--- Call 24D3 --- Get constant -------------------------------------------
Input : A holds the number of canstant to get (max 6)
Result : OP2 holds the constant.
The constants are the following:
# Value Name
--------------------------------
0: 57.29577951308232 180/Pi
1: 1.570796326794897 Pi/2
2: 0.7853981633974483 Pi/4
3: 0.4342944816032518 Log e
4: 3.141592653589800 Pi
5: 0.01745329251994330 Pi/180
6: 2.302585092994046 ln 10
The following functions is math functions which operates on the registers.
Some of the functions uses bit 6 of iy+E to decide if the last two digits of
the registers, should be used.
--------------------------------------------------------------------------
10E2 / 10EE OP1=sqrt(OP1) ??
1010 OP1=OP1/OP2 ?
1016 OP1=1/OP1
0D68 OP1=OP1-OP2
0D65 OP1=OP1-1
0D60 OP1=OP1+1
0D5D OP1=2*OP1
0D54 / 0D4F OP1=OP2-OP1
0D36 OP1=|OP1|+|OP2|
0D31 OP1=OP1+(HL)
0D22 OP1=MAX(OP1,OP2)
0D13 OP1=MIN(OP1,OP2)
0D6F / 0D78 OP1=OP1+OP2
0E59 OP1=OP1*OP2 (OP3 destroyed)
0E32 OP1 is converted from radians to deg. (OP2,3 destroyed)
0E3B OP1 is converted from deg to radians. (OP2,3 destroyed)
0E44 OP1=OP1^3 (OP2,3 destroyed)
0E49 OP1=OP1*0.5 (OP2,3 destroyed)
0E51 OP1=OP1^2 (OP2,3 destroyed)
0F92 OP1=-OP1
All the functions above is all documented by TI on the TI83, except two
function, but these have been checked and they are there. Some of the func-
tions documented on the TI83 have not been found yet, they are there but
they are hard to find.
--------------32A42E173DC3--
</pre>