Hi,
i need to modify an old program of ours and since there is no source code available anymore i need to rewrite a few instructions in assambler (sounds worse than it is). As i dont find an editor to open a file like with an disammbler i am stuck at hex-editing this file. So my questions are simple:
does someone know a hex editor that can open files in assambler view (like good ol' HIew?) and secondly - knows someone the hex codes for the following instructions?
JZ
JNZ
JNE
JE
NOP
No source code. Yikes!
I can't help with hex editor + assembler view. If you have an ELF file, you may be able to get what you need from avr-objdump.exe.
I can't find the J* instructions in the Instruction Set document...
But I did find NOP, the 16-bit opcode is 0000 0000 0000 0000 (all zeros).
hm, i might add that is a 'normal' x86 code, not AVR related.. but thanks anyway :0)
Ah, for x86, the "debug" utility will both assemble and dissassemble code:
C:\DOCUME~1\billw>debug
-a 100
13BA:0100 add ax,bx
13BA:0102 cmp ax, 100
13BA:0105 nop
13BA:0106 jnz 100
13BA:0108
-u 100 110
13BA:0100 01D8 ADD AX,BX
13BA:0102 3D0001 CMP AX,0100
13BA:0105 90 NOP
13BA:0106 75F8 JNZ 0100
13BA:0108 0000 ADD [BX+SI],AL
13BA:010A 0000 ADD [BX+SI],AL
13BA:010C 0000 ADD [BX+SI],AL
13BA:010E 0000 ADD [BX+SI],AL
13BA:0110 0000 ADD [BX+SI],AL
-
There are various tools to dump Win32 / x86 assembly from COFF and OMF OBJs. Years ago I had a tool that would dump an entire EXE (or DLL).
What are you trying to dump (OBJ, DLL, EXE)?
an exe, and thanks for your ideas. i finally got back to my dood ol' Win32Dasm in conjunction with Biew instead of Hiew, seems to work now as it should :0)