Omnimaga
Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Happybobjr on January 16, 2011, 05:07:43 pm
-
Here is a quick variable scanner i made today.
The code for choosing what program you want to scan was completely done by Builderboy.
Black means the variable was used.
Gray means that the variable was inside an axe comment.
Regular means unused
axscan3= not compiled
Varscan = compiled for ion
Note: I know there are still tons of problems.
-
I remember you said it checks for strings, but does it check for hex data? Otherwise, most users will probably almost always have A,B,C,D,E, and F marked as "used" :P
Nice job though anyway, this is still going to be definitely very useful :)
-
I am currently having an error where commented variables don't turn gray... :P
Next is checking for labels.
Then I will probably split into two progs. 1 for axe then one for basic. ( actually, i probably wn't do for basic)
Then its pictures [....]
then tiny E
Am i missing anything?
Oh and Tiny T (matrix, right, 2) then variable is ignored.
-
Don't forget Axiom() and Asm(). Good luck :)
-
this is a wonderful idea and shall be exceedingly useful!
thanks
-
I am having too many unnecessary errors.
I am removing ti-basic compatibilities.
Thanks for reminding me about asm( and axiom
-
I think it should be integrated with Axe so as to allow for axe to use less space for vars, and thus more space in L1
-
not bad, I could find a ton of use in this, even though TaNF only has like 5 vars declared, I still would need this. A ton :D
An idea: not nessicary, but it would be sooo cool if this were to be made part of it. Let's say you declare a variable, and then have a comment below/above it that describes it. Maybe the scanner could read this and show it as the description?
-
not bad, I could find a ton of use in this, even though TaNF only has like 5 vars declared, I still would need this. A ton :D
An idea: not nessicary, but it would be sooo cool if this were to be made part of it. Let's say you declare a variable, and then have a comment below/above it that describes it. Maybe the scanner could read this and show it as the description?
I would like to have this working fully before i try anything else.
-
Errors are worked out.
The first line .AXPROG is now considered as basic variables.
Also earlier i had used pt-change. If a var was used an even # of times it would be normal :P
Up next is Checking Labels and pictures []
It is really easy to program now I know what variables i have used :P
-
Nice work! This is definitely going to come in handy! ^^
-
Update:
*Now checks LBL and GOTO. Also checks anything in [ ]
*Sub( is misbehaving... is it a two bye token?
I'll upload screeny when i get home.
E is next.
Then Asm( (that will be annoying)
The axiom(
Incuded programs. (prgmEXAMPLE)
Then i think that will be everything.
Polishing up will include:
* larger distance between numbers.
* large font numbers probably
* Inversed color on SELECT PROGRAM :)
-
Great, someone did what I asked for ;D
Also, I was wondering if it could return all the Variables used and all the Variables that are not-used? If yes, that would be really cool, but this is great as well, congratulations both of you ;D
-
Great, someone did what I asked for ;D
Also, I was wondering if it could return all the Variables used and all the Variables that are not-used? If yes, that would be really cool, but this is great as well, congratulations both of you ;D
that's all it does ???
The used variables are highlighted.
The variables in a comment are greyed.
-
Great, someone did what I asked for ;D
Also, I was wondering if it could return all the Variables used and all the Variables that are not-used? If yes, that would be really cool, but this is great as well, congratulations both of you ;D
that's all it does ???
The used variables are highlighted.
The variables in a comment are greyed.
I thought it returned if a certain variable was used or not, but if not, noice! (nice with british accent)
-
oh, i see, ya it does
-
Nice program Happybobjr :D
-
update:
If the result is gray- The variable was stored to.
If black- The variable was called.
Tricks- If it is only gray, the variable is not being used, so you can find it and delete it.
http://www.omnimaga.org/index.php?action=dlattach;topic=6129.0;attach=6234
-
Yay, it's here!
Tested it out on Wabbit, and I'm definitely gonna be using this once I download it:
-
thank you.
Is there anything else you wish to see on it?
I am trying to have it fast, but i can still have many more features.
Edit:thanks for the screeny
-
Awesome, it even tests to see if it's a BASIC prog. Nice!
-
That's actually Builderboy's code :P from his auto optimization program. I just switched the truth of an if statement =D
-
Multi-line comments don't work:
-
How do multi line comments work?
I forgot about them
I have this made for axe 0.4.8
-
How do multi line comments work?
I forgot about them
I have this made for axe 0.4.8
...
This is a comment
This is still a comment
This is the last line
Maybe yet another
...
Disp "NOT COMMENT
-
Thanks.
I shall eat before implementing that.
-
Good luck! :D This is already epic awesome and useful ^^
-
I think it'd be easier for Axe writing if there was a difference for starting and finishing multiline comments, but happybojr, what about for writing this kind of software, is it any harder/easier?
-
Oh, writing the code for this was extremly simple and unoptimised,
Unfortunatly, I am having trouble with multi line comments.
-
Oh, writing the code for this was extremly simple and unoptimised,
Unfortunatly, I am having trouble with multi line comments.
I think you should test to see if there's three periods in a row, then set a flag that lets the program skip all the way until it finds another set. Absolutely nothing between the ellipses matters.
-
I tried that. Something in my code is conflicting with it though :/
<s>Remember, I have to ignore...</s> you know what, nvm. I will just add a bunch of (If N=0) for now.
-
!If N is a lot more optimized :)
-
WOW! I am stupid.
I had
{L+G}=3F
It shou;d have been
{L+G}=E3F
Little E
-
Ok here is version 0.6
Change log.
* Added support for multi-line comments.
* Added support for E
* Fixed something that I can't remember... :P
* Some speed and size optimizations.
Things for 1.0
* Fix Sub(
* Fix .Blab:new line isn't part of comment :/
-
Bug report: in the newest version, the letters don't turn black/gray until a key is pressed, then the program quits instantly.
-
That doesn't seem right???
I just tried it and it worked.
-
I'll give this a try with one of my old game like Axe Tunnel, even though it's ancient.
EDIT It seems to work fine for me. Could you add a feature showing how many times each var is used?
-
That would be easy. I have rewritten how the variables and stuff is displayed. Now it is easy for me to adjust ;)
What would the use of knowing the number of times a variable has been used?
Also: when you say used, do you mean called and/or stored?
-
When we know the number of time then we know how many to change if we ever decide to stop using that variable or we can detect possible variable conflicts. As for used it would be nice maybe to know when they're used and when they're stored. In fact it would be cool to know where in the code too, but when a variable is used 20 times it would be hard to read. X.x
-
Here is what I was thinking.
<u>|Var |Used|Str'd|</u>
| A | 4 | 1 |
| B | 1 | 4 |
| C | 0 | 1 |
| D | 0 | 0 |
| E | ... | ... |
This will have 2 or 3 columns.
-
Here is what I was thinking.
<u>|Var |Used|Str'd|</u>
| A | 4 | 1 |
| B | 1 | 4 |
| C | 0 | 1 |
| D | 0 | 0 |
| E | ... | ... |
This will have 2 or 3 columns.
That would be great! Not sure the uses of that, but it would look awesome ;D
-
Ok, I'll upload when I get home.
I am using 3 columns with 9 variables per.
It works out perfectly :)
Edit: fixed Sub(
Edit 2: Yes scout. (I am adding edit because I don't want to double post in a few min.)
Edit 3: Just making things look pretty now.
-
Ok, I'll upload when I get home.
I am using 3 columns with 9 variables per.
It works out perfectly :)
Edit: fixed Sub(
Great, so it won't count variables inside multiline comments like this:
...
A this is not a variable
B
C
None of these is
...
-
Here is 1.0
Change Log
*Fixed Sub(
*Added support for multi-line comments.
*Put in full speed mode ;)
*Added the number of times the var was used/-> (stored)
*Rewrote display. A few hundreds of bytes saved (not relative to previous update)
*Made this change log :P
*better screeny plz?*
-
Here is 1.0
Change Log
*Fixed Sub(
*Added support for multi-line comments.
*Put in full speed mode ;)
*Added the number of times the var was used/-> (stored)
*Rewrote display. A few hundreds of bytes saved (not relative to previous update)
*Made this change log :P
*better screeny plz?*
By the way, you can get the store arrow by doing something like Text(X,Y,28►Char). I'd suggest changing that from -> and maybe putting the heading in each column, but otherwise it looks great!
-
By the way, you can get the store arrow by doing something like Text(X,Y,28►Char).
Thanks, I will get right on that :)
-
I just tried this earlier, and have some ideas/requests.
Can there be a progress bar/run indicator turned on during reading? That way it's clear something's actually going on.
In a token like Str1A or Pic0B the letter is counted in.
Other than that, it's great ;D
-
Can there be a progress bar/run indicator turned on during reading? That way it's clear something's actually going on.
Opps ok :)
In a token like Str1A or Pic0B the letter is counted in.
That never crossed my mind. Thank you for telling me.
Note: Grounded from computer for a week because i have a B+ in English :/
so when ever my parents aren't around, I will update it.
-
This is just epic! Downloaded it immediately!
-
That looks nice so far :D
-
That looks nice so far :D
Thanks. In the rare moments of spare time I get, I have been messing around with 4lvl. gray for better viewing.