LZ-Adv: TI-ROM


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

LZ-Adv: TI-ROM



This is a multi-part message in MIME format.


--------------64BB4CEA67C5
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


Yester i did some more work on the TI85 ROM and found a lot of functions
working on the stack. besides that i found new functions working on
the registers and corrected a few things from my previus document.


One of the things i found is that the Ti85 uses some of the  "unused"
bits of the sign byte to store the type of variable (at least when the
variable is stored in a register). 


I have attached to files with the information i have gotten until now.
<pre>
-- 
_______________________________________


Dines Justesen
Email: dines@post1.com or
       c958362@student.dtu.dk
WWW  : http://www.gbar.dtu.dk/~c958362/
_______________________________________


--------------64BB4CEA67C5
Content-Type: text/plain; charset=us-ascii; name="add2.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="add2.txt"


This a list of my latest additions and corrections to TI-RAM and TI-ROM, all
of the listed information is based on disassembly of the rom (ver 3.0A) and
it has not been tested in a assembly program. Some of the information was
taken from other sources, this has been indicated in the text. One of the most
helpful things to read was TI's documentation on the TI83.


Corrections and additions to TI-RAM and TI-ROM
----------------------------------------------


Last time i wrote the following addition


    839C       Stack used by self test
    8364       Counter used in self test


This information is only corrct when the calculator is performing a selftest,
so i do not think this is relevant for anyone programming the TI85.


In TI-RAM 8082 is desceibed as a 10 byte buffer used for finding variables,
and creating new ones. As far as i can see the correct information is that it
is an 11 byte buffer. The buffer at 8082 is only the first of 6 11 byte
buffer places rigth after each other in the RAM. Therefore I think the infor-
mation in TI-RAM should be the following:


8082 11 bytes OP1
808D 11 bytes OP2
8098 11 bytes OP3
80A3 11 bytes OP4
80AE 11 bytes OP5
80B9 11 bytes OP6


If you look at TI's information on the TI83 you will see that it has 6 buffer
excatly like this, therefore i have chosen to give the "registers" the same
names as the TI83 ones.


OP1 - OP6 is 11 byte registers used by the system to do varius things, among
them finding and creating variables. The registers are often used to pass
information to other functions. When the register are used to pass information
about a variable to a function the 11 bytes are used as shown below (this is
taken from TI-RAM).


          1 byte  type of variable
          1 byte  length of name
          8 bytes name
          1 byte  unused


When the registers are used to hold floating point values (called reals in this
text), the 11 bytes are used as shown below (the format of the reals is taken
from MHA's describtion of the .85N files).


          1 byte sign 80=negative 00=positive
          2 bytes code for exponent
          7 bytes storing the number
          1 byte unused


The last byte of the register is used by the system suring floating point
operaions (this based on the fact that it is so in the TI83 and that i have
found a function (not dosumented yet) which converts the 11 bytes format to
a 10 bytes real).


The unused bits of the sign byte might be used by the system for something,
but i am not sure what it is yet. In some of the functions i have seen the
unused bits are used as the type of variable (as far as i can see), but i
have not been able to document this properbly yet.


When the system is using complex values the registers are used in pairs, one
register holds the real part of the number the other register hols the imaginary
part.


I have found a lot of functions which used the registers i hve found, they
are listed below (a few of the ones i have found is not documented well
enough to be released yetm so i will send them later). As you can see most
of the things i have shown above looks a lot like the TI83's system, and the
functions below i no exception. Most of the functions listed in the TI83
information is also present below, but not all of them.


I have chosen not to use TI-ROM's format for explaining what the functions do
since there are too many functions which does almost the same thing, and that
would take up too much space. Instead I start by a short descbrition of the
functions, and then I list the adresses and which registers the operate on.
If some of the functions does something special, i have added a comment after
the other information.


The following functions sets the register to all zeroes.
--------------------------------------------------------


21F0 OP1
21F5 OP2
21FA OP3


The following functions sets the name field of the registers to all zeroes.
---------------------------------------------------------------------------


21EB OP1


The following functions write the floating pointer number shown to the register.
--------------------------------------------------------------------------------


Adr  Reg Value
---------------
21E5 OP1 0.0
218B OP1 1.0
21A3 OP1 2.0
2197 OP1 3.0
2190 OP1 4.0


21E0 OP2 0.0
21B3 OP2 1.0
21A8 OP2 2.0
2183 OP2 3.0
217C OP2 4.0
2175 OP2 5.0
216E OP2 8.0


21DB OP3 0.0
2169 OP3 1.0
219E OP3 2.0


21D6 OP4 0.0
2164 OP4 1.0


2022 OP1 0.0 then copies OP1 hl times to (de)


The following functions copies the used part of the register, which is 10 bytes.
--------------------------------------------------------------------------------


215E OP1 -> (DE)
2151 (HL) -> OP1
215B OP2 -> (DE)
2032 OP1 -> (DE) OP2 -> (DE+10d)


The following functions only copies first 7 bytes of the name.
--------------------------------------------------------------


211C OP3 -> OP2
2124 OP5 -> OP1
212C OP3 -> OP1
213C (HL) -> OP3


The following functions only copies the name.
---------------------------------------------


20FF OP2 -> OP4
2107 OP1 -> OP4
210F OP4 -> (DE)
2114 OP2 -> OP1
2134 OP3 -> OP1


The following functions copies one register to another.
-------------------------------------------------------


208E OP1 -> OP2
2042 OP1 -> OP4
20DA OP1 -> OP5
20D2 OP1 -> OP6


20E2 OP2 -> OP1
2141 OP2 -> OP3
204B OP2 -> OP4
20C2 OP2 -> OP5
20CA OP2 -> OP6


206E OP3 -> OP1
2066 OP3 -> OP2
2039 OP3 -> OP4
20BA OP3 -> OP5
20AD OP3 -> (DE)


2054 OP4 -> OP2
205D OP4 -> OP3
20B2 OP4 -> OP5
2149 OP4 -> OP6
20A3 OP4 -> (DE)


2076 OP5 -> OP2
2086 OP5 -> OP4
207E OP5 -> OP6
20A8 OP5 -> (DE)


2096 OP6 -> OP2
209E OP6 -> (DE)


20E8 Copy var at (HL) to var at (DE)


The following functions adds to registers saving the result in one of them.
Some of the functions do not use the last byte of information, these are marked
with a *. None of these functions uses the exponent or sign bit.
-------------------------------------------------------------------------------


22EF OP2=OP2+OP4
22F7 OP2=OP2+OP1
22FF OP1=OP1+OP2
2307 OP2=OP2+OP2*
230C OP1=OP1+OP2*
2315 OP1=OP1+OP3


Same as the above, but using the sign bit. Which register is used for sign is
indicated by SX where X is the number of the register.
-----------------------------------------------------------------------------


234C OP2=OP2+OP3 S5
235C OP2=OP2+OP3 S5 ONLY ADDS LAST 4 BYTES


These functions subtracts two registers, besides this they work as the ones
above (add).
---------------------------------------------------------------------------
2375 OP2=OP2-OP1
237D OP1=OP1-OP2
2382 OP3=OP3-OP1
238A OP1=OP1-OP3
23C1 OP4=OP4-(HL)*  HL points to the 2nd last byte of the wanted register or
                    the last byte of a floating point number
23CE OP3=OP3-OP1*
23D7 OP1=OP1-OP2*


The following functions exchanges two registers.
------------------------------------------------


2407 OP1<->OP2
23FD OP1<->OP3
2402 OP1<->OP4
23E6 OP1<->OP5
23EB OP1<->OP6


23F0 OP2<->OP4
23F5 OP2<->OP5
23D9 OP3<->OP6


23DE OP5<->OP6


The following functions returns the sign of a register in register A.
---------------------------------------------------------------------


25AF Get sign of OP2 (unused bits masked out)
25B5 Get sign of OP1 (unused bits masked out)
25BB Get sign of OP2 (MSB cleared in mem)
25C0 Get sign of OP1 (MSB cleared in mem)


The following functions performes operations on the exponent bytes of a register.
---------------------------------------------------------------------------------


263B Compare exponent of OP1 with FC. Also return exponent in HL


The following functions writes the real in the used register to the end of memory.
----------------------------------------------------------------------------------


2E97 OP1
2E92 OP2
2E8D OP3
2E88 OP4
2E83 OP5
2E7E OP6
2E9A Write real at (HL) to end of memory


The following functions write the complex real in the used register pair to the
end of memory.
-------------------------------------------------------------------------------


2ED4 OP1/OP2
2EBC OP3/OP4
2EAE OP5/OP6
2EE1 Write register pair at (hl) to end of memory


The following functions exchanges the value at the end of memory with
the value in the indicated register (pair).
---------------------------------------------------------------------


2EF3 OP1/OP2
2F08 OP1


Other functions using the registers.
------------------------------------


2219 OP1=OP1/10
221F insert 00 at 2nd byte of OP1
2224 insert 00 at 1st byte of OP1
222D insert 00 at 1st bytes of OP1's name field
224A insert 00 at 2nd last byte of OP3
224F insert 00 at 2nd last byte of OP1
2255 insert 01 at 1st byte of OP1
225C insert 00 at last byte of OP3 moving the other bytes up
2261 insert 00 at last byte of OP1 moving the other bytes up


As you can see some of the functions listed performes operation which seems
a bit wierd, but i have not had the time to examine what they are used for
by the system.


When ever the system moves any thing in the RAM it makes sure to update all
of the pointers it is using. The following addresses is places which is
updated by these rutines, and which have not been desceibed in TI-RAM before.
Besides these pointers all of the pointers listed in TI-RAM was updated by
the functions, so these places seems to be pointers for sure. It is hard to
say what all of these pointers are used for, but for some of the i have a few
guesses, but i have not seen anything confirming this in the rom yet.


Based on how much the other parts of the system looks like the TI83 system i
think that some of these pointers must be data pointers. These pointers are
used to pass information to rutines to functions which needs more data bigger
than the registers (eg. lists, programs ...). The pointers would be 5/6 pointers
placed rigth after each other in the system memory. The only place i can see
5/6 pointers after each other which have not been documented before is at
85E1 to 85EC.


Below is a list of adresses which based on the found functions has top be
pointers.


80CA Word pointer
80CE Word pointer
80D4 Word pointer
85E1 Word pointer IMATHPRT1 ?
85E3 Word pointer IMATHPRT2 ?
85E5 Word pointer IMATHPRT3 ?
85E7 Word pointer IMATHPRT4 ?
85E9 Word pointer IMATHPRT5 ?
85EB Word pointer IMATHPRT6 ?
8629 Word pointer
862B Word pointer
8632 Word pointer
8634 Word pointer
863F Word pointer
8A63 Word pointer
8B96 Word pointer
8B98 Word pointer
8BD5 Word pointer
8BD7 Word pointer
8BD9 Word pointer
8BDB Word pointer


Based on the information fromn TI about the TI83 my guess that the following
functions is used by the system to get the memory used by the system variables.
These have names one byte long which are tokens for their actual name. The
following is a list of functions doing this.


2676  Set OP1 name to length 1 token 21
267B  Set OP1 name to length 1 token 23
2680  Set OP1 name to length 1 token 40
2685  Set OP1 name to length 1 token 2A
268A  Set OP1 name to length 1 token C1
2690  Set OP1 name to length 1 token 72
2695  Set OP1 name to length 1 token 78
269C  Set OP1 name to length 1 token 79
26A1  Set OP1 name to length 1 token 74


The following is a list of other functions used to allocate mem.
The name of the variable which should be create is always placed
in OP1.


29D3 Real (type 0)
29E1 Cplx (type 1)
29E8 Vect (type 2) Number of elements in L
2A10 Cplx vect (type 3) Number of elements in L
2A21 List (type 4) Number of elements in HL
2A3E Cplx list (type 5) Number of elements in HL
2A49 Matrix (type 6) Number of rows/cols in H/L
2A56 Cplx matrix (type 7) Number of rows/cols in H/L
29D9 Const (type 8)
29DD Cplx const (type 9)
2A77 Equ (type A) Number of chars in HL
2A64 String (type C) Number of chars in HL
2A87 GDB (type D)
2A8B GDB (type E)
2A8F GDB (type F)
2A93 GDB (type 10)
2A80 Pict (type 11)
2A97 Prgm (type 12)


There are several ways to call the rutine to allocate memory, one of them is
to call the functions above. Another way is calling the rutines your self.
For lists, vectors, matrices call 299B with the number of real elements in hl
and the type in a. (for complex values call with number of elements *2).
Another possible way of calling it is to call 29A7 with the number of bytes in
hl and the type in a. Besides this you can fill out the var type field in OP1,
put the length in hl and call 29AA. All of the above calls assumes that the
var name and length of the name is placed into OP1.


Below is a list of other additions i have to TI-RAM.
----------------------------------------------------


7D83  FF?? bytes Array holding values of the key pressed. When
           the keyboard handler is used the keys are translated,
           this table takes a translated key and will find the
           key pressed. Used by self test.


--- Call 2E72 --------------------------------------------------------------
Input : HL holds number of reals to get


Result : Finds if you can allocate HL reals, and adds the need number of
         bytes to (8BE1)


--- Call 2E64 --------------------------------------------------------------
Input : HL holds number of reals to subtract.


Result : The length of HL reals is subtracted from the end of used mem.


--- Call 2E59 --------------------------------------------------------------
Input :  none


Result : The length of a real is subtracted from the end of used mem.


--- Call 2E56 --------------------------------------------------------------
Input :  none


Result : The length of a complex real is subtracted from the end of used mem.


--- Call 2A9B --- Update Ans ? ---------------------------------------------
Input : OP1 and OP2 holds variable information for the last variable accesed
        and Ans


Result : Ans is updated


--- Call 3005 --------------------------------------------------------------
Input : Same as 28EA


Result : Same as 28EA except if call fails to get mem the build in error-
         handler is called.


--- Call 26A6 --------------------------------------------------------------
Input : none


Result : (8629)=HL=(8BE1)


--- Call 264E --- HL=H*L ---------------------------------------------------


Input : H and L hols values to be multiplied


Result : HL = H * L (B=0). Overflow can not occur.


--- Call 1F74 --- Write 0.0 to (DE) ----------------------------------------


Input : none


Result : the floating point number 0.0 is written to the adress in DE


--- Call 1F7A --- Write 1.0 to (DE) ----------------------------------------


Input : none


Result : the floating point number 1.0 is written to the adress in DE


--- Call 1F8C --- Is var real ----------------------------------------------


Input : none


Result : If Z flag set then the variable in OP1 is a real floating point
         value (var type 1).


--- Call 1F94 --- Get var type of OP1----------------------------------------


Input : none


Result : A holds the type of variable (with the 3 MSB cleared)


--- Call 2205 --- zero buffer -----------------------------------------------


Input : B holds number of bytes to zero out. HL holds adr to write to


Result : B bytes is zeroed starting at  the adr in hl


--- Call 220C --- Get upper nible -------------------------------------------


Input : A holds value


Result : C = A
         A = 4 MSB of A


--- Call 2213 --- 4*A -------------------------------------------------------


Input : A holds value


Result : A = A*4


--- CALL 3E08 (37C7A) -------------------------------------------------------


Input : none


Result: This function does the memory test, display test and
        keyboard test seen in the selftest. When function is
        terminated it calls 0BD5 to reset the calc.
        WARNING THIS FUNCTION WILL RESET THE CALC !!!


--- CALL 37D55 --------------------------------------------------------------


Input : A holds value to be insert on the screen.


Result : All bytes in the display mem is moved one byte up. and
         the value in a is writen the the new free byte. when this
         is done the functions waits for a keypress if the keyboard
         handler returns zero it jumps to 37D0C.


--- CALL 37D4E --------------------------------------------------------------


Input : HL holds adr to write to.


Result : A is written ten times from (HL) to (HL+10).




I have added info to the following function(s) :
------------------------------------------------


--- CALL 301C ---- Self test ------------------------------------------------
Input: none


Result: The self test seen by presseing [2nd][MODE][ALPHA][S] is executed.
        The code placed here tests the rom and then jumps to 3E08 which does
        the rest. When the test has been the the calculator is resat.


Note : This functions has not been tested.


--- CALL 3EB0 (3564D) ---- Keyboard handler ---------------------------------


Input: none


Result: Handles keyboard input as seen on the homescreen (adjust contrast,
        use alpha/ALPHA ...). Returnes the current key in a and the
        translated in (hl). If no key is pressed this function will wait for
        one to be pressed.


This is a list of wird stuff found in the rom:
----------------------------------------------


	LD	A,(08085H)	; 276D  get 2nd byte of name
	CP	009H		; 2770  is it 9
	JR	NC,02772H	; 2772


If 2nd bytes variable name is >9 then do an endless loop ? This is a small
part of a longer function and statments like this is used quite often, but
the adr seems wrong. Do other versions look like this too ? To me it looks
like someone wrote the wrong address, all the other places if there is no
carry the function jumps to the next checking rutine, so why this ?


Another thing which seems wierd is that some times the following code is used


ld h,xx
ld l,yy


Instead of ld hl,xxyy which is used most places. Another thing like this is
code which looks like this


ld hl,xxxx  ;xxxx is a constant value
inc hl
inc hl


why not just load xxxx+2 into hl in the first place.


This is all the functions i have located and documented now. All in all this
documents most functions found from 1F00 to 3000, but not all. I have a list
of the functions not documented yet, and i will try to document them asap.


Dines Justesen
--------------64BB4CEA67C5
Content-Type: text/plain; charset=us-ascii; name="add3.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="add3.txt"


This is yet another list of additions and corrections to TI-RAM and TI-ROM.


When the TI85 stores values in the registers the "unused" bits of the sign
byte is used to store the type of variable. I am not sure if it does this
with reals values in variables.


Some of the functions i have found deals with a stack at the end of used memory.
The stacks grows upwards and the top element is at end of used memory. When
values are pushed to the stack the system checks that the needed memory is
availble. Some of the functions were listed in the latest version of TI-ROM,
but only 6 of them, I did not see any text on how it worked.


The functions to push values to the stack was in my last document, but i did
not know what they did then, so i have included the same functions with edited
comments (marked with a !). The stack can hold both variable names and real/
complex values. Again this part of the system is much like the TI83, since
the TI83 also has got a stack like this. On the TI83 the stack is used to pass
values to some functions.


!The following functions pushes the real in the used register to the stack.
!--------------------------------------------------------------------------
!
!2E97 OP1
!2E92 OP2
!2E8D OP3
!2E88 OP4
!2E83 OP5
!2E7E OP6
!2E9A Write real at (HL) to end of memory
!
!The following functions pushes the complex real in the used register pair to
!the stack.
!----------------------------------------------------------------------------
!
!2ED4 OP1/OP2
!2EBC OP3/OP4
!2EAE OP5/OP6
!2EE1 Write register pair at (hl) to end of memory
!
!The following functions exchanges the value at the top of the stack with
!the value in the indicated register (pair).
!------------------------------------------------------------------------
!
!2EF3 OP1/OP2
!2F08 OP1


The following functions pops the value at the top of the stack to the
indicated register.
---------------------------------------------------------------------


2E41 OP1
2E3C OP2
2E37 OP3
2E32 OP4
2E2D OP5
2E28 OP6
2E44 (DE)


The following functions pushes the complex real in the used register pair to
the stack.
----------------------------------------------------------------------------


2E49 OP1/OP2
2E4C (DE)/(DE+11)


The following functions uses the "unused" bits of the sign byte to determine
if the value to be pop is complex or real, and the pops it to op1 or op1/op2.
-----------------------------------------------------------------------------


2E1C Pop to OP1 or OP1/OP2
2E0C Pop to OP3 or OP3/OP4
2DFC Pop to OP5 or OP5/OP6


The following functions gets one or more values from the stack to one of
the registers.
------------------------------------------------------------------------


     reg.    offset position
--------------------------
2F71 OP1      A     1
2F90 OP1     14     2
2F9F OP1     1E     3
2F42 OP1     28     4
2F4C OP1     32     5
2F21 OP1     3C     6
2F14 OP1     78     12


2F6C OP2      A     1
2F88 OP2     14     2
2F9A OP2     1E     3
2F2B OP2     32     5


2F8D OP1/OP2 14/A   2/1
2F3F OP1/OP2 28/1E  4/3
2F1E OP1/OP2 3C/32  6/5


2F67 OP3      A     1
2F83 OP3     14     2
2F51 OP3     1E     3


2F62 OP4      A     1


2F80 OP3/OP4 14/A   2/1


2F56 OP5      A     1


2F5D OP6      A     1
2F35 OP6     28     4


2F74 (DE)     A     1
2F93 (DE)    14     2
2FA2 (DE)    1E     3
2F45 (DE)    28     4
2F2e (DE)    32     5
2F24 (DE)    3C     6
2F17 (DE)    78     12


The following functions sets the indicated position on the stack to the value
in the indicated register.
-----------------------------------------------------------------------------


2FB8 OP1 1
2FAE OP2 1
2FA9 OP3 1
2FB3 OP6 1
2FBB (DE) 1


2FD0 OP1 2
2FC8 OP5 2
2FD3 (DE) 2


2FCD OP1/OP2 2/1


2FE9 OP1 3
2FDA OP2 3
2FDF OP3 3
2FE4 OP6 3
2FEC (DE) 3


2FFB OP1 4
2FF3 OP5 4
2FFE (DE) 4


2FF8 OP1/OP2 4/3


Other functions using the stack.
--------------------------------


3014 Get pointer to first element of stack (end of used memory -10)
     (This function is called ??????????? in TI-ROM)


The following functions returns (in hl) the exponent of OP1 subtracted the
shown value.
--------------------------------------------------------------------------


26DF OP1 FBFF
26E4 OP1 FC0C
26D5 OP1 FC01
26CF OP1 exponent of OP2


The following functions works on the exponent of the indicatred register.
-------------------------------------------------------------------------


25DD OP1 Increase exponent, jump to error handler on error.
25D5 OP1 Decrease first byte of exponent
25DD OP1 Increase first byte of exponent


The following functions works on the registers.
-----------------------------------------------


265A Set OP1 name to length 1 token 2E
265F Set OP1 to the following
         type 4 (list)
         length of name 5
         name "PRegC"
1FB0 Convert real value in OP1 o complex in OP1/OP2
1FA2 Copy OP2 to OP1, sets type of OP1 to real.
1FAD Set OP1/OP2 to (0,0)


The following functions updates misc pointers. The functions is used by the
system to update its own pointers.
---------------------------------------------------------------------------


If (pointer)<DE then add BC


2D7B (8B94)
2D05 (8BEB),(8B25),(8BD5),(8BD7),(8BD9),(8BDB),(85E1),(85E5),(85E9),
2B00 (80C6),(80C8),(80CA),(80CC),(80CE),(8B96),(8B98),(8629),(862B),
     (80D4),(8634),(8632),(863F),(8B27),(80D0),(85E3),(85E7),(85EB),
     (80D2)


If (8A5f)<DE then sub BC
2ADF (8A5F),(8A61),(8A63)


Other functions and data.
-------------------------


2664 7 Bytes var info. type=4 name length=5 name=PRegC
1F39 REAL 0.5
1F42 \ Complex (1.0,0.0)
1F4C /   \
1F56     /Complex (0.0,0.0)
1F60 REAL 0.0
1F6A REAL 1.0


The values starting at 1F42 is listed in TI-RAM, but all complex numbers are
called bad number and 0.5 is called bad too, why ? :)
--- Call 2DF5 --- Push byte to (8BE5)+1 ------------------------------------


Input : none


Result : The value is pushed to the location.


--- Call 2DE4 --- Pop byte from (8BE5) -------------------------------------


Input : none


Result : The value is poped.


--- Call 2DDB --- Pop word from (8BE5) -------------------------------------


Input : none


Result : The value is poped.


--- Call 2DCB --- Push word to (8BE5) ------------------------------------


Input : none


Result : The value is pushed to the location.


--- Call 2C42 --- Insert bytes -------------------------------------------


Input : DE = Number of bytes to insert HL = Start adr


Result : All bytes from HL is moved De bytes up in memory if there is room
         for it.


--- Call 26F7 --- BIT 5,(IY+9) -------------------------------------------


--- Call 26FC --- RES 0,(IY+0) -------------------------------------------
--- Call 26C5 --- BIT 0,(IY+0) -------------------------------------------
--- Call 26CA --- SET 0,(IY+0) -------------------------------------------


--- Call 26F0 ------------------------------------------------------------
Input : none


Result : If bit 4 of iy+9 is set then display an error.


--- Call 26E9 ------------------------------------------------------------
Input : none


Result : If bit 0 of iy+7 is 0 then display an error.


--- Call 266B --------------------------------------------------------------
Input : none


Result : Returns type of var in OP1 if it is a real or complex, else it calls
         the error handler.
--------------64BB4CEA67C5--
</pre>