This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's Your Projects subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Project Ideas/Start New Projects => Your Projects
Author Message
Xeda112358


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 15 Sep 2011 01:59:29 pm    Post subject:

First, I thought that I had already posted about Grammer here and I was just looking to update the post! But since I haven't, I will start from the beginning!

So what is Grammer? Grammer is a programming language that uses the TI-OS program editor and tokens. It is still under construction, but it has plenty of features. This isn't Axe, this isn't BASIC, and this isn't Assembly. It has key differences that make Grammer its own unique programming option.

So what sets it apart from the other programming languages? Grammer is faster and and has more graphics ability than BASIC, it is easier and smaller than Assembly, and the programs are usually smaller than Axe programs. In some areas, Grammer has better and easier to use graphics than any of the other programming languages. Plus, though BASIC has a lot more advanced math capabilities, Grammer is a strong contender in math ability and ease of use compared to Axe and Assembly.

So what exactly can you do with Grammer? I like using Grammer to test algorithms and make simple games. Grammer offers a variety of capabilities:

Code:

-53 16-bit vars plus a System Var (usually for math carry over)
-String support
-Commenting
-Pressing [ON] to break a program
-Labels
-Sub Routines (in code or other program)
-Byte/Word reading and writing
-Accesing TI-OS vars
-Executing other Grammer programs
-Sprites
  *These can be multiples of 8 pixels wide
  *There are modes to draw to pixel or aligned coordinates
-Rectangle drawing (10 fill methods)
-Circle drawing (3 methods)
-Pixel plotting (3 methods) and testing
-If blocks
-Loop related commands:
  While
  Repeat
  For(
  Goto
  Return
  Any size labels
-16-bit math:
  addition         (carry=1-bit overflow)
  subtraction      (carry=1-bit overflow)
  division         (carry=16-bit remainder)
  multiplication   (carry=16-bit overflow)
  square           (carry=16-bit overflow)
  square root      (carry=remainder)
  square root (rounded)
  negative
  min(
  max(
  abs(
  sin(
  cos(
  rand
  gcd(
  lcm(
   nCr
-Boolean Logic:
  Less than
  Less than or equal
  equal
  not equal
  greater than
  greater than or equal
-Text output
  This includes displaying numbers
    This has a default of displaying in base 10, but can display in other bases, too.
-getKey

And what have I done with Grammer?
I made a division routine! ...Accurate to 239 digits in 31 bases.
Algorithms for drawing circles (including filled circles)
A tilemapper
A tilemap editor
Multiple picture viewer (see parts of several pics at once)
Some mini games like BlockEater, MatchMe, Chase, GTunnel
An nCr algorithm (which I used later for pseudocode)
And quite a few other miscellaneous programs!

So now here is where I need your help: I need ideas for new commands and what tokens I should use.

For now, here are a few screenies and the update I was going to post. I added "Tangent(" today for shifting the screen. The syntax is Tangent(#ofShifts,Direction
#ofShifts is the number of pixels to shift and Direction is 1 for down, 2 for right, 4 for left, and 8 for up. If you want to shift up and left, just use 12 (8+4).

So the attachment is the updated Grammer with the Tunnel example. For the readme and other examples, just go to TICalc.
Back to top
Xeda112358


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 30 Jan 2012 10:11:11 pm    Post subject:

So much has happened since that last post, I don't know where to begin. First, Grammer is now an App and shell. The parser has been rewritten to be even faster, there is now support for sound, grayscale, tilemapping, better sprite inputs, better string support, better variable managing (such as creating new programs/appvars), particle effects, and much much more. Grammer 2 (the App) has won zContest 2011 and made news on TICalc.org and Omimaga. There is a board setup over on Omnimaga for questions and frequent updates, but feel free to ask here, too! (I check here several times a day) Anyways, enough of the word play, here are some screenies and links:
Grammer 2 download
Games/Examples
Back to top
Xeda112358


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 04 Feb 2012 09:46:52 am    Post subject:

So I started work on making it support 32-bit stuff. I am not sure if I will fully incorporate 32-bit support, but I imagine it will be useful and definitely put it at a new level. For those that don't know what it means to be 32-bit, in this case, instead of using 0 to 65535, you will be able to use 0 to 4294967295. The trouble will be in rewriting these commands:

lcm(
gcd(
nCr
>Frac (this is used to factor a number or determine its primality)


So pretty much, the more number theoretic stuff will have to be completely rewritten. Also, 32-bit mode will be slower than 16-bit mode, but I've no clue by how much. My estimate is that math routines will average about 1.5 to 3 times longer. In other words, instead of 1000 multiplications per second, you might only get 500 :/
Back to top
Xeda112358


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 10 Mar 2012 10:44:58 am    Post subject:

I have NOT added 32-bit math, but I have added support for displaying 32-bit numbers. As you may know, displaying numbers allows for an optional argument to display a number in a given base and this still holds. The PDF included details info on how to do this, so have fun! I added this because YeongJin Nam requested it for an RPG remake he is working on. it is fairly awesome so far with great animations and whatnot. He already has at least 2 of the tilemaps working and they are pretty large, scrolling maps.

Anyways, there are more great additions, mostly for graphical effects. For example, built in flames are no available, so you can have some pretty neat death scenes and whatnot. Better, though, is the grayscale support! That is right-- grayscale. It is smooth, 3 level gray that is easy to use. You simply define a gray buffer and black buffer and every time you update the LCD, it does half a gray cycle. It is so easy, in fact, that here is an example of enabling grayscale:

Code:

π9872→Z    ;This is an address that points to an available 768-byte buffer (same size as the graph screen)
Disp ºZ    ;This defines the gray buffer as that pointed to by Z

Disp ' will likewise set the Black buffer and Disp by itself will point them both to the same buffer. Since black will override gray, this will result in black and white with no gray.

Because of this change, most of the drawing commands will now accept an extra argument pointing to specific buffers. For example, using the above, Line(0,0,8,8,1 will draw an 8x8 filled rectangle on the main buffer (black). However, Line(0,0,8,8,1,Z will draw it to the gray buffer instead.

So, if you want to give it a try, here is the TICalc download, again Very Happy
http://www.ticalc.org/archives/files/fileinfo/442/44276.html

EDIT: Also, screenies are a must, yes?


Last edited by Guest on 10 Mar 2012 11:33:56 am; edited 1 time in total
Back to top
Xeda112358


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 25 Mar 2012 08:09:24 am    Post subject:

Hey folks, I have some more useful updates, but I really need to rewrite the readme. What I have added:

I am going to have to rewrite this whole document because it is a mess with
inserting new commands everywhere. Anyways, here are useful additions since the
last update:
-The user can now use lowercase letters instead of, say, A'. This is the same
size, but looks cleaner.
-You can now store Ɵ' and Ans at the same time by defining both vars after →.
For example, R*P→aA will store the upper 16-bits of the multiplication in a and
the lower 16-bits in A.
-Output(2 is the Text( mode for drawing the fixed font to pixel coordinates
-Text( without arguments will return the coordinates as Ans=Y, Ɵ'=X
-For the coordinates in a Text( command, you can do relative placement. For
example, if you want text at 2 pixels below the last drawn text:

Code:
:Text(+2,,"2

The +2 draws it down 2 pixel from the last location and the empty argument for X
means it uses the previous X coordinate. Useful for subscripts and super scripts
-You can set the Text( coordinates by using two arguments for Y and X. For
example:

Code:
:Text(56,0


I even made a program to find annihilators for my class on differential equations using this fun text stuff Smile
So the latest download:
Grammer v2.25.03.12
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement