CS401 GDB Solution Spring June 2012

CS401 Computer Architecture and Assembly Language Programmin GDB Solution Spring 2012

Presently, we are having 5th Generation of Programming Languages. The new programming languages are offering sophisticated tools, support and flexibility for better programming. However, we still interested in Assembly Language Programming. Find out the basic reasons and advantages, which still make Assembly Language Programming as one of important and basic tool

Solution:

Assembly language is very useful for routines that require high speed and highly optimized code. It is also required for Boot Loaders (i.e. LILO, GRUB, etc…) and Operating Systems.
Most high level languages are very slow in comparison to ASM as has already been stated but this is mainly due to the multiple levels of abstraction that separates native binary from the HL language in question.

High Level languages have HUGE runtime dependancies, ASM can be optimised to have none whatsoever which is why they are indeed used in bootstrapping and OS installers, it lets you run a program on a completely blank computer.

The other benefits of knowing ASM include gaining a much deeper understanding of how a computer works at the lowest level. Thi definitely affects the way you write code in HLL too.
if you know assembly language, stick with it, it is THE BEST, the compiler does not mess with your code, it does not change any of the ASM code, it simply directly, converts each instruction to machine code, and thats it. It wont check for extensive errros like VB or others, such as ‘runtime error file not found’ – none of that because the compiler has not messed with your code.

Other advantages…
The programmer has COMPLETE control over how the program works, unlike other high level languages.

Final advantage, filezise – a program which only displays a messagbox then quits (including the windows DLLs)

ASM: 3kb
VB6: 16kb

^thats a huge difference
Assembly Language is the closest abstract to machine code. In many cases, you might have a processor directive say 0010101001010101010111111111000111, in assembly – instead of remembering all those 1, an 0′s you might have to remember MOV es,ax

(I have no idea, btw, what that binary sequence means!)

You then use an assembler to convert your instructions into machine code – with no interference or optimisation done by the assembler.
Assembler is still a high level programming language and is the next step up in making code easier to understand or human readable, it is still converted to machine language in order for the computer to understand it which is the lowest level.

It’s quicker to develop applications using the latest higher level language tools and the differences in performance these days is hard to notice as most machines tote enough power it doesn’t make much of a real difference.

But in terms of speed, effeciency, can easily create your own programming language and re-invent the wheel, and portability assembler stands out a bit.

The downside is there’s alot missing in terms of all the latest tools and features for using syntax for simplicity and rapid application development.

The programs are small, lightweight, and don’t require bulky runtimes which need to be downloaded, plus you develop totally for free.

Size and speed isn’t so much an issue as time, money, and ease of development these days, plus, people aren’t as deeply educated and focus is only on working with the IDE more so than how the internal code itself works, this develops false positives and leaves many security exploit possibilities open in the higher level languages.

A big comparison would be this, let’s say you needed an application with moderate to complicated functionality complete for commercial business application for a client, you aren’t well skilled in assembler but could popup something in short amount of time in higher level language, if it takes a few to several years to complete in assembler and you only have a few days to a week your best bet is higher level language to get it done now and get paid.

Either way, it’s all about picking the language that you’re comfortable working with and can understand, don’t be afraid to try something new and keep developing!

Leave a Reply

Related Posts Plugin for WordPress, Blogger...