Author Topic: Grammer Q&A  (Read 56279 times)

0 Members and 1 Guest are viewing this topic.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Grammer Q&A
« on: November 08, 2011, 11:27:59 am »
I figured a Questions and Answers topic for Grammer might be useful now that Grammer is picking up new programmers :)
So if anybody has questions, feel free to ask! I will try to be on often enough to answer questions with code or comments :D

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer Q&A
« Reply #1 on: November 08, 2011, 11:32:21 am »
:D
How long should the interrupt code be :D
Sig wipe!

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer Q&A
« Reply #2 on: November 08, 2011, 11:39:27 am »
Hmm, I'm not actually sure :/ I don't seem to have a problem with having multiple DispGraphs in there (I tried 6) and those are the slowest commands. I will have to test code to see what works and what doesn't...

EDIT: That is a very good question, by the way XD

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer Q&A
« Reply #3 on: November 08, 2011, 11:41:18 am »
I'm asking this because most of the time, it just crashed if I put too much in interrupt label D:
Sig wipe!

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer Q&A
« Reply #4 on: November 08, 2011, 11:44:11 am »
Ah, okay. I've only ever used interrupts to toggle two buffers, so I only had something like this as my interrupt:
Code: [Select]
DispGraphH
DispGraphI
End

Offline Stefan Bauwens

  • Creator of Myst 89 - סטיבן
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1799
  • Rating: +162/-24
  • 68k programmer
    • View Profile
    • Portfolio
Re: Grammer Q&A
« Reply #5 on: November 08, 2011, 11:53:06 am »
Now I come to think of it, Grammer should actually have it's own forum.(I don't think it does, right?)


Very proud Ticalc.org POTY winner (2011 68k) with Myst 89!
Very proud TI-Planet.org DBZ winner(2013)

Interview with me

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer Q&A
« Reply #6 on: November 08, 2011, 12:22:52 pm »
No, it doesn't yet XD That is why I have been avoiding making a topic like this >.>

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: Grammer Q&A
« Reply #7 on: November 15, 2011, 12:38:25 pm »
Ok, I guess my biggest question is how do I make an array that I can access?

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer Q&A
« Reply #8 on: November 15, 2011, 12:46:25 pm »
First, you can create program or appvar like this:
Send(size,"UTEMP->B
This will create appvar TEMP and store it into pointer B.

and then:
B[4,4,4,4,4,4,4,4,4,4

This will store 4 into first 10 bytes of that appvar TEMP.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer Q&A
« Reply #9 on: November 15, 2011, 12:47:44 pm »
Well if you wanted to create a 128 byte array for temporary storage, I would create a TempProg (the prefix byte is V or 6). Since Send( will let you do this and it returns the pointer to the var, this is what you would want to do:
Code: [Select]
Send(128,"6Temp→Z     ;Z now points to the Array
Lowercase is allowed in the name and weird symbols are encouraged to avoid conflicting with preexisting programs
Now you can use Z as a pointer. There are several commands that might be useful:
Code: [Select]
int(Z,A will write the lower 8-bits of A to the memory location Z
iPart(Z,A will write A to the memory location Z in little endian
(Z will read the byte at Z
{Z will read the word (little endian) at Z
IS>(Z will read the byte at Z and then increment Z
There are also various other commands if you need other specific things done...


EDIT:Also what Yeong said ^_^

Offline Scipi

  • Omni Kitten Meow~ =^ω^=
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1547
  • Rating: +192/-3
  • Meow :3
    • View Profile
    • ScipiSoftware
Re: Grammer Q&A
« Reply #10 on: November 15, 2011, 12:48:50 pm »
Ok, so how would I access the information?

would B + 1 get me the 2nd byte? Also, how would I add more data to the end?

Edit: Ninja'd :P
« Last Edit: November 15, 2011, 12:49:25 pm by HOMER-16 »

Imma Cat! =^_^= :3 (It's an emoticon now!)
Spoiler For Things I find interesting:
Spoiler For AI Programming:
Spoiler For Shameless advertising:

Spoiler For OldSig:





Spoiler For IMPORTANT NEWS!:
Late last night, Quebec was invaded by a group calling themselves, "Omnimaga". Not much is known about these mysterious people except that they all carried calculators of some kind and they all seemed to converge on one house in particular. Experts estimate that the combined power of their fabled calculators is greater than all the worlds super computers put together. The group seems to be holding out in the home of a certain DJ_O, who the Omnimagians claim to be their founder. Such power has put the world at a standstill with everyone waiting to see what the Omnimagians will do...

Wait... This just in, the Omnimagians have sent the UN a list of demands that must be met or else the world will be "submitted to the wrath of Netham45's Lobster Army". Such demands include >9001 crates of peanuts, sacrificial blue lobsters, and a wide assortment of cherry flavored items. With such computing power stored in the hands of such people, we can only hope these demands are met.

In the wake of these events, we can only ask, Why? Why do these people make these demands, what caused them to gather, and what are their future plans...

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer Q&A
« Reply #11 on: November 15, 2011, 12:49:41 pm »
accessing byte XD
if it's 8bit number, do (B+1)
if it's 16bit number, do {B+1}
EDIT: didn't see that post XP
« Last Edit: November 15, 2011, 12:50:24 pm by TBO_Yeong »
Sig wipe!

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Grammer Q&A
« Reply #12 on: November 15, 2011, 12:50:11 pm »
Adding more data to the end... there is not a command yet (I plan to eventually add that as augment(, though).
And yes, B+1 will access the second byte :)

Also, the ) and } are solely for aesthetics. Grammer doesn't actually recognise them XD

Offline BlakPilar

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 734
  • Rating: +44/-1
    • View Profile
Re: Grammer Q&A
« Reply #13 on: November 15, 2011, 12:53:18 pm »
What are the differences between the app version and the program version? (or is there only the app version now?)

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Grammer Q&A
« Reply #14 on: November 15, 2011, 12:53:32 pm »
Also, the ) and } are solely for aesthetics. Grammer doesn't actually recognise them XD
But it looks nice and clean that way :P
Sig wipe!