Higher language Vs. Assembly language.

Reply

Join Date: May 2007
Posts: 21
Reputation: faisaly is an unknown quantity at this point 
Solved Threads: 0
faisaly faisaly is offline Offline
Newbie Poster

Higher language Vs. Assembly language.

 
0
  #1
Jul 21st, 2008
Dear All,

would you please tell me in brief that
" What are the applications of Assembly Language where any high level language becomes insufficient".

Kind regard
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,850
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 749
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: Higher language Vs. Assembly language.

 
0
  #2
Jul 21st, 2008
An example would be certain aspects of the OS which deals with priviliged instructions.

There are others, do you have any to suggest?
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 973
Reputation: Alex Edwards is a jewel in the rough Alex Edwards is a jewel in the rough Alex Edwards is a jewel in the rough Alex Edwards is a jewel in the rough 
Solved Threads: 107
Alex Edwards's Avatar
Alex Edwards Alex Edwards is offline Offline
Posting Shark

Re: Higher language Vs. Assembly language.

 
0
  #3
Jul 26th, 2008
I've just begun reading the AoA book, and the author points out that one of the benefits of Assembly is that it is faster than any HLL and can provide algorithms that HLL's cannot.

I hope that's helpful >_>
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 134
Reputation: mathematician is an unknown quantity at this point 
Solved Threads: 3
mathematician mathematician is offline Offline
Junior Poster

Re: Higher language Vs. Assembly language.

 
0
  #4
Jul 29th, 2008
Personally I would say that the only time you need assembly language in the modern world is if you are writing an operating system, anything else which is very low level, or with something which is very speed critical.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 42
Reputation: abhisdm is an unknown quantity at this point 
Solved Threads: 4
abhisdm abhisdm is offline Offline
Light Poster

Re: Higher language Vs. Assembly language.

 
0
  #5
Aug 5th, 2008
Assembly language programming is sometimes advantage because it's written keeping the processor in mind.. that is the limitations of processor are taken care and thus the code turns out optimized one.. also writing the code in assembly removes the necessity of cross compilation (carried out for many processors) and thus execution times are faster...
hope this helps a bit..
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 134
Reputation: mathematician is an unknown quantity at this point 
Solved Threads: 3
mathematician mathematician is offline Offline
Junior Poster

Re: Higher language Vs. Assembly language.

 
0
  #6
Aug 5th, 2008
Originally Posted by abhisdm View Post
Assembly language programming is sometimes advantage because it's written keeping the processor in mind.. that is the limitations of processor are taken care and thus the code turns out optimized one.. also writing the code in assembly removes the necessity of cross compilation (carried out for many processors) and thus execution times are faster...
hope this helps a bit..
I'm not sure I understand any of that. Ignoring macros for the moment, assembly language mnemonics are just a more readable version of machine code instructions; there is more or less a one to one correspondence between them. It is possible to turn out assembly code as poorly written as code in any other language. Further, since assembly code is just a disguised version of machine code, it is very processor specific.

I may be wrong, but I suspect abhisdm is confusing assembly language with .NET assemblies.
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 42
Reputation: abhisdm is an unknown quantity at this point 
Solved Threads: 4
abhisdm abhisdm is offline Offline
Light Poster

Re: Higher language Vs. Assembly language.

 
0
  #7
Aug 6th, 2008
Sincere apologies to those who were confused by my reply .... All i wanted to say is that many a times its preferred that the codes are written in assembly wherever possible...
If m wrong.. please correct me....
regards
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 9
Reputation: gsbr is an unknown quantity at this point 
Solved Threads: 0
gsbr gsbr is offline Offline
Newbie Poster

Re: Higher language Vs. Assembly language.

 
0
  #8
Aug 8th, 2008
In my opinion, speed , "special tuning".
Although the portability suffers as ASM is done for one kind of processor only.


gsbr
Last edited by gsbr; Aug 8th, 2008 at 12:15 pm.
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 5
Reputation: Olof Forshell is an unknown quantity at this point 
Solved Threads: 0
Olof Forshell Olof Forshell is offline Offline
Newbie Poster

Re: Higher language Vs. Assembly language.

 
0
  #9
Sep 9th, 2008
I'm a relatively accomplished C and assembly programmer and use the OpenWatcom C/C++ development environment.

When I began programming in 1982 the compilers were pretty good but you could still get sizeable speed advantages by coding in assembly. With the advent of multi-stage pipelines and parallell execution units it has become increasingly difficult to get any "classical" speed advantage by hand-coding in assembly. One application I worked with a few years ago had an extremely tight loop (10 lines of C code) in a function that I thought I'd optimize. Several hours and versions of code later I had managed to best the C code by a few percent - definitely not worth the effort.

Since I still write fast applications I've turned to another advantage of assembly which is inlining, using OpenWatcom's "#pragma aux" construct:

Suppose you have a loop which scans though a buffer and depending on what it finds moves data from the buffer elsewhere. Ususally you would use memcpy which calls a small procedure containing a load-store-iterate loop. Using the Watcom construct the move operation(s) are inlined with the C-code which gives two performance advantages, namely that I reduce the number of parameter preparation/call/return/stack fixups and that I lessen the risk of an instruction cache miss (since I can ususally assume that my memcpy procedure won't be anywhere near - address-wise - the loop that calls it which will, in all probability cause, a miss). Because of the reduced overhead my entire loop (usually) becomes smaller which also increases the probability of staying in the cache.

This may sound like splitting hairs but you get a great speed advantage if you're able to keep to the L1 cache without having to stoop so low as to resort to L2, L3 or even RAM (God forbid!).
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 9
Reputation: gsbr is an unknown quantity at this point 
Solved Threads: 0
gsbr gsbr is offline Offline
Newbie Poster

Re: Higher language Vs. Assembly language.

 
0
  #10
Sep 9th, 2008
Very sensible and it sums it all.
I stay with asm for fun only and because I am lousy in C++
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC