All the standard TI-Basic Number to string implementations have a bit to be desired so I figured I'd try to write up a quick on that could be manually typed in as hex for basic programmers to use. After failing because I was never very good at ASM MateoC came up with the following which I figured I'd share.
Code:
HEX for use with ExecASM or hand typed AsmPrgm input:
210000EF2443D5EFB143D1EF6949EF524BEFAB49EF6C49EF9043EFBF4AC9
SC3 project here: http://sc.cemetech.net/?hash=gTRaP+uRqzBFhgHCGHbwc6pQtLIl
I feel like there should be a simpler method using bcall(_FormBase) but I'm not sure how you'd go from the string starting at OP3 to Ans or a string var so I'll leave it there.
EDIT:
And because I couldn't give up on a good idea I came up with this as an alternate solution, but the alternate solution has the problem that the decimal point is displayed as the token CubicReg because of reasons that I couldn't find a good solution to.
Code:
Code:
.nolist
#include "ti83plus.inc"
.list
.org userMem-2
.db $BB,$6D
; Program code goes here
ld hl,0
bcall(_createtempstring)
push de
bcall(_PushRealO4)
pop de
bcall(_SetEmptyEditPtr)
bcall(_ansname)
bcall(_rclvartoedit)
bcall(_closeeditequ)
bcall(_PopRealO1)
bcall(_StoAns)
ret
HEX for use with ExecASM or hand typed AsmPrgm input:
210000EF2443D5EFB143D1EF6949EF524BEFAB49EF6C49EF9043EFBF4AC9
SC3 project here: http://sc.cemetech.net/?hash=gTRaP+uRqzBFhgHCGHbwc6pQtLIl
I feel like there should be a simpler method using bcall(_FormBase) but I'm not sure how you'd go from the string starting at OP3 to Ans or a string var so I'll leave it there.
EDIT:
And because I couldn't give up on a good idea I came up with this as an alternate solution, but the alternate solution has the problem that the decimal point is displayed as the token CubicReg because of reasons that I couldn't find a good solution to.
Code:
.nolist
#include "ti83plus.inc"
.list
.org userMem-2
.db $BB,$6D
; Program code goes here
bcall(_RclAns)
bcall(_EOP1NotReal)
LD A,$0A
bcall(_FormEReal)
;Push BC
;POP HL
LD HL,$0A
bcall(_createtempstring)
LD HL,OP3
INC DE
INC DE
bcall(_StrCopy)
LD HL,OP4
RST 20h
bcall(_StoAns)
ret