Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: Xanwell on February 25, 2011, 02:05:00 pm
-
Does anyone know of any way to determine whether or not an Assembly program was compiled from an Axe source file rather than written directly in Assembly language? I was thinking that the compiler itself might leave some sort of identification or header on the compiled Assembly program, but I don't know of any for sure.
-
I am not sure, but I believe that an app made with Axe has something to identify it because I had problems with that :D Otherwise, I have not found anything in the code to signal that it was an Axe program.
-
an app made with Axe has something to identify it because I had problems with that
Isn't that just the lack of a valid app signature?
-
Does anyone know of any way to determine whether or not an Assembly program was compiled from an Axe source file rather than written directly in Assembly language? I was thinking that the compiler itself might leave some sort of identification or header on the compiled Assembly program, but I don't know of any for sure.
The best way to find out is to use a disassembler (like Assemblex) and compare the code made by Axe Parser and the code by a normal Assembly Assembler.
-
Good point... unfortunately I lack enough knowledge of Assembly to even be able to tell the difference :P
-
Well, if you see a bunch of jumps and almost no system calls, then it's probably Axe. Come to think of it, that'd work for pretty much any compiler you care to name :P
-
Ideally it would be a method the calculator itself could use to check each program, if such a thing exists.
-
Some would have a default Axe icon, but I'm pretty sure nostub programs don't have this, and you can define a custom icon now, so...
-
As far as I know, there is no 100% accurate way of doing this, because hypothetically, since Axe compiles to direct asm, any asm programmer could easily write a program (if they wanted to) that would look identical to the same program programmed in axe
-
Ideally it would be a method the calculator itself could use to check each program, if such a thing exists.
Well, if the author wanted to make their program identifiable as an Axe program, then they could simply do
Goto SRT
Asm415845
Lbl SRT
That'd show up as "AXE" in any hex editor.
But Builder is right. A good Axe programmer could make their program modify itself to not show that it was compiled with Axe without too much effort.
-
Okay, here is the Axe starting code for an APP:
CD8B40 ;jumps to the program code
EF364C ;gets ready to exit
CD50002740 ;exits
I believe that last one can be a simple EF2740 because that bcall automatically exits (meaning you don't need to use bjump)
-
Okay, here is the Axe starting code for an APP:
CD8B40 ;jumps to the program code
EF364C ;gets ready to exit
CD50002740 ;exits
I believe that last one can be a simple EF2740 because that bcall automatically exits (meaning you don't need to use bjump)
Oh yes, I forgot about this. This is so in Axe you can use a Return to exit an App from anywhere. :) The entire App is just one big subroutine. :D
-
I'm trying to understand why this would be useful. An Axe program is no different than any other assembly program, except for the way it is generated. If you wanted to dissassemble the code on the computer and check, by all means, check. But it isn't really useful on a calculator, unless you have a personal vendetta against Axe programs or non-Axe programs.
Also, ztrumpet, how can I get me one of those cool banners on my signature?
EDIT: Also, Xeda, what is the Omnimaga Anti-Riot squad?
-
The anti-riot squad was created to help the Omnimaga staff moderate the boards due to increased trolling around here. They are basically Staff without the subforum for their projects, and they don't have activity requirements.
and yeah, I make useless programs all the time lol. :P But since when did you get more posts than me, Qwerty? :o
-
I'm trying to understand why this would be useful. An Axe program is no different than any other assembly program, except for the way it is generated. If you wanted to dissassemble the code on the computer and check, by all means, check. But it isn't really useful on a calculator, unless you have a personal vendetta against Axe programs or non-Axe programs.
Also, ztrumpet, how can I get me one of those cool banners on my signature?
EDIT: Also, Xeda, what is the Omnimaga Anti-Riot squad?
The only useful thing would be to figure out if somebody tried to pass an Axe program as an ASM program on ticalc.org, not giving any credit to Quigibo, or someone trying to impress Axe programmers claiming he made a pure-Axe TI-Boy SE but pass an ASM program as an Axe one. There are little chances that this would happen, though, and I have doubts that this happened so far.
As for the anti-riot squad it's an extra moderator group we recently added. We got more and more members at one point in February but it seems we attracted trolls from other websites in the process and it became near impossible for other busy staff to keep things clean.
-
Because Axe source code is compiled into the same assembly language as a "normal" assembly program, there is no surefire way to determine the origins of an assembly program. However, you can make a very accurate educated guess by looking at the disassembled code. Here are a few differences I can think of that should be fairly noticeable between a "normal" assembly program and one generated by Axe:
- Axe programs have a strong foundation in the hl register. A very high amount of h/l usage (and also a very low amount of b/c usage) should hint to a program compiled by Axe parser. This is probably the strongest indicator.
- Axe programs also rely on storage of values in memory, often in the range from saveSScreen+714 to saveSScreen+767. Values are only carried from block to block in either memory or hl. (Or on the stack for subroutines)
- Axe programs will have a lot of conditional branches following the format ld a,h \ or l \ jp (n)z,$XXXX. Very rarely will you see a conditional absolute jump that does not follow the above format or does not use the z flag.
-
Okay, here is the Axe starting code for an APP:
CD8B40 ;jumps to the program code
EF364C ;gets ready to exit
CD50002740 ;exits
I believe that last one can be a simple EF2740 because that bcall automatically exits (meaning you don't need to use bjump)
No, you have to use bjump here. In fact, if you didn't, it would load stuff on the stack that isn't taken off, which is bad.