• Axe Q&A 5 5
Currently:  

Author Topic: Axe Q&A  (Read 587267 times)

0 Members and 3 Guests are viewing this topic.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #180 on: March 20, 2011, 05:04:14 pm »
Oh, you mean a 3-character static pointer. Yeah, you can use them. And the name of a static pointer contributes nothing to the compiled program size. The only quirk about static pointers is that, when adding a pointer to string data in the form of:
Code: [Select]
:"String here"→Str___A zero byte is added to the end of the data automatically.
« Last Edit: March 20, 2011, 05:07:38 pm by Runer112 »

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: Axe Q&A
« Reply #181 on: March 20, 2011, 05:07:55 pm »
Code: (Axe) [Select]
:"This"→Str000
:"is"→Str001
:"a"→Str002
:"test."→Str003
:Data(Str000r,Str001r,Str002r,Str003r)→Str0        . The pointers to each string
:Disp {A*2+Str0}r        . Where A is the index of the string
So, it would work with that Data( line?
« Last Edit: March 20, 2011, 05:08:47 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Axe Q&A
« Reply #182 on: March 20, 2011, 05:14:02 pm »
when did 3 char. strings become available???
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #183 on: March 20, 2011, 05:15:00 pm »
Yes, that would work. The one thing you have to watch out for when using that method though is the 150 pointer/label limit, which you could hit pretty fast that way. Unfortunately, there isn't really a way around this except for giving the first string a pointer, not giving pointers to every other string, and manually calculating the pointers for all the other strings based on the pointer to the first string. Like:

Code: (Axe) [Select]
:"This"→Str00
:"is"[00]
:"a"[00]
:"test."[00]
:Data(Str00+0ʳ,Str00+5ʳ,Str00+8ʳ,Str00+10ʳ)→Str0
:Disp {A*2+Str0}ʳ

That could be pretty tedious, and getting anything wrong or changing one string would require you to adjust the data for every other string after it. You'll have to wait for Axe v2 to get around the 150 pointer limit. :P
« Last Edit: March 20, 2011, 06:49:59 pm by Runer112 »

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: Axe Q&A
« Reply #184 on: March 20, 2011, 05:18:46 pm »
Ok, I'll just stick to letters then :P
Thanks anyway
Vy'o'us pleorsdti thl'e gjaemue

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Axe Q&A
« Reply #185 on: March 20, 2011, 05:19:37 pm »
Oh crap!!!
And to think i was going to have each of the 151 Pokemon's name in a string...
* Happybobjr hugs runner.
How can I easily add a 0 byte to a string or what ever, 151 times?
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #186 on: March 20, 2011, 05:25:00 pm »
Happybobjr, I think your best bet for storing the names of Pokemon would be to make each name a constant size. As far as I can see, the names of Pokemon in the Generation I games were limited to 10 characters, so you could make each name be 10 bytes long. To display the names, you would have to copy the 10 bytes to another location in RAM where you can add an 11th byte, a zero in case the name was 10 characters long and didn't have a terminating zero already.
« Last Edit: March 20, 2011, 05:26:38 pm by Runer112 »

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Axe Q&A
« Reply #187 on: March 20, 2011, 05:46:11 pm »
Thank you.  Wish I didn't have to waste all those bytes though...
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Axe Q&A
« Reply #188 on: March 20, 2011, 06:47:31 pm »
Thank you.  Wish I didn't have to waste all those bytes though...

Actually, there's another way. Watch:

Thanks to Axe auto-opting static pointers,

Code: (Axe) [Select]
:"Bulbasaur"→Str000
:"Vsaur"
:[00]
:"Chucknorrissaur"
:[00]
:Data(Str000ʳ,Str000+10ʳ,Str000+16ʳ)

is exactly the same (in terms of size, time, code, etc.) as

Code: (Axe) [Select]
:"Bulbasaur"→Str000
:"Vsaur"→Str001
:"Chucknorrissaur"→Str002
:Data(Str000ⁿ,Str001,Str002)

except that it doesn't use up two more of those 151 pointers you're allowed to have. That solve your problem? :)
« Last Edit: March 20, 2011, 07:01:20 pm by Deep Thought »




Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #189 on: March 20, 2011, 06:52:31 pm »
Not sure why I decided to use offsets instead of static pointers in my example. Changed that. But yeah, that's pretty much what I suggested to Darl181 earlier. Although where are these offsets coming from? The +19 and the +6?


EDIT: Side note, why do you use the ⁿ symbol in your code Deep Thought? Why not use the ʳ that I use? :P
« Last Edit: March 20, 2011, 06:54:41 pm by Runer112 »

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Axe Q&A
« Reply #190 on: March 20, 2011, 07:02:57 pm »
Although where are these offsets coming from? The +19 and the +6?

That's supposed to be a 10 and a 16 :P Not typing well today.

EDIT: Side note, why do you use the ⁿ symbol in your code Deep Thought? Why not use the ʳ that I use? :P

Because I couldn't find that character anymore for some reason. How'd you find it?

EDIT: Got it: http://www.fileformat.info/info/unicode/char/02b3/index.htm
« Last Edit: March 20, 2011, 07:05:46 pm by Deep Thought »




Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #191 on: March 20, 2011, 07:11:10 pm »
I think I just spent a long time searching around http://www.fileformat.info/info/unicode/index.htm. I ended up compiling a file with a bunch of useful calculator symbols:

Code: [Select]

˪
L₁
L₂
L₃
L₄
L₅
L₆
r₁
r₂
r₃
r₄
r₅
r₆
Y₁
Y₂
Y₃
Y₄
Y₅
Y₆
Y₇
Y₈
Y₉
Y₀
°
∆List(



·


⁻¹
²
³
√(
³√(
ˣ√


ʳ
►Dec
►Frac
►Char
►DMS
►Tok
θ
α
β
γ
Δ
δ
ε
λ
μ
π
ρ
Σ
Φ
Ω

χ
σ
τ



ß
ˣ




×


ȳ

« Last Edit: March 20, 2011, 07:11:42 pm by Runer112 »

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Axe Q&A
« Reply #192 on: March 20, 2011, 07:30:46 pm »
Thank you! That is awesome!

And speaking of turtles, ALT+26 gives you the store arrow → :) It's really useful.

EDIT:

Code: [Select]


When do you use that? ???
« Last Edit: March 20, 2011, 07:36:13 pm by Deep Thought »




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: Axe Q&A
« Reply #193 on: March 20, 2011, 07:50:55 pm »
That's one of the tokens, iirc
I'm guessing he meant ► like ►Dec
Vy'o'us pleorsdti thl'e gjaemue

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Axe Q&A
« Reply #194 on: March 20, 2011, 07:54:15 pm »
So, while I was trying to do Alt+26 (Which doesn't work for me, btw), I accidentally did Alt+2602 and got ☂.  I then tried Alt+2603 and got ☃. :D

EDIT: Wow, way to get uber-ninja'd.  I even did my own ninja, me-thinks!
« Last Edit: March 20, 2011, 07:56:45 pm by graphmastur »