Re: A86: FRAC
[Prev][Next][Index][Thread]
Re: A86: FRAC
or, you could easily write your own routine. use the >FRAC call i posted
(its on Matt's page). if OP2 = 1, then display _OP1 only. otherwise,
push OP2, display OP1, display a slash, pop OP2 into OP1, display OP1,
now there is a fraction displayed. in code (these are my own mnemonics,
they probably differ from TI's or other peoples, u can figure out what
they mean though):
;OP1 = number to show
call _to_frac
call _cp_op2_to_1
jr z,not_frac
call _push_op2
call _disp_op1
ld a,'/'
call _putc
call _pop_op1
call _disp_op1
jr is_frac
not_frac:
call _disp_op1
is_frac:
;... other code
(test this, it might not work quite right)
Trey Jazz wrote:
>
> >Do you mean just display OP1? There is a rom call called _dispOP1, a list
>
> no....he meant to display OP1's value as a fraction like if OP1 = .75 it
> would display 3/4.
--
=====================================
= =
= Kirk Meyer (mailto:_@ibm.net) =
= http://www.bigfoot.com/~kirkmeyer =
= =
= "Set your affection on things =
= above, not on things on the =
= earth." Colossians 3:2 =
= =
=====================================
References: