### Author Topic: Grammer 2-The APP  (Read 131002 times)

0 Members and 1 Guest are viewing this topic.

#### aeTIos

• Nonbinary computing specialist
• LV12 Extreme Poster (Next: 5000)
• Posts: 3915
• Rating: +184/-32
##### Re: Grammer 2-The APP
« Reply #150 on: December 12, 2011, 07:40:27 am »
comment I guess?
I'm not a nerd but I pretend:

#### Sorunome

• Fox Fox Fox Fox Fox Fox Fox!
• Support Staff
• LV13 Extreme Addict (Next: 9001)
• Posts: 7920
• Rating: +374/-13
• Derpy Hooves
##### Re: Grammer 2-The APP
« Reply #151 on: December 12, 2011, 09:28:09 am »
no, comments are two slashes at the beginning of the line.
 THE GAMEAlso, check out my websiteIf OmnomIRC is screwed up, blame me!Click here to give me an internet!

#### Xeda112358

• they/them
• Project Author
• LV12 Extreme Poster (Next: 5000)
• Posts: 4704
• Rating: +719/-6
• Calc-u-lator, do doo doo do do do.
##### Re: Grammer 2-The APP
« Reply #152 on: December 12, 2011, 09:57:50 am »
fwahahaha I was showing off the fact that using this command, you can make a compiler in Grammer code

#### Yeong

• Not a bridge
• LV12 Extreme Poster (Next: 5000)
• Posts: 3739
• Rating: +278/-12
• Survivor of Apocalypse
##### Re: Grammer 2-The APP
« Reply #153 on: December 12, 2011, 11:15:18 am »

I'm confused now XP
Sig wipe!

#### Xeda112358

• they/them
• Project Author
• LV12 Extreme Poster (Next: 5000)
• Posts: 4704
• Rating: +719/-6
• Calc-u-lator, do doo doo do do do.
##### Re: Grammer 2-The APP
« Reply #154 on: December 12, 2011, 12:23:23 pm »
Oh, the LD was just purely data. I used the inString( command to search the data for a match. So if you abuse this, you could make a compiler!

#### Yeong

• Not a bridge
• LV12 Extreme Poster (Next: 5000)
• Posts: 3739
• Rating: +278/-12
• Survivor of Apocalypse
##### Re: Grammer 2-The APP
« Reply #155 on: December 12, 2011, 07:33:24 pm »
ah. XP
I was scared for a second that now Grammer's AI had advanced enough that it can compile its own code now
Sig wipe!

#### Xeda112358

• they/them
• Project Author
• LV12 Extreme Poster (Next: 5000)
• Posts: 4704
• Rating: +719/-6
• Calc-u-lator, do doo doo do do do.
##### Re: Grammer 2-The APP
« Reply #156 on: December 14, 2011, 08:42:06 am »
I am not sure if I mentioned this, but I have also added the length( command by request (it was a nice idea). It can do two things:
length(<<varname>> will return the size of a variable (archived or RAM) and it returns the pointer to the data in theta prime
length('DataStart,Size,LineNumber[,linebyte
This will let you read lines in a program for example. So if A was the pointer to the program and you wanted to read  line 7:
Code: [Select]
length('A,0,7The default linebyte is 63 (the byte the OS uses for BASIC programs for a newline). The optional argument lets you read data that has a different byte separating them. For example, if you have a space between words and you want to read each word, then you can use 41 as the line byte.

Also, in the above code, I use 0 as the size because that is translated to 65536. If you were to use the size of the program, the search would be limited to the program.

#### Xeda112358

• they/them
• Project Author
• LV12 Extreme Poster (Next: 5000)
• Posts: 4704
• Rating: +719/-6
• Calc-u-lator, do doo doo do do do.
##### Re: Grammer 2-The APP
« Reply #157 on: December 24, 2011, 04:40:52 pm »
I am not finished updating, but it has been a while since the last update so here goes. Since the last version, I have added:
length(<<varname>>
length('DataStart,Size,LineNumber[,linebyte
inString(Offset,SearchStart,SearchString
conj(Duration,'Value
conj(Duration,DataLoc,DataSize
conj('Time,'Freq Uses the Axe sound routine.
conj('Time,DataLoc,Size Uses the Axe sound routine but it reads data directly to save time (intead of converting numbers on the fly). Size is the size of the data in words, not bytes.

Some stuff that I haven't mentioned in previous posts:
>Frac is used to factor and test for primality. Its outputs are the smallest factor in Ɵ' and the result of Ans divided by that in Ans. So for example, if the output Ɵ' is 1, that means the number is prime. If you did this:
Code: [Select]
221>FracAns would be 17 and Ɵ' would be 13.

I have also added support for running assembly programs with Grammer. So if you want to run an assembly program from the homescreen without Asm( in front of it, you can. Plus, if you do it that way, you can run it from Archive, too. On top of that, I decided to detect ION, MirageOS, and DoorsCS programs. If you try to run those, you will get a custom error message.
The real use, though, is that Assembly programmers can now build assembly programs using a special Grammer header and they can use the calls from Grammer. Unfortunately, while there are over 100 available calls, I have only had time to document about half of them.

So I hope y'all enjoy the new stuff, I hope you make new proggies, and I will see if I can get any useful assembly programs going. I won't have internet for a little while, so I may not be able to respond immediately, but feel free to ask questions.

I feel like I missed something other than the gravity engine buried somewhere in the program...

#### Sorunome

• Fox Fox Fox Fox Fox Fox Fox!
• Support Staff
• LV13 Extreme Addict (Next: 9001)
• Posts: 7920
• Rating: +374/-13
• Derpy Hooves
##### Re: Grammer 2-The APP
« Reply #158 on: December 24, 2011, 05:35:04 pm »
 THE GAMEAlso, check out my websiteIf OmnomIRC is screwed up, blame me!Click here to give me an internet!

#### Yeong

• Not a bridge
• LV12 Extreme Poster (Next: 5000)
• Posts: 3739
• Rating: +278/-12
• Survivor of Apocalypse
##### Re: Grammer 2-The APP
« Reply #159 on: December 26, 2011, 04:30:47 pm »
Sig wipe!

#### Sorunome

• Fox Fox Fox Fox Fox Fox Fox!
• Support Staff
• LV13 Extreme Addict (Next: 9001)
• Posts: 7920
• Rating: +374/-13
• Derpy Hooves
##### Re: Grammer 2-The APP
« Reply #160 on: December 26, 2011, 04:32:16 pm »
* Sorunome just noticed that he forgot to load that on his calc!
 THE GAMEAlso, check out my websiteIf OmnomIRC is screwed up, blame me!Click here to give me an internet!

#### Xeda112358

• they/them
• Project Author
• LV12 Extreme Poster (Next: 5000)
• Posts: 4704
• Rating: +719/-6
• Calc-u-lator, do doo doo do do do.
##### Re: Grammer 2-The APP
« Reply #161 on: December 28, 2011, 07:52:57 pm »
Okay, so three things:
1) I forgot to mention that I added the commands and , or , xor , and not(. These just perform the basic bit logic operations. For example, 5 and 6 will return 4
2) I added a new particle command that will allow you to convert a rectangular region of the screen to particles.
P▶Rx('Y,X,Height,Width
3) I have a new update that I am sure will be loved, but may cause yeong and Sorunome to go back and add in some more delays to their programs. Maybe.

Pretty much, I have been working for the past 2 days rewriting the parser and it was worth it. I made the number converting routine about 2.5 times faster for starters and I decided to use a lookup table to jump to commands more quickly. The net effect? Some programs run as much as 8 times faster. Don't believe it? I admit that most programs won't get that kind of a speed boost, but algorithms definitely get a huge speed boost. Pretty much, everything except DispGraph and Pause have been affected (and even those get about a 500 cycle speed boost).

So what kind of a speed boost should you expect? Well, the games that I have toyed with work in 6MHz at the speed you would expect out of 15MHz, so they work about 2 to 3 times faster. I think Tetris didn't get too much of a speed boost, though.

[offtopic]
5 or 6   = 7
5 and 6 = 4
5 xor 6  = 3
uses 3,4,5,6,7
[/offtopic]
« Last Edit: January 15, 2012, 07:24:10 pm by Xeda112358 »

#### TIfanx1999

• ಠ_ಠ ( ͡° ͜ʖ ͡°)
• CoT Emeritus
• LV13 Extreme Addict (Next: 9001)
• Posts: 6173
• Rating: +191/-9
##### Re: Grammer 2-The APP
« Reply #162 on: December 28, 2011, 09:20:44 pm »
Wow, nicely done! =)

#### Xeda112358

• they/them
• Project Author
• LV12 Extreme Poster (Next: 5000)
• Posts: 4704
• Rating: +719/-6
• Calc-u-lator, do doo doo do do do.
##### Re: Grammer 2-The APP
« Reply #163 on: December 29, 2011, 12:31:15 am »
Thanks Also, I would like to note that I am debating on adding a 32-bit mode. It is unlikely, but I already have the math routines coded for most of it (adition, subtraction, multiplication, division).

Oh, and I mentioned that new particle command? Here is a screenie

#### Sorunome

• Fox Fox Fox Fox Fox Fox Fox!
• Support Staff
• LV13 Extreme Addict (Next: 9001)
• Posts: 7920
• Rating: +374/-13
• Derpy Hooves
##### Re: Grammer 2-The APP
« Reply #164 on: December 29, 2011, 10:00:41 am »
That is incredible fast!
* Sorunome has to rewrite grammer tetris for optimizing with better delays....
 THE GAMEAlso, check out my websiteIf OmnomIRC is screwed up, blame me!Click here to give me an internet!