Raised This Month: $51 Target: $400
 12% 

Assembly to SMA


Post New Thread Reply   
 
Thread Tools Display Modes
ehha
SourceMod Donor
Join Date: Apr 2006
Location: Sibiu
Old 07-08-2011 , 09:28   Re: Assembly to SMA
Reply With Quote #11

Actually the assembly code is the machine code, after compiling.
With the amxx compiler all i know is that you can get the asm of a sma.
Check the compiler parameters, it's there.
Perhaps there's a way to convert asm to amxx.
To convert from asm to sma seems kinda stupid. It's like writing a program in asm, convert it to c/c++ than back to asm when compiling.
__________________

Last edited by ehha; 07-08-2011 at 09:30.
ehha is offline
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 07-08-2011 , 11:18   Re: Assembly to SMA
Reply With Quote #12

Which is Assembly.

Quote:
Originally Posted by ehha View Post
Actually the assembly code is the machine code, after compiling.
With the amxx compiler all i know is that you can get the asm of a sma.
Check the compiler parameters, it's there.
Perhaps there's a way to convert asm to amxx.
To convert from asm to sma seems kinda stupid. It's like writing a program in asm, convert it to c/c++ than back to asm when compiling.
The reason for doing this is that after I decompile an .amxx file I get an ASM code, if I could make ASM to SMA then I'd be able to see any .amxx's code. So if you know how to do that tell me.

Last edited by Diegorkable; 07-08-2011 at 11:20.
Diegorkable is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 07-08-2011 , 11:47   Re: Assembly to SMA
Reply With Quote #13

Just to make sure everyone understands, assembly is not the machine code, it is a symbolic representation of that ( a low-level programming language ). You write in assembly and use an assembler to convert it to the machine code. Even though the similarity between machine code and assembly is bigger than between high-level programming language and machine code, your computer definitely does not understand assembly.
Quote:
Originally Posted by Exolent[jNr] View Post
The result of decompiling a .amxx file.
For example this is totally false. Assembly-file comes if we write it ourselves or use disassembler to convert machine code to assembly( like in this case ), somehow never from decompiling. Decompiling would be converting machine code to high-level programming language like Pawn, but not to assembly.
SnoW is offline
Send a message via MSN to SnoW
ehha
SourceMod Donor
Join Date: Apr 2006
Location: Sibiu
Old 07-08-2011 , 14:18   Re: Assembly to SMA
Reply With Quote #14

Quote:
Originally Posted by SnoW View Post
a symbolic representation
Those are the words i was looking for Though assembly is not higher than machine code. A line of code from assembly is exactly what the processor executes, the line is just converted (assembled, not compiled) into bits.

Diegorkable, if you know assembly, then you should have some idea what the code does. I've got the assembly code of the template plugin from amxx studio and it's huge. So, if that's the situation for a simple plugin that does nothing, i doubt there's a way you can get some useful information from any other plugins. It's easier to rewrite the whole plugin if you don't have the source.
__________________
ehha is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 07-08-2011 , 14:35   Re: Assembly to SMA
Reply With Quote #15

Quote:
Originally Posted by ehha View Post
Those are the words i was looking for Though assembly is not higher than machine code. A line of code from assembly is exactly what the processor executes, the line is just converted (assembled, not compiled) into bits.
This is the first thing said in every assembly tutorial, somehow the most assemblers have all kind of preprocessors which include for example using macros, so in the end your statement is not true in the general definition of assembly. It goes for raw assembly though.
SnoW is offline
Send a message via MSN to SnoW
ehha
SourceMod Donor
Join Date: Apr 2006
Location: Sibiu
Old 07-08-2011 , 14:50   Re: Assembly to SMA
Reply With Quote #16

Yeah, one professor of mine said that you can't be wrong or right in computer science (mostly for defining things).
So i'll have to agree with you in general and disagree about the macros.
At the macro call, the assembler replaces it with the code sequence.
Macros don't make the code shorter, just clearer.
__________________
ehha is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 07-08-2011 , 18:04   Re: Assembly to SMA
Reply With Quote #17

Quote:
Originally Posted by ehha View Post
At the macro call, the assembler replaces it with the code sequence.
This is not really informative, so I am yet not sure what you disagree with, let me present, here.
Quote:
Originally Posted by ehha View Post
A line of code from assembly is exactly what the processor executes.
This is false, because by defining a macro, the line where the macro is, is not executed at all as the line is not even present in the machine code.
Quote:
Originally Posted by ehha View Post
Macros don't make the code shorter, just clearer.
This does not make sense either. If you meant with "code" the source, it is made both shorter and clearer by using macros. The machine code in the other hand does not come either shorter or clearer, so your statement does not apply to any "code".
SnoW is offline
Send a message via MSN to SnoW
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:32.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode