Jump to content



0

Disassembled files not recompiling


4 replies to this topic

#1 MayDay OFFLINE  

MayDay

    Chopper Commander

  • 207 posts

Posted Mon Nov 7, 2005 4:55 PM

I've noticed that I can take a source code and compile it (then play with it in an emulator) and it seems to work fine. However, if I take that binary that is working, and try to disassemble it back into a .s file, the code will no longer compile correctly. Do I need to go back, take out the variable set at the beginning and add the include files again? I'm having trouble understanding how this is even possible if it is disassembling correctly. The error I get by the way is a long list of unknown mnemonics that should actually be commands such as STA, LDX, etc. They are indented fine in the "source" file (which at this point is actually the disassembled file).

Thanks,
Jason

#2 Cybergoth OFFLINE  

Cybergoth

    Quadrunner

  • 8,207 posts
  • This is Sparta!
  • Location:Bavaria

Posted Mon Nov 7, 2005 5:01 PM

Hi there!

When using distella add the -p switch to the command.

Greetings,
Manuel

#3 MayDay OFFLINE  

MayDay

    Chopper Commander

  • 207 posts

Posted Mon Nov 7, 2005 5:51 PM

Thanks, that fixed the unknown mnemonic problem. Is there another switch I should be using? I am using "distella -a -p source.bin > sourcefile.s" as my command right now. Taking the code through the entire process now compiles correctly; however I think you'll find the results interesting:

This is a file from the batariBasic thread that vdub_bobby created. 3 is the (renamed) version and 4 is what comes out of the process. Is this a glitch in the program, or am I still doing something wrong?

Attached File  bbk3.ZIP   1.04K   115 downloads Attached File  bbk4.ZIP   1.04K   106 downloads

Thanks again,
JD

#4 Cybergoth OFFLINE  

Cybergoth

    Quadrunner

  • 8,207 posts
  • This is Sparta!
  • Location:Bavaria

Posted Tue Nov 8, 2005 5:10 AM

Hi there!

MayDay, on Mon Nov 7, 2005 11:51 PM, said:

Is there another switch I should be using?  I am using "distella -a -p source.bin > sourcefile.s" as my command right now.

You should use at least -paf
(that might already fix your problem)

Greetings,
Manuel

#5 MayDay OFFLINE  

MayDay

    Chopper Commander

  • 207 posts

Posted Tue Nov 8, 2005 6:34 AM

Yes, that switch seems to clear up the glitches. Thanks again for your help.

-JD




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users