Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: FinaleTI on February 22, 2011, 09:37:30 am

Title: Referencing Text() Coordinates
Post by: FinaleTI on February 22, 2011, 09:37:30 am
When you use Text(20,30), I understand that it stores 20 to somewhere that denotates the Xpos, and 30 to somewhere that denotates the Ypos.

What I would like to know is what memory location are those coordinates stored to?
Title: Re: Referencing Text() Coordinates
Post by: Runer112 on February 22, 2011, 03:52:13 pm
From ti83plus.inc:

Code: [Select]
penCol equ 86D7h
penRow equ 86D8h


Also, a little-known fact regarding printing text at constant coordinates:
Code: [Select]
.Coordinate=Y*256+X
Text(30*256+20)
Text "Stuff"
Is 7 bytes smaller than:
Code: [Select]
Text(20,30,"Stuff")

The same applies for text drawn to the home screen:
Code: [Select]
.Coordinate=X*256+Y
Output(20*256+30)
Disp "Stuff"
Is smaller than:
Code: [Select]
Output(20,30,"Stuff")
By even more, 8 bytes.
Title: Re: Referencing Text() Coordinates
Post by: ztrumpet on February 22, 2011, 06:36:32 pm
The same applies for text drawn to the home screen:
Code: [Select]
.Coordinate=X*256+Y
Output(20*256+30)
Disp "Stuff"
Is smaller than:
Code: [Select]
Output(20,30,"Stuff")
By even more, 8 bytes.
And to think Quigibo almost took Output(one argument) out at one point...
Title: Re: Referencing Text() Coordinates
Post by: Deep Toaster on February 22, 2011, 06:53:47 pm
From ti83plus.inc:

Code: [Select]
penCol equ 86D7h
penRow equ 86D8h


Also, a little-known fact regarding printing text at constant coordinates:
Code: [Select]
.Coordinate=Y*256+X
Text(30*256+20)
Text "Stuff"
Is 7 bytes smaller than:
Code: [Select]
Text(20,30,"Stuff")

The same applies for text drawn to the home screen:
Code: [Select]
.Coordinate=X*256+Y
Output(20*256+30)
Disp "Stuff"
Is smaller than:
Code: [Select]
Output(20,30,"Stuff")
By even more, 8 bytes.

Why are the two different (7 bytes vs. 8 bytes)? I thought it did pretty much the same thing, but just to a different address.
Title: Re: Referencing Text() Coordinates
Post by: squidgetx on February 23, 2011, 03:12:36 pm
Runer, what do you mean by Text "Stuff"? Do you mean Text("Stuff")? (Which doesn't seem to work btw) I mean, how do you get Text without parentheses?
Title: Re: Referencing Text() Coordinates
Post by: FinaleTI on February 23, 2011, 04:55:05 pm
Runer, what do you mean by Text "Stuff"? Do you mean Text("Stuff")? (Which doesn't seem to work btw) I mean, how do you get Text without parentheses?
2nd + PRGM + 6. It's normally DrawF.
Title: Re: Referencing Text() Coordinates
Post by: DJ Omnimaga on February 23, 2011, 05:19:34 pm
From ti83plus.inc:

Code: [Select]
penCol equ 86D7h
penRow equ 86D8h


Also, a little-known fact regarding printing text at constant coordinates:
Code: [Select]
.Coordinate=Y*256+X
Text(30*256+20)
Text "Stuff"
Is 7 bytes smaller than:
Code: [Select]
Text(20,30,"Stuff")

The same applies for text drawn to the home screen:
Code: [Select]
.Coordinate=X*256+Y
Output(20*256+30)
Disp "Stuff"
Is smaller than:
Code: [Select]
Output(20,30,"Stuff")
By even more, 8 bytes.
O.O I didn't know you could use Text "Stuff" syntax
Title: Re: Referencing Text() Coordinates
Post by: squidgetx on February 23, 2011, 05:42:29 pm
Huh. Well, you learn something new every day!
/me goes off to optimize

Wow, this opt is incredible O.o
Title: Re: Referencing Text() Coordinates
Post by: Deep Toaster on February 24, 2011, 12:06:00 am
O.O I didn't know you could use Text "Stuff" syntax

Yep, it's like Disp "STUFF", but with graph text.