[A86] Re: Fraction ROM Calls


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

[A86] Re: Fraction ROM Calls




Hrm...What are the input and output of _tofrac?
In other words how do I use it?


What I have here doesnt do anything really...

I'm trying to look up the real variable A
and then do >frac on it and have the numerator in op1
and the denomiator in op2 like you say _toFrac does.



The code is for the 83plus but is similar to the 86.
---------------------------------------------------------
#include "ti83plus.inc"
.plugin asm83p.dll ;for cz80 (jonah cohen's z80 compiler)
#DEFINE TI83P
#include "ion.inc"
#ifdef TI83P
.org progstart-2
 .db $BB,$6D
#else
.org progstart
#endif

START:

 bcall(_homeup)
 bcall(_ClrScrn)

 ld hl,Avar
 rst 20h
 rst 10h
 ret c
 ex de,hl 
 
 bcall(_Mov9ToOP1)
 bcall(_ToFrac)
 bcall(_dispOP1a)

 ret

Avar:
 .db 0,tA

.end
-------------------------------------------------------------------




Ricky Cobb
http://tip.ti-programmers.com/
arcadesdude@intercom.net
[IM]
icq 41440378
msn arcadesdude
y!  arcadesdude
aim arcadesdude




6/21/02 12:21:01 PM, Xavier LaRue <paxl@videotron.ca> wrote:

>
>Hi,
>If you use _toFrac . The numerator will be stored into op1 and the denomiator 
into op2.. This work perfectly on the 83+.. But I don't know if that the same on 
the 86 :)
>
>Hope that help,
>Xavier LaRue
>
>On Fri, 21 Jun 2002 11:11:21 -0400
>Ricky Cobb <arcadesdude@intercom.net> wrote:
>
>> 
>> If there are any expireinced ASM programmers left here
>> on this mostly dry mailing list (I know you're there)
>> then I have two questions.
>> 
>> I am looking for documentation (and if possible an example)
>> of two TI-86 ROM Calls. The two ROM calls are:
>> 
>> _tofrac equ 4B93h ; convert op1 to op1/op2
>> _FRAC equ 549Ch ; op1 = frac(op1)
>> 
>> The comments arenot very descriptive and I would like to know
>> how to use these two ROM calls.
>> 
>> Input is going to be a fp decimal number
>> Output I'd like to be op1 as a string that reads
>> numerator/denomiator (if reducable to a fraction)
>> or an op as the denomiator and another op as the
>> numerator.
>> 
>> The most I could get was the numerator (but couldnt get
>> the denomiator or didnt know what the output of each of
>> these routines is.
>> 
>> Any help would be appreciated.
>> 
>> (See Also: http://www.ti-programmers.com/ubb/ultimatebb.php?ubb=get_topic;f=
>> 10;t=000103 )
>> 
>> 
>> Ricky Cobb
>> http://tip.ti-programmers.com/
>> arcadesdude@intercom.net
>> [IM]
>> icq 41440378
>> msn arcadesdude
>> y!  arcadesdude
>> aim arcadesdude
>> 
>> 
>> 
>
>






Follow-Ups: References: