Author Topic: Grammer 2.51 released!  (Read 8735 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 2.51 released!
« on: February 15, 2020, 05:41:25 pm »
After seven years, Grammer was revived with a new update! In fact, since then, there have been three more major updates, including today's Grammer 2.51.0.0.

After losing the source code in 2013, Grammer progress died, but then in 2016 Hans Burch(ticalc) recovered the source code, presumably by disassembling the last binary and comparing it to an old source file. I didn't actually get to working on Grammer again until late 2018, but since that it has had fairly steady updates. I first documented, reorganized, and cleaned up the code, then put it up on GitHub. I started adding features and managed to rope in @NonstickAtom785 into the action with bug reports, improved documentation, and recently some bug fixes.

In the past 16 months, there have been many updates and modifications to expand Grammer's abilities. With these new updates, Grammer has now graduated up from a 1-page app to a 2-page app (16384 bytes vs. 32768 bytes), but the updates are (hopefully) worth it!

Here is a quick summary of added features since the 2012 update.
  • Grammer now has a real main menu! Instead of just showing one entry at a time, now you can scroll through programs with a real scrollable menu.
       
  • Grammer now has support for single-precision floating point math, including the basic operations, as well as exponentials, logarithms, trig, inverse trig, and more! Keep in mind, Grammer is intended to use 16-bit integer math, so it's a bit convoluted to use floats:
  • Grammer has an external module system, which means that specialty routines can be added to extend the language. For example, Yeong has created a textbox module which can be useful for game dialog!
  • Grayscale is not backwards compatible. Grayscale is now 4-level gray, instead of 3-level. Grayscale now takes color from both buffers, so BOTH buffers must have a black pixel to appear black (before, there was a black buffer and a gray buffer, where a black pixel in the former would override the latter).
  • Input and Menu routines have been significantly modified, with Input being the most obvious. In place of highlighting the entered text, a blinking cursor is displayed, making it more obvious that input is desired from the user. On the programming end, you can now relocate the Input buffer and size. So now if you want to have the user enter a name of up to 8 bytes, you can point the input buffer to where you want the string written, and set the size to 8. The Menu( routine now has scrolling, and internally it is more memory friendly, allowing more options. An entirely new Menu(' routine allows the programmer to generate menu items using a subroutine. This could be really useful for game menus where, say, an inventory menu is prone to changing.
  • Grammer officially has stack support!
  • You can now save and restore variables within a ▶Nom(...End block, which is useful for subroutines.
  • Pt-Off( finally supports big sprites!
Spoiler For More updates:
  • The source code has been cleaned up significantly and put on GitHub.
  • RecallPic now works on archived picture variables.
  • pxl-Test(' was removed and replaced with an equivalent rectangle method.
  • Rectangle clipping now works in all directions!
  • Line drawing now has real clipping!
  • The solve( now includes port commands, and relocation of where the vars are stored.
  • L (the list L), can be used to execute specific lines of code.
  • Text( now supports displaying signed numbers via the Fix command, as well as floating point numbers.
  • ▶Dec converts a string to a float, useful for user input.
  • Param can be used to read a list of parameters passed to a subroutine.
  • Param' and Param° push to and pop from a stack, respectively, where Pmt_Bgn points to the start of the stack and Pmt_End points to the end of the stack.
  • Circle( has 9 new methods, all with different fill options (much like the rectangle routines).
  • Variable-width fonts have a more sensible format, and the fonts are ported to work with DrDnar's Monochrome Font Editor. The font files are included with the downloads so you can use them as templates for your own fonts.

Download the latest Grammer v2.51!


Offline Vierra

  • LV0 Newcomer (Next: 5)
  • Posts: 1
  • Rating: +0/-0
    • View Profile
Re: Grammer 2.51 released!
« Reply #1 on: March 11, 2020, 09:45:16 am »
7 years was a long time. I hope we won't have to wait 7 more years for another update. haha

Offline NonstickAtom785

  • LV3 Member (Next: 100)
  • ***
  • Posts: 78
  • Rating: +4/-0
  • Just live life. Cal-cu-lat-or style!
    • View Profile
Re: Grammer 2.51 released!
« Reply #2 on: March 11, 2020, 09:47:15 am »
7 years was a long time. I hope we won't have to wait 7 more years for another update. haha
Oh trust me you won't. You got any suggestions for new updates? If you do feel free to post them here. I'm a contributer to the project and I use this instead of Axe and Assembly.
Grammer2 is Good!

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 2.51 released!
« Reply #3 on: March 11, 2020, 04:26:56 pm »
7 years was a long time. I hope we won't have to wait 7 more years for another update. haha
Oh trust me you won't. You got any suggestions for new updates? If you do feel free to post them here. I'm a contributer to the project and I use this instead of Axe and Assembly.

Oof, I just recently got a new job and so far as I can tell, it's going to be taking up most of my programming time :(

I'm definitely glad I put it up on GitHub as that makes it much easier for other people like Nonstickatom to contribute.

As NSA ( :D ) said, if you find any bugs or have any requests that you would like to be considered, feel free to post in the forums (or GitHub) :)

Offline NonstickAtom785

  • LV3 Member (Next: 100)
  • ***
  • Posts: 78
  • Rating: +4/-0
  • Just live life. Cal-cu-lat-or style!
    • View Profile
Re: Grammer 2.51 released!
« Reply #4 on: August 26, 2020, 10:21:42 am »
I'm back in action on the forums. I ended up learning AXE on my break from computers. I'm competent at it now and I dual code it with assembly.


@Xeda112358 Could you give me an example of an optimized assembly program that runs Asm and Basic programs from the string in op1? I've attempted to do this already because I am making a shell in AXE and Assembly and so far it's pretty small. But when I try running the code that normally works as a program in an App it freezes then crashes. If I wasn't using a chromebook I would paste the code here. But I made a VAT Sorter in Hybrid AXE/Assembly and I'm able to go through the programs using a string located inside of a free RAM area.
Grammer2 is Good!

Offline E37

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +23/-0
  • Trial and error is the best teacher
    • View Profile
Re: Grammer 2.51 released!
« Reply #5 on: August 26, 2020, 12:09:14 pm »
So this isn't optimized or even tested, but this should work...
I didn't use code formatting because for some reason that breaks superscripts.

#Axiom(MEMKIT)
Return!If GetCalc(oOp1, Y1) .Get the pointer to the file in Op1 and return if it isn't found
!If {Y1}r-EBB6D .Assembly programs have the header of 0xBB6D. I might have this reversed and it should be '!If {Y1}r-E6DBB'
.Its an assembly program
New(E9D95, 0, {Y1-2}r->X) .Make space in ram to copy the program to. I don't test to see if there is enough ram but New() should return 0 if it failed...
Copy(Y1, E9D95, X) .Copy the program to 0x9D95
X:Asm(E5) .Save the size of memory that was created. Asm(E5) is Push HL
Asm(CD(E9D95)) .Jump to the program like a subroutine
Asm(E1)->X .Pop the saved value for the size of the program
Delete(E9D95, 0, X) .Remove the memory we created.=
Else
.Its a basic program
oOp1
Asm(EF(whatever the bcall is to run basic programs))
End
I'm still around... kind of.

Offline NonstickAtom785

  • LV3 Member (Next: 100)
  • ***
  • Posts: 78
  • Rating: +4/-0
  • Just live life. Cal-cu-lat-or style!
    • View Profile
Re: Grammer 2.51 released!
« Reply #6 on: September 01, 2020, 12:24:32 pm »
Thanks for the AXE example. I need to download that axiom. I was going along the same lines as you though except I was using just op codes at first with a little of Axes boolean.
Grammer2 is Good!