Author Topic: How do I reserve ram for GDB?  (Read 5456 times)

0 Members and 3 Guests are viewing this topic.

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
How do I reserve ram for GDB?
« on: December 13, 2011, 01:47:39 pm »
See description and title:
I wanna reserve ram for music editing. I use GDB1
* Keoni29 lost :P
If you like my work: why not give me an internet?








Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: How do I reserve ram for GDB?
« Reply #1 on: December 13, 2011, 02:38:42 pm »
You can Buff(#)→GDB1, where a space # bytes large is created and GDB1 points to it.
Vy'o'us pleorsdti thl'e gjaemue

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: How do I reserve ram for GDB?
« Reply #2 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?
If you like my work: why not give me an internet?








Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: How do I reserve ram for GDB?
« Reply #3 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.
Vy'o'us pleorsdti thl'e gjaemue

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: How do I reserve ram for GDB?
« Reply #4 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 ?
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: How do I reserve ram for GDB?
« Reply #5 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.
Vy'o'us pleorsdti thl'e gjaemue

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: How do I reserve ram for GDB?
« Reply #6 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.
If you like my work: why not give me an internet?








Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: How do I reserve ram for GDB?
« Reply #7 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.
« Last Edit: December 15, 2011, 02:38:18 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: How do I reserve ram for GDB?
« Reply #8 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.
If you like my work: why not give me an internet?








Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: How do I reserve ram for GDB?
« Reply #9 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.
Sig wipe!

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: How do I reserve ram for GDB?
« Reply #10 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}
If you like my work: why not give me an internet?








Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: How do I reserve ram for GDB?
« Reply #11 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.
« Last Edit: December 16, 2011, 02:31:23 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: How do I reserve ram for GDB?
« Reply #12 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:
Sig wipe!