Author Topic: ASMComp  (Read 6278 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
ASMComp
« on: August 10, 2011, 05:49:12 pm »
I am surprised that I have not mentioned this before, here... Anywho, a while ago I started a small project called ASMComp for crazy fools like myself or those who do not have access to their computers all the time. What it is is a tool for developing in assembly on the calc. Until recently, the only feature was to allow for commented code.

Here is what this version has or lacks:
-I haven't added back in commenting for some reason (laziness?)
-You can use equate files
-You cannot define equates yet (other than labels)
-You can use labels
-You can use token strings

So to take directly from the readme, this is an example of code, currently:
Code: [Select]
     :[FWAHAHA
     :.5EQU
     :AsmPrgm
     :EF[HOMEUP]
     :EF[CLRSCRNFULL]
     :21[MESSAGE]
     :EF[PUTPS]
     :210000
     :115F3F
     :EF[INVERTRECT]
     :C9
     :Lbl MESSAGE
     :02"HI"
     :End
The nice part is that this doesn't automatically include the BB6Dh header for asm programs and the code can be output to non-program vars. I plan to add in the ability to do simple math such as (3+[MESSAGE]) as well as add in variables (like 3->A), the ability to define 1 or 2 byte equates (or maybe multi-byte equates), add in If statements to control what sections of code get compiled, and all sorts of other goodies. I imagine code looking something like this:
Code: [Select]
:[MEOW       ;The type and name of the output file
:.5EQU        ;The equates file to use
:=1 COM1     ;Sets an equate for COM0
:=1 COM2     ;Sets an equate for COM1
:=0 COM3     ;Sets an equate for COM2
:AsmPrgm      ;This makes a header for the assembly program
:EF[RCLANS]
:EF[CONVOP1]
:B720{COM1prgm}     ;uses relative jump
:EF[CLRLCDFULL]C9
:Lbl COM1prgm
:If 1=COM1
: 3D20{COM2prgm}
: EF[HOMEUP]
: C9
:Lbl COM2prgm
:If 1=COM2
: 3D20{COM3prgm}
: 3E02D310C9
:Lbl COM3prgm
:If 1=COM3            ;The following chunk of code is not included since COM3=0
: 3D20{END}
: 3E03D310C9
:Lbl END
:C9
:End

So what do y'all think? Is this project worth my attention?

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: ASMComp
« Reply #1 on: August 10, 2011, 05:50:25 pm »
I think it's definitely worth your attention.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

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: ASMComp
« Reply #2 on: August 10, 2011, 05:53:24 pm »
Cool, thanks :) It is taking a bit of a backseat and more so, now that I have finally figured out how to make brass compile apps. Now I can start working on adding features to BatLib again XD Still, I might add in this program to BatLib if I still need to fill up a lot of space.

Offline Hot_Dog

  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: ASMComp
« Reply #3 on: August 10, 2011, 08:34:52 pm »
Welcome back Xeda! :)  I definitely think this is worth it, as long as you have fun working on it.  Remember, you must have fun or we'll start to worry about you ;)

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: ASMComp
« Reply #4 on: August 10, 2011, 11:52:55 pm »
Welcome back Xeda! :)  I definitely think this is worth it, as long as you have fun working on it.  Remember, you must have fun or we'll start to worry about you ;)
Yep, it's a job requirement for working at "Texas Instruments (just kidding, of course not)" :P

Anyway, welcome back! I do think it's worth your attention, partly because it seems to be a really small but useful program (697 bytes!).




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: ASMComp
« Reply #5 on: August 11, 2011, 10:06:01 am »
Anyway, welcome back! I do think it's worth your attention, partly because it seems to be a really small but useful program (697 bytes!).
Huh, for some reason I thought it was bigger... Must have been another project, I guess. Anywho, this is really only meant to be a distraction for me, but it has proven useful to me when I am away from home without a computer. I have an equate file with all the RAM equates and bcalls found in Brandon W's ti83plus.inc, but unfortunately I haven't gotten around to handling files over 16384 bytes :D
...Actually, I just checked and that appears to be the sample equate file I uploaded x.x I guess I will have to fix the code up to handle that, then

Also, I should note that equate files and the source can be in archive. I should also note that only one equate file will be active at a time, but anywhere in the code you can load a new equate file.

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: ASMComp
« Reply #6 on: August 12, 2011, 09:02:09 am »
Sounds like a cool side project. I'd be something nice to mess with when you feel like taking a break from your other projects. =)

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: ASMComp
« Reply #7 on: December 10, 2011, 07:41:19 pm »
Necroupdate? Anyways, I haven't really done much except add in some error catching. I broke the ability to compile from archive, so I am not going to release this version yet, but here is a screeny :)

As a note, the program I am compiling in the screenie is just a code that jumps into a program at an offset of 4 with the error "OH CRAP!" just for fun. That is a 3 factorial, by the way. :P

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: ASMComp
« Reply #8 on: December 12, 2011, 11:55:42 pm »
Looks promising...
The syntax is a bit old-school but i definitely like it =]
Long life to hexa-coderz !

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: ASMComp
« Reply #9 on: December 13, 2011, 04:08:16 pm »
:D My issue was that I programmed in hex a lot, but I figured automating the process of computing labels would make my life easier XD. Then I thought "What about other people using this?" And then I added commenting (still not reinstated), equate support, and text conversion.

Offline the_mad_joob

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 346
  • Rating: +47/-0
    • View Profile
Re: ASMComp
« Reply #10 on: December 13, 2011, 07:12:09 pm »
Yeah, that can save many brain cycles =]

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: ASMComp
« Reply #11 on: December 28, 2011, 11:48:24 pm »
Hooray for updates, and this time I have a bunch of useful features. The size is over 1000 bytes, but I have already found it to be useful for the purposes I intended. So here are the new aspects:
-It now can calculate relative jumps and will catch errors if it is out of range
-Up to 50 equate files can be loaded
-You can now define equates in the source using the scientific notation "E"
-1 byte equates are now supported

I have also included equate files for all the bcalls documented by BrandonW (except the rets, DoNothings, and xorA) as well as all the RAM equates documented plus 1 that is documented by me >.>
And then there is the equate file for MirageOS and ION equates as well as Grammer equates. I have an example program using Grammer equates, too.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: ASMComp
« Reply #12 on: December 29, 2011, 01:13:29 am »
Nice to see you again Xeda :). This is kinda interesting. Hopefully it's useful to you and a few others. :)

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: ASMComp
« Reply #13 on: December 29, 2011, 01:18:25 am »
Thanks :) It probably is not useful to anybody else, but it is good coding experience! Plus I have almost finished the part that will convert mnemonics to hex so then it might actually be useful as a full compiler. Hopefully it will be under 2000 bytes for a full compiler that includes easy hex support for folks like me :)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: ASMComp
« Reply #14 on: December 29, 2011, 01:25:16 am »
The small size would actually be a good plus for some people, since some are really picky about size x.x