Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: Keoni29 on December 13, 2011, 01:47:39 pm

Title: How do I reserve ram for GDB?
Post by: Keoni29 on December 13, 2011, 01:47:39 pm
See description and title:
I wanna reserve ram for music editing. I use GDB1/me lost :P
Title: Re: How do I reserve ram for GDB?
Post by: Darl181 on December 13, 2011, 02:38:42 pm
You can Buff(#)→GDB1, where a space # bytes large is created and GDB1 points to it.
Title: Re: How do I reserve ram for GDB?
Post by: Keoni29 on December 14, 2011, 09:28:31 am
You can Buff(#)→GDB1, where a space # bytes large is created and GDB1 points to it.
How large can the buffer possibly be? Can I expand the buffer while running the program?
Title: Re: How do I reserve ram for GDB?
Post by: Darl181 on December 14, 2011, 10:55:22 am
Well, the buffer is simply blank space within the program, so normally you're limited to ~8811 bytes - final program size (unless you use crabcake/fullrene).  Also you can't use it fully in apps because it's SMC.
And for the second question, no.

Another way to do it that isn't as limited (just to the RAM) is to create an appvar to read/write from.
Title: Re: How do I reserve ram for GDB?
Post by: Hayleia on December 14, 2011, 11:12:40 am
Well, the buffer is simply blank space within the program, so normally you're limited to ~8811 bytes - final program size (unless you use crabcake/fullrene).
Isn't that only for code and not data ?

Also you can't use it fully in apps because it's SMC.
What is SMC ?
Title: Re: How do I reserve ram for GDB?
Post by: Darl181 on December 14, 2011, 11:16:27 am
Well, the buffer is simply blank space within the program, so normally you're limited to ~8811 bytes - final program size (unless you use crabcake/fullrene).
Isn't that only for code and not data ?
true.  Iirc there's still some problems with code being stored at the end, tho.
Quote
Also you can't use it fully in apps because it's SMC.
What is SMC ?
Self-modifying-code.  The apps are in Archive and because of the nature of the flash chip you have to wipe a whole page to write to it properly.
Title: Re: How do I reserve ram for GDB?
Post by: Keoni29 on December 15, 2011, 12:42:08 pm
I guess reading and writing to appvars solves all my problems. I want to implement a pattern editor so that you can edit the sequence of patterns to reduce both the size of the file and the amount of work that you put in it. Since patterns have variable sizes it's gonna be hard to put them all in a buffer. The following question remains: How do I create a variable amount of appvars? I have to add something (a number) to the end of the string that refers to the appvar.
Title: Re: How do I reserve ram for GDB?
Post by: Darl181 on December 15, 2011, 02:37:31 pm
You mean, something like editing
"appvLvl01"
so it says
"appvLvl02"
..?
You just edit the string like it's a normal GDB, Pic, etc.
The string is just one token after the other, spelling out whatever it's supposed to.
So, one could just do something like this:
Spoiler For Spoiler:
"appvDSLvl01"→Str0L
.A is number to store to string, from 00 to 99
A/10+48→{Str0L+6}
.first digit
A^10+48→{Str0L+7}
.second digit
And it should work.
Keep in mind how many bytes in you are, tho...it might help to do it in a test program first :P

btw it's +48 because 0 is the 48th token, there's technical stuff but it works.
Title: Re: How do I reserve ram for GDB?
Post by: Keoni29 on December 16, 2011, 08:02:07 am
You mean, something like editing
"appvLvl01"
so it says
"appvLvl02"
..?
You just edit the string like it's a normal GDB, Pic, etc.
The string is just one token after the other, spelling out whatever it's supposed to.
So, one could just do something like this:
Spoiler For Spoiler:
"appvDSLvl01"→Str0L
.A is number to store to string, from 00 to 99
A/10+48→{Str0L+6}
.first digit
A^10+48→{Str0L+7}
.second digit
And it should work.
Keep in mind how many bytes in you are, tho...it might help to do it in a test program first :P

btw it's +48 because 0 is the 48th token, there's technical stuff but it works.
I guess that 99 patterns will be plenty.
Title: Re: How do I reserve ram for GDB?
Post by: Yeong on December 16, 2011, 08:06:38 am
or here's the one that Runer gave me long time ago.

Code: [Select]
:"appvS00"→Str0
:D^10*256+(D/10)+[sub]E[/sub]3030→{Str0+2}[sup]r[/sup]
This modifies the 00 to number according to D.
Title: Re: How do I reserve ram for GDB?
Post by: Keoni29 on December 16, 2011, 01:25:25 pm
or here's the one that Runer gave me long time ago.

Code: [Select]
:"appvS00"→Str0
:D^10*256+(D/10)+[sub]E[/sub]3030→{Str0+2}[sup]r[/sup]
This modifies the 00 to number according to D.
I think this one is more optimized actually:
Code: [Select]
"appvDSLvl00"→Str0L
A/10+48→{Str0L+6}
A^10+48→{Str0L+7}
Title: Re: How do I reserve ram for GDB?
Post by: Darl181 on December 16, 2011, 02:31:11 pm
Well I'm not sure, it's from runer after all :P
looking at it...
D^10*256+(D/10)+E3030→{Str0+2}r

Wow I wouldn't have thought of this...not off the ball at least.  What this does is it makes a two-byte number, fixes both tokens at once (E30 is 48) then sticks it in the string.
O.O

I don't know which is smaller compiled, but that's pretty epic anyway.
Title: Re: How do I reserve ram for GDB?
Post by: Yeong on December 17, 2011, 04:52:34 pm
Well I'm not sure, it's from runer after all :P
looking at it...
D^10*256+(D/10)+E3030→{Str0+2}r

Wow I wouldn't have thought of this...not off the ball at least.  What this does is it makes a two-byte number, fixes both tokens at once (E30 is 48) then sticks it in the string.
O.O

I don't know which is smaller compiled, but that's pretty epic anyway.
Oh, that's what it was doing XD
Honestly, I couldn't understand this code D: