[A83] Re: just two simple questions
[Prev][Next][Index][Thread]
[A83] Re: just two simple questions
Very long time ago I hacked the code below. (ref.: ASMGURU)
83 only I think?
Andreas Hjordt
; zexpr.z80
; reinstall ion to avoid err:syntax
.nolist
#include "ion.inc"
.list
_formreal =3D 4d32h
#ifdef ti83p
.org progstart-2
.db $bb,$6d
#else
.org progstart
#endif
ret
jr nc,start
.db "y(x)",28,"Ans or expr(str1)",28,"Ans",0
Start:
ld hl,data ; point hl to data
rst 20h ; move 9 bytes starting at hl to op1 (_mov9toop1)
rst 10h ; lookup the element in op1 (_findsym)
ret c ; return if the element in op1 dosen't exist
call parseinp ; ? magic
ld a,16 ; load reg. a with max. lenght of outputted string
rst 18h ;*push op1 on to the fpst (_pushrealo1)
call _formreal ; convert fp# in op1 to ascii string starting at op3 =
with max.
; lengt detmined by # in reg. a
ld hl,op3 ; point hl to string returned by _formreal
call _puts ; dispplay zero terminated string pointed to by reg. hl
bcall(_zerooop1) ;*sets reg op1 =3D all 0's
ld a,72h ;*a =3D token # or asciit char # [65;91]
ld (OP1+1),a ;*op1+1 =3D a
call _stoother ;*store 1. fpst entry to element in op1
jp _getkey ; halt for keypress and return
data:
.db equobj,tvarequ,ty1,0
; .db strngobj,tvarstrng,tstr1,0
; the zero termination is needed because of the way _findsym works
let =3D 41h
vtoks =3D let+27
tvarequ =3D vtoks+2 ; 5eh
equobj =3D 03h
ty1 =3D 10h ; Y1
strngobj =3D 0004h
tvarstrng =3D 00aah
tstr1 =3D 0000h
_zerooop1 =3D 428eh
parseinp =3D 4e8ch
_stoother =3D 4ed8h
.end
end
----- Original Message -----=20
From: <KWarp9@cs.com>
To: <assembly-83@lists.ticalc.org>
Sent: Tuesday, March 27, 2001 8:38 PM
Subject: [A83] just two simple questions
>=20
> Is there really not one who can help me with these problems (both for =
the=20
> TI-83)?=20
>=20
> 1. I know that with the romcall "_Formerealtok" or "_formreal" I can =
convert=20
> a floating point number to a string, but I haven't been able to find a =
> romcall or any other way to turn this operation around, so instaed of =
making=20
> a string out of a floating point number, I want to make a floating =
point=20
> number out of a string. Please help.
>=20
> 2. I am a frequent user of SOS and Ashell, because the programms I =
create are=20
> always rather large. But I recently came upon a program with its own =
loader=20
> that must have done the same as one of those shells, because the =
programm was=20
> too large for zasmload. I am really interrested in creating a loader =
like=20
> that myself. Please help.
>=20
>=20
References: