Re: A86: math crap
[Prev][Next][Index][Thread]
Re: A86: math crap
In a message dated 11/16/98 20:51:40 Eastern Standard Time,
ti_86_asm@hotmail.com writes:
> I need to know the best way to ask for a input
> and how to *'s that by .007687
>
> Thanx
use _asap_ind and _exec_pg3 like this:
ld a,$0d ;input as #
ld (_asap_ind),a ;tell calc to do that
call _exec_pg3 ;get input
after that, the input is stored in OP1
then store that value in floating point format, and copy that to one of the
ops, then do rst 28h. like this:
;damn, that'a a lot of rst's!!
rst 18h ;save op1
ld hl,number ;hl points to number
rst 20h ;move number to op1
rst 08h ;move op1 to op2
call $479f ;retrieve op1
rst 28h ;multiply op1 by op2
;at this point, op1 = the input * .007687
number:
.db $00,$fd,$fb,$76,$87,$00,$00,$00,$00,$00
this is untested, but it should work.