[A83] Re: GetTokString rom call


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

[A83] Re: GetTokString rom call




> Oops, also, I think that if you use GetTokString separately, you will not
> get properly formatted output, something more like
> rad()x or something... I think there's a call to untokenize a whole
> equation.

I think this block of code actually does the trick....It works exactly like
VPutS except it will display equations perfectly (I hope). I haven't found
any bugs yet. It keeps displaying until it reaches null. Thanks for you help!

;HL - pointer to input string data
ConvertToASCII:
Loop2:
 ld a,(hl)
 cp 0
 ret z
 push hl
 B_CALL GetTokString
 ld hl,OP3
 B_CALL VPutS
 pop hl
 ld a,(hl)
 inc hl
 cp 0bbh
 call z,IncHL
 cp 5ch
 jr c,Loop2
 cp 63h
 jr nc,Loop2
 inc hl
 jr Loop2

IncHL:
 inc hl
 ret




Follow-Ups: References: