Disassemblers

  • 13 Replies
  • 5058 Views
*

FlatEarthDenial

  • 303
  • FE is anti-science.
Disassemblers
« on: August 15, 2015, 03:12:03 AM »
Why do different debuggers show different disassembly for the same executable? I am not talking only about syntax. For example, I've compiled a "Hello world" program on my MacAir with Clang. Then, lldb in Terminal showed me that the first few assembler directives are for setting up a stack, but FreeDOS debug in DosBox showed me that the first directive was "IRET", and that is for exiting the interrupt. Of course, when I then tried to run a program in lldb it printed "Hello world!", and when I tried to run that same program in FreeDOS debugger, the DosBox crashed. To me, that is weird because I know that both llvm assembler and FreeDOS assembler can make programs for the same processor architecture: x86. And even if the interrupt table is different in DOS and Darwin OS, the disassembly should be equal, right? So, how is this result possible?
A former Flat Earther.
This is my story, which I'd encourage every Flat Earther to read:
https://www.theflatearthsociety.org/forum/index.php?topic=67051.0

*

TheEarthIsASphere.

  • 867
  • who fucking cares what shape the earth is lol
Re: Disassemblers
« Reply #1 on: November 19, 2015, 11:55:19 AM »
Different compilers, different output assembly. A good example of this is the fact that short arrays in Visual C++ compile to IL that causes them to run slower than the same program in normal C++.

http://usingprogramming.com/post/2015/11/13/visual-c-bug-with-constant-arithmetic-loops
« Last Edit: November 20, 2015, 06:26:17 AM by TheEarthIsRoundNotFlat »
Quā ratiōne nōn redimus ad senectēs societātēs sapientium patrum? Quā ratiōne relinquimus eārum sapientiam?

*

FlatEarthDenial

  • 303
  • FE is anti-science.
Re: Disassemblers
« Reply #2 on: December 30, 2015, 02:49:49 AM »
Different compilers, different output assembly. A good example of this is the fact that short arrays in Visual C++ compile to IL that causes them to run slower than the same program in normal C++.

http://usingprogramming.com/post/2015/11/13/visual-c-bug-with-constant-arithmetic-loops

That was not my question. Different disassemblers apparently show different assembly for the same executable file (already compiled and working).
A former Flat Earther.
This is my story, which I'd encourage every Flat Earther to read:
https://www.theflatearthsociety.org/forum/index.php?topic=67051.0

*

TheEarthIsASphere.

  • 867
  • who fucking cares what shape the earth is lol
Re: Disassemblers
« Reply #3 on: January 03, 2016, 08:13:32 PM »
Different compilers, different output assembly. A good example of this is the fact that short arrays in Visual C++ compile to IL that causes them to run slower than the same program in normal C++.

http://usingprogramming.com/post/2015/11/13/visual-c-bug-with-constant-arithmetic-loops

That was not my question. Different disassemblers apparently show different assembly for the same executable file (already compiled and working).

Apologies. It may just be the disassemblers themselves.
Quā ratiōne nōn redimus ad senectēs societātēs sapientium patrum? Quā ratiōne relinquimus eārum sapientiam?

*

FlatEarthDenial

  • 303
  • FE is anti-science.
Re: Disassemblers
« Reply #4 on: February 03, 2016, 10:36:18 AM »
Any sensical answer? Seriously, RE-ers! When you debate about the GPS you all pretend to be ICT experts, but apparently nobody on this forum has experience with debuggers?!
A former Flat Earther.
This is my story, which I'd encourage every Flat Earther to read:
https://www.theflatearthsociety.org/forum/index.php?topic=67051.0

Re: Disassemblers
« Reply #5 on: February 17, 2016, 05:27:26 AM »
Any sensical answer? Seriously, RE-ers! When you debate about the GPS you all pretend to be ICT experts, but apparently nobody on this forum has experience with debuggers?!
No one is claiming to be an ICT expert, and our basic knowledge of gps isn't anything to do with our experience with debuggers.

*

FlatEarthDenial

  • 303
  • FE is anti-science.
Re: Disassemblers
« Reply #6 on: March 19, 2016, 10:07:06 AM »
Look, knowledge is justified true belief. And unless you can justify the belief that the Earth is round, you can't justify a belief that GPS depends on the Earths rotundity. That's that simple.
But, yeah, my knowledge of informatics is negligible. Those who make the GPS devices certainly do know how to make the FreeDos debugger work in the described situation.
And that doesn't make "it may be the disassemblers themselves" a valid answer. See, the assembly directives corespond directly to the directives in the binary code. An assembly language compiler has no choice how to translate a directive in assembly language to the binary code. There is exactly one way. And the same goes for disassemblers. There is only one way to translate a binary code to assembly language. If two disassemblers for the same computer architecture function properly and the same output syntax is set in both, their output for the same executable (which is a binary file) must be the same.
FreeDos debug works otherwise: I've made a few simple programs in Flat Assembler (a clock, a number-base converter, an IEEE 754 converter and an ASCII tool) and it disassembled them correctly. I realize that the Hello World program in C is, when compiled, far more complex than what I made in The Flat Assembler, but that's not an explanation of any kind. I am pretty sure that the FreeDos debug has been successfully used on far more complex programs.
So, why it doesn't work in the situation I described and how to fix that?
A former Flat Earther.
This is my story, which I'd encourage every Flat Earther to read:
https://www.theflatearthsociety.org/forum/index.php?topic=67051.0

*

AstronomyMaster

  • 33
  • Anti-NASA is anti-science.
Re: Disassemblers
« Reply #7 on: March 23, 2016, 03:54:12 PM »
Quote
I am pretty sure that the FreeDos debug has been successfully used on far more complex programs.
See, when you think about something that matters to you personally, you use scientific consensus as a justification for your premisses. Why don't you apply that same way of thinking to the shape of the Earth?
The burden of proof is defined relatively to the current scientific consensus, not relatively to the beliefs of the uneducated people like the Flat Earthers!

*

Son of Orospu

  • Jura's b*tch and proud of it!
  • Planar Moderator
  • 37834
  • I have artificial intelligence
Re: Disassemblers
« Reply #8 on: March 23, 2016, 05:54:11 PM »
Quote
I am pretty sure that the FreeDos debug has been successfully used on far more complex programs.
See, when you think about something that matters to you personally, you use scientific consensus as a justification for your premisses. Why don't you apply that same way of thinking to the shape of the Earth?

This thread and forum is not dedicated to the shape of the Earth.  Please take your opinions to the proper forum. 

Re: Disassemblers
« Reply #9 on: March 30, 2016, 01:20:12 PM »
Any sensical answer? Seriously, RE-ers! When you debate about the GPS you all pretend to be ICT experts, but apparently nobody on this forum has experience with debuggers?!
This isn't stackoverflow, you dick.
Quote from: mikeman7918
a single photon can pass through two sluts

Quote from: Chicken Fried Clucker
if Donald Trump stuck his penis in me after trying on clothes I would have that date and time burned in my head.

*

FlatEarthDenial

  • 303
  • FE is anti-science.
Re: Disassemblers
« Reply #10 on: April 08, 2016, 02:34:17 PM »
Any sensical answer? Seriously, RE-ers! When you debate about the GPS you all pretend to be ICT experts, but apparently nobody on this forum has experience with debuggers?!
This isn't stackoverflow, you dick.
Well, according to the rules, I am completely right to make a thread about disassemblers here.
For example, you can talk about your preferred operating systems, browsers or hardware, or ask for help or advice on these things.
http://www.theflatearthsociety.org/forum/index.php?topic=1433.0
And, yes, I would probably more quickly get the answer on stackoverflow than on this forum, but being on this forum is way more fun, right?
Besides, I think I already know the answer. See, when Clang made an executable for Darwin OS, it made an Mach-O file. But Flat Assembler I've been using to, well, learn how the disassemblers and assemblers work creates either .EXE files (MZ format) or .COM files (binary format). Well, when I assembled the same simple program first in MZ format and then in binary format, I noticed that FreeDos Debug starts disassembling the MZ file from the first byte, but the binary file from the 256th byte, but outputs the same assembly directives. So, obviously, the code starts at different address at MZ format than at binary format. And FreeDos Debug probably isn't programmed to start disassembling the Mach-O file, being for Darwin OS, at a right address. So, what is actually going on is that FreeDos Debug tries to disassemble something that's not a code in the first place, and, of course, outputs nonsense.
Therefore, what I have to do if I want to use FreeDos Debug with Mach-O files is to figure out where the code starts section in one (if I am using the right terminology), probably using lldb, and then tell FreeDos Debug to start disassembling at that address. But I still don't know how to do any of that exactly.
Can you help me, please? Some screen-shoots might be helpful.
« Last Edit: April 08, 2016, 02:38:01 PM by FlatEarthDenial »
A former Flat Earther.
This is my story, which I'd encourage every Flat Earther to read:
https://www.theflatearthsociety.org/forum/index.php?topic=67051.0

?

palmerito0

  • 582
  • Why does this forum exist?
Re: Disassemblers
« Reply #11 on: April 08, 2016, 03:58:00 PM »
Any sensical answer? Seriously, RE-ers! When you debate about the GPS you all pretend to be ICT experts, but apparently nobody on this forum has experience with debuggers?!

I think that Jimmy was talking about the above post.
Heiwa on the impossibility of space travel:

There are no toilets up there and sex is also a problem, just to mention a few difficulties.

WHEEEEEEEEEEE

*

FlatEarthDenial

  • 303
  • FE is anti-science.
Re: Disassemblers
« Reply #12 on: April 09, 2016, 03:43:02 AM »
Any sensical answer? Seriously, RE-ers! When you debate about the GPS you all pretend to be ICT experts, but apparently nobody on this forum has experience with debuggers?!

I think that Jimmy was talking about the above post.
Well, it's a fact that many RE-ers would say that GPS relies on the shape of the Earth yet wouldn't be able to explain how. Of course, this is not a good argument for FET, this is an argument for that that they don't know what they are talking about. But let's return to the topic of disassemblers.
A former Flat Earther.
This is my story, which I'd encourage every Flat Earther to read:
https://www.theflatearthsociety.org/forum/index.php?topic=67051.0

*

FlatAssembler

  • 609
  • Not a FE-er
Re: Disassemblers
« Reply #13 on: November 11, 2016, 01:23:55 PM »
Here is a thread on that on a forum about Assemblers:
https://board.flatassembler.net/topic.php?t=19453
Fan of Stephen Wolfram.
This is my parody of the conspiracy theorists:
https://www.theflatearthsociety.org/forum/index.php?topic=71184.0