Disassemblers - VeggieBoards
Forum Jump: 
 
Thread Tools
#1 Old 03-27-2016, 02:01 PM
Newbie
 
Join Date: Mar 2016
Posts: 25
Disassemblers

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? And, if possible, how to make FreeDos debugger show the correct output in this case? I mean, when I make simple programs in Flat Assembler (the biggest being around 750 lines), it does show the correct output for them with default settings.

Last edited by Teo123; 03-27-2016 at 03:28 PM. Reason: More explanation of the problem.
Teo123 is offline  
Sponsored Links
Advertisement
 
#2 Old 03-27-2016, 02:25 PM
Veggie Regular
 
odizzido's Avatar
 
Join Date: Nov 2013
Posts: 727
I never got far enough into programming to learn assembly. I think perhaps if you posted this on a more appropriate forum you'd be more likely to get a good response.
odizzido is offline  
#3 Old 03-27-2016, 03:29 PM
Newbie
 
Join Date: Mar 2016
Posts: 25
Which forum would you suggest?

Last edited by Teo123; 03-27-2016 at 03:37 PM. Reason: Not being insulting.
Teo123 is offline  
Sponsored Links
Advertisement
 
#4 Old 03-27-2016, 04:12 PM
Veggie Regular
 
odizzido's Avatar
 
Join Date: Nov 2013
Posts: 727
I don't know, I tend to avoid programming stuff when possible. I'd just google if I were looking.
odizzido is offline  
Reply

Quick Reply
Message:
Options

Register Now

In order to be able to post messages on the VeggieBoards forums, you must first register.
Please enter your desired user name, your email address and other required details in the form below.
User Name:
If you do not want to register, fill this field only and the name will be used as user name for your post.
Password
Please enter a password for your user account. Note that passwords are case-sensitive.
Password:
Confirm Password:
Email Address
Please enter a valid email address for yourself.
Email Address:

Log-in


Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page


Forum Jump: 

Posting Rules  
You may post new threads
You may 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
Trackbacks are On
Pingbacks are On
Refbacks are Off