Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: Xanwell on February 25, 2011, 02:05:00 pm

Title: Way to determine if an Assembly program was created from Axe source?
Post 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.
Title: Re: Way to determine if an Assembly program was created from Axe source?
Post by: Xeda112358 on February 25, 2011, 02:06:57 pm
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.
Title: Re: Way to determine if an Assembly program was created from Axe source?
Post by: Xanwell on February 25, 2011, 02:08:24 pm
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?
Title: Re: Way to determine if an Assembly program was created from Axe source?
Post by: Munchor on February 25, 2011, 02:09:23 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.

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.
Title: Re: Way to determine if an Assembly program was created from Axe source?
Post by: Xanwell on February 25, 2011, 02:10:39 pm
Good point... unfortunately I lack enough knowledge of Assembly to even be able to tell the difference :P
Title: Re: Way to determine if an Assembly program was created from Axe source?
Post by: AngelFish on February 25, 2011, 02:18:16 pm
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
Title: Re: Way to determine if an Assembly program was created from Axe source?
Post by: Xanwell on February 25, 2011, 02:19:36 pm
Ideally it would be a method the calculator itself could use to check each program, if such a thing exists.
Title: Re: Way to determine if an Assembly program was created from Axe source?
Post by: FinaleTI on February 25, 2011, 03:09:40 pm
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...
Title: Re: Way to determine if an Assembly program was created from Axe source?
Post by: Builderboy on February 25, 2011, 03:12:06 pm
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
Title: Re: Way to determine if an Assembly program was created from Axe source?
Post by: AngelFish on February 25, 2011, 03:13:05 pm
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

Code: [Select]
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.
Title: Re: Way to determine if an Assembly program was created from Axe source?
Post by: Xeda112358 on February 25, 2011, 04:37:14 pm
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)
Title: Re: Way to determine if an Assembly program was created from Axe source?
Post by: ztrumpet on February 25, 2011, 04:41:10 pm
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
Title: Re: Way to determine if an Assembly program was created from Axe source?
Post by: Compynerd255 on February 25, 2011, 05:11:58 pm
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?
Title: Re: Way to determine if an Assembly program was created from Axe source?
Post by: yunhua98 on February 25, 2011, 06:04:43 pm
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
Title: Re: Way to determine if an Assembly program was created from Axe source?
Post by: DJ Omnimaga on February 25, 2011, 08:55:08 pm
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.
Title: Re: Way to determine if an Assembly program was created from Axe source?
Post by: Runer112 on February 25, 2011, 10:03:48 pm
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:

Title: Re: Way to determine if an Assembly program was created from Axe source?
Post by: jnesselr on February 25, 2011, 10:54:26 pm
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.