hey im wondering exactly how i would go about converting assembly code such as jmp 700000 to hex decimal code? .. if you could help out it would be much appriciated :)
Posted on 2003-07-25 04:08:29 by sTonER_DeVIOUS
What is "hex decimal"?
Posted on 2003-07-25 04:17:53 by The Svin
my bad sorry, i meant just hex code
Posted on 2003-07-25 04:20:33 by sTonER_DeVIOUS
what? im just wanting to work on a converter... a program where you enter the asm code and it outputs the hex code.. it is not intended for cracking and such, i dont know why everyone is assuming this... it sucks, cuz noone will help me because they think im a cracker <-- not the racial slurr.. but the computer cracker
Posted on 2003-07-25 04:52:08 by sTonER_DeVIOUS
Talk about jumping to conclusions ... given the small number of posts you should give the man quite some space. There are perfectly good reasons to ask the question he is asking - one does not have to be interested in the creation of virii to be interested in how an assembler works. Simple curiosity is reason nuff.

On a sidenote: being interested in virii or any other illegal activity is not in itself illegal - it is the committing of the crime that is illegal. And let's drop the subject of virii and trojans, since it doesn't belong on the board.

Stoner: u might want to consider looking into one of the nice utilities that come with the masm package. There's a mnemonic thingy there, that shows opcodes - it's sort of the reverse of what you're looking into.

Fake
Posted on 2003-07-25 04:53:56 by Fake51

hey im wondering exactly how i would go about converting assembly code such as jmp 700000 to hex decimal code? .. if you could help out it would be much appriciated :)


The process of converting text representation of instruction, for example : 'jmp 700000' to the opcodes (numbers) is called "compiling" or "assembling". So, you can use some "assembler" or "compiler" -> FASM, MASM, GoAsm, SpAsm TASM etc.
Or you can manually do the conversion, using instruction tables. Or, you can write your own assembler to do this job.

Regards
Posted on 2003-07-25 05:11:14 by JohnFound
I thought that a 'compiler' takes high level language and outputs assembly language. Is this wrong?
Posted on 2003-07-25 05:47:00 by Delight
What is "hex decimal"?

I suppose he meant hexadecimal.

hey im wondering exactly how i would go about converting assembly code such as jmp 700000 to hex decimal code? .. if you could help out it would be much appriciated 


What you are asking for, is an assembler. It is not simple to code one. Have a look at the opcode xx on the algorithm forums (You have to search).

From my head, jmp is EBh and followed by 1byte which is the displacement to the end of the instruction. Or if the code is more than 127 bytes away, you have to use the E9h and followed by 4bytes which is the the displacement to the end of the instruction. If you want to use the word verison of the jmp, it is 66h E9h followed by 2 byte displacement.


Originally posted by Delight
I thought that a 'compiler' takes high level language and outputs assembly language. Is this wrong?

You must have missed out the discussion on the other forums :)
Posted on 2003-07-25 06:36:54 by roticv
hmm thanks for the help, ill see what i can do
Posted on 2003-07-25 12:55:09 by sTonER_DeVIOUS
IA-32 Intel(r) Architecture Software Developer's Manual
Volume 2: Instruction Set Reference
Order Number 245471-007

Intel Corporation
P.O. Box 7641
Mt. Prospect IL 60056-7641

1-800-879-4643
http://www.intel.com



Happy Now? :grin:


Why most people assume that this is for c|2kng stuff is because "normal asm" coders, need not to learn hex coding except for creators of assemblers, compilers and REAL MEN. :grin:

Believe me, this kind of tool is *used* in c|2kng and there is already an existing one. If you want to do this for hobby, then more power to you. But if you just want to do some basic conversions without ordering the book above, then just assemble the source code(jmp xxxxxxxxh whatever....) and open the executable in a debugger, you'll see the hex value equivalent.
Posted on 2003-07-25 13:44:02 by arkane
You can also use the DEBUG program.

I think it still comes with all versions of Windows, at least up to 2K, not sure about XP.

However, I don't think it supporst 32 bit code, only 16 bit...

:)
Posted on 2003-07-25 14:30:17 by S/390
hexadecimal? cpu understand only 5V and 0V :D
Posted on 2003-07-25 15:44:48 by wizzra
:grin:
Posted on 2003-07-25 16:26:42 by RobotBob

hexadecimal? cpu understand only 5V and 0V :D


Well said :)
Though active line in not alway 5v, though mostly it is.
Posted on 2003-07-25 18:02:08 by The Svin
i can read raw hex, i can tell you where the instruction ends or whats a memory adress, i learned asm by its hex codes.
Posted on 2003-07-25 18:09:23 by Qages
goto http://ibiblio.org/paulc/rta/ and download RTA.
Posted on 2003-07-25 18:39:01 by jack