add [bx+si],al means what?

Please support our Assembly advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Oct 2009
Posts: 3
Reputation: kemaletikan is an unknown quantity at this point 
Solved Threads: 0
kemaletikan kemaletikan is offline Offline
Newbie Poster

add [bx+si],al means what?

 
0
  #1
Oct 31st, 2009
Hi fellas,
I have a question about disassembled code. I have a very simple assembly code that prints "Hello world" to screen. When I disassembled it by using nasm(ndisasm), I got a text file. After that I opened it and started to analyze it. However, in a section that comes after " int 0x80" there are a lot of "add [bx+si],al" statement. What does it means? Can you explain me?
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 433
Reputation: gerard4143 is on a distinguished road 
Solved Threads: 52
gerard4143's Avatar
gerard4143 gerard4143 is offline Offline
Posting Pro in Training
 
0
  #2
Oct 31st, 2009
Originally Posted by kemaletikan View Post
Hi fellas,
I have a question about disassembled code. I have a very simple assembly code that prints "Hello world" to screen. When I disassembled it by using nasm(ndisasm), I got a text file. After that I opened it and started to analyze it. However, in a section that comes after " int 0x80" there are a lot of "add [bx+si],al" statement. What does it means? Can you explain me?
Depends really...it could be a bunch of data that the de-compiler is having trouble with...more likely, its just the header or footer information that comes with every executable...If you want to look your code try objdump instead. Objdump conveniently removes all this extra data...
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 3
Reputation: kemaletikan is an unknown quantity at this point 
Solved Threads: 0
kemaletikan kemaletikan is offline Offline
Newbie Poster
 
0
  #3
Oct 31st, 2009
Originally Posted by gerard4143 View Post
Depends really...it could be a bunch of data that the de-compiler is having trouble with...more likely, its just the header or footer information that comes with every executable...If you want to look your code try objdump instead. Objdump conveniently removes all this extra data...
thanks for your help. I tried objdump and I got a clear code. add [bx+si],al are lost. Are you sure it is de-compiler problem? Can it be something important about program?
The program writes on screen. Can it be related with writing operation?
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 433
Reputation: gerard4143 is on a distinguished road 
Solved Threads: 52
gerard4143's Avatar
gerard4143 gerard4143 is offline Offline
Posting Pro in Training
 
0
  #4
Nov 1st, 2009
Originally Posted by kemaletikan View Post
thanks for your help. I tried objdump and I got a clear code. add [bx+si],al are lost. Are you sure it is de-compiler problem? Can it be something important about program?
The program writes on screen. Can it be related with writing operation?
Like I said its probably the header or footer information that's added to the exe. This information. header/footer is used by the linker and operating system...

If you really want to see what's in your file then open it in a hexeditor and check the result against the objdump. You'll easy see where the header, footer and your code begins and ends.
Last edited by gerard4143; Nov 1st, 2009 at 12:15 am.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 3
Reputation: kemaletikan is an unknown quantity at this point 
Solved Threads: 0
kemaletikan kemaletikan is offline Offline
Newbie Poster
 
0
  #5
Nov 1st, 2009
Originally Posted by gerard4143 View Post
Like I said its probably the header or footer information that's added to the exe. This information. header/footer is used by the linker and operating system...

If you really want to see what's in your file then open it in a hexeditor and check the result against the objdump. You'll easy see where the header, footer and your code begins and ends.
Thanks pal, you are really for me. I appreciate it.
Best regards.
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 433
Reputation: gerard4143 is on a distinguished road 
Solved Threads: 52
gerard4143's Avatar
gerard4143 gerard4143 is offline Offline
Posting Pro in Training
 
0
  #6
Nov 1st, 2009
Originally Posted by kemaletikan View Post
Thanks pal, you are really for me. I appreciate it.
Best regards.
If your looking for a good 32/64 bit disassembler that works in Linux then check out Biew at:

http://biew.sourceforge.net/en/biew.html
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 6
Reputation: cyb3rl0rd1867 is an unknown quantity at this point 
Solved Threads: 0
cyb3rl0rd1867's Avatar
cyb3rl0rd1867 cyb3rl0rd1867 is offline Offline
Newbie Poster
 
0
  #7
Nov 1st, 2009
To be quite literal it means to add the register al to the address at bx+si.
Reply With Quote Quick reply to this message  
Reply

Message:



Other Threads in the Assembly Forum


Views: 646 | Replies: 6
Thread Tools Search this Thread



Tag cloud for Assembly
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC