Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: 133794m3r on December 18, 2012, 10:46:44 pm

Title: Modifying 2 bytes of a value from a value at once, generating an "invalid token"
Post by: 133794m3r on December 18, 2012, 10:46:44 pm
Took make it simple, this is the program itself, it is _insanely_ early days, and I was just using a simple string. Just to make sure that I was getting what I got from my c program on my computer. But it is saying "invalid token" at the line I've specified below. I'm trying to modify 2 bytes worth of data at once from the value at the address I specified. I'm going to make this into a subroutine and post it up on the subroutine thread once it's working 100% but it's already not working so well for me.

Code: [Select]
:.RC2
:"SILLY STRING"→Str1
:length(Str1)→L
:Disp L►Frac
:det(L)→S
:det(L)→C
:0→T
:L-1→M
:For(A,0,M)
:InData({Str1+A},T)→D
:If D≠0
:{C+D}{^r}++→{C+D){^r}
:End
:Else
:{Str1+A}→{S+A}
:0→{C}{^r}
:End
:End
:length(S)→L
:L-1→M
:For(A,0,M)
:Disp {S+A}►Frac
:Disp i,{C+A}{^r}►Dec
:End
Generated by SourceCoder (http://sc.cemetech.net)
© 2005-2012 Cemetech (http://www.cemetech.net)
Also to say why I'm doing this, instead of just using RLE or puCrunch, I like range coding, and figured it'd be a nice "first usable program" in axe.

Edit: Changed the posted thing to ascii from source coder, to hopefully make it clearer. Apparently I am the stupid today.
Title: Re: Modifying 2 bytes of a value from a value at once, generating an "invalid token"
Post by: leafy on December 18, 2012, 10:49:20 pm
The ^r^ is actually supposed to be the superscript r, found under 2nd+Apps(Angle).
Title: Re: Modifying 2 bytes of a value from a value at once, generating an "invalid token"
Post by: 133794m3r on December 18, 2012, 10:50:46 pm
Crap, SourceCoder didn't post it right... I used it to upload my code. It is the superscript r. I don't know why it didn't post it here... guess it's code isn't right for some reason... That or I don't know how to copy paste right...
Woops, seems I figured out what I did... it doesn't have SMF, I accidently clicked "InvisionBB", so that's why... but yeah... woops. It is a superscript.

Edit: If anyone can delete this entire thing that'd be great, I'm going to just lock it as I'm the stupid... :banghead:

P.S. Sorry for wasting your time anyonen who read this thing.