# Assembly Languages



## nitish_mythology (May 26, 2006)

Can u pls guide me abt assembly languag programming....

What is the diff between them and HLL?
Examples(Is perl too an assembly level language?)
There use in the present time.

Thnx...


----------



## nithinks (May 26, 2006)

assembly level languages are the basic for all programming languages that we
work with.
All softwares that we execute will ultimately in ASSEMBLY LEVEL  only!
A.L.L  consists a set of instructions, including register to register ,reg to memory ,and mem to reg instructions
typical A.L.L looks something like

assume CS code,DS data
MOV AX,DATA
MOV DS,AX
data ends
code segment
...
...
...
code ends

this program consists two segments DATA and CODE respy.
AX,BX,CX,DX are general purpose CPU registers(16bit or 32 bit)
DS etc are data segment  stack segment is SS 
suppose we want to add the contents of two registers,
ADD AX,BX
the result will be stored in BX
like this u have to write the entire program
even TC,TC++ etc are basically designed using assembly  level lang
only.


----------



## ilugd (May 26, 2006)

do a search on google for "assembly language simple tutorial" and browse through the results. You will get quite a few of them. 

However be warned that assembly language programming is not easy. And if you really want to learn programming, start with some other language, as assembly screws up your programming style. Try python, c++ or java instead.

Just my two cents!


----------



## gary4gar (May 26, 2006)

in lay man words;
assembly language [edited]reason oops my bad! ! !
HLL uses comman words as systax and then a complier or interpretor converts them in binary code.hope its clear

regrads,
gary


----------



## nitish_mythology (May 26, 2006)

I hv no intention to learn assembly level programming...
Two ques--
1.Is it used nowdays, if yes than whats its use?
2.Is perl an assembly level language?


----------



## puja399 (May 26, 2006)

This is what I know:
1) Assembly language does not involve writing programs in Machine Code or Binary code. Assembler converts the assembly language code into object code, unlike other Middle/High level languages where the compiler converts the respective code into machine/object code. It is the Linker that converts the Object code into Machine code or Binary code. So, the opinion that Assemble language uses binary code to express the routine is not correct. HLL uses terms and syntaxes that are closer to english terms, and uses functions/procedures/libraries that hide the internal working of the code, and thus making the code more readable /reusable.

2) Interpreter does not convert anything, it just interprets the code line by line and executes it within its own virtual machine, like, VBScript, Perl etc. This is the basic difference between Assembler/Compiler and Interpreter, that is u cannot get the Object code from the Interpreter, and thus Native code cannot be obtained from it (excluding the situations where JIT compiler is available from within the VM).
3) Assembly language programming is still very much useful nowadays (even in this era of Java and .NET), especially if u write device drivers or want to reverse engineer anything. As a matter of fact, there are a group of people who use Win32 Assembly language to create very small, incredibly fast and useful freewares that also look nice. In fact, it is often said that a good part of the Windows OS itself is written in Assembly language. Assembly language programming is available in Linux platform also.

4) Perl is neither Assembler nor compiler, but only an Interpreter, but I already said that earlier. 

5)Unlike popular beliefs, Win32 Asm Language is not that difficult (its certainly much easier than the 16-bit era), but it requires expert knowledge nevertheless. Its better to learn the basic programming capabilities (with C++ or Java) and then try Asm.


----------



## rohan (May 26, 2006)

It's better to go with C/C++. Java isn't a that good language. Java as I view it has been a failure. Perl and Python are also good languages and excellent if you plan to go towards linux development. Almost all distros today come with deticated Perl and Python support.


----------



## puja399 (May 26, 2006)

rohan said:
			
		

> ...
> Java as I view it has been a failure......



What is the reason for such a view??


----------



## nitish_mythology (May 27, 2006)

Java a failure!!
I dont think so....


----------



## abhasbajpai (May 30, 2006)

java now days mostly used for mobile plateform or embeded platefporfms only
BTW could any one tell me a good sucessfull (comerssioly)standalone application devolped in JAVA and why any biggy (adode, IBM or any uses java in their application where as c++ is used everywhere)


----------



## JGuru (May 30, 2006)

Java is used widely on the Server-side. There are 5 million Java developers 
worldwide. On the Mobile front it's gaining ground. Of late Java GUI applications are flooding 
thanks to some performance improvements implemented by Sun.
Lot of fortune 500 companies like Oracle, HP, IBM , BEA, Oracle use Java.
JBoss is a very successful Web Server fully written in Java, now acquired by
RedHat. A company called Techdigm has developed an Office Suite fully in Java.
It's called  Techdigm Office 2.1. It's fully compatible with MS Office.
Checkout the link for yourself:
*www.techdigm.com/product.jsp
Still not convinced, checkout Swing Sightings:
*java.sun.com/products/jfc/tsc/sightings/index.html
There are hundreds of GUI applications developed using Java.


----------



## dheeraj_kumar (May 30, 2006)

dont tell me you guys dont use LimeWire 

win32 asm is not difficult, its just a little complicated. you just need to know about the processor, registers(high, low) and extended ones(EIP, EDI etc) also about interrupts. thats the basic in asm. its not like high level languages, but is the most simplest form of a code.


----------



## rohan (May 30, 2006)

abhasbajpai is right.. The Bytecode nature (compiled/interpreted) of Java applets is the main reason for problems. Any Java program is 10 to 20 times slower than it's C++ counterpart(if written optimally). Java hasn't been succesfull in complete utilization of the OS's API as has been C++. Java is definitely an easier language, but the programming language 'D' (*digitalmars.com/d) is equally simpler and compiles to executables. Java is used only on mobile platforms and for internal processes and servlets(which are also out of fashion now) but never for commercial applications.


----------



## abhasbajpai (May 31, 2006)

j guru agreed
but could tell me why the SUN has devloped its office suite (star office and open source open office.org)in c++ and not in JAVA that answers my question and do you have stats how many devlopers for c++ and related languges
and could tell me the market share of APATCHE and JBoss
BTW star office and open office.org are most popular office suite after MS Office


----------



## nitish_mythology (May 31, 2006)

Finally JGuru is here to answer..
I was waiting for this!!


----------



## puja399 (May 31, 2006)

Friends, I think we are forgetting what the topic was......


----------



## khansdream (May 31, 2006)

Yes Puja399, you were explaining assembly lang. And i really appreciate the way you explained. I wanted to rep you but its disable presently by mods (ref. my anothor thread...........!!!

Can u tell me how can I format a hdd (with 75% bad sectors) by using this lang. I know its possible bcoz one of my friend works with a data recovery firm and after recovering data they simply format a damaged hdd and sell out on low prices.


----------



## MysticHalo (May 31, 2006)

> [FONT=verdana, helvetica, arial, sans-serif]Java is now nearly equal to (or faster than)  C++ on low-level and numeric benchmarks.  This should not be surprising: Java is a compiled language  (albeit JIT compiled).  [/FONT] [FONT=verdana, helvetica, arial, sans-serif]Nevertheless, the idea that "java is slow" is widely believed. Why this is so is perhaps the most interesting aspect of this article.    [/FONT]
> [FONT=verdana, helvetica, arial, sans-serif]Let's look at several possible reasons:  [/FONT]
> 
> [FONT=verdana, helvetica, arial, sans-serif]
> ...



Benchmarks here
IMo, JVM is a bigger nuisance than speed 
[/FONT]


----------



## JGuru (Jun 1, 2006)

Why Sun has developed StarOffice & OpenOffice using C++?
The answer is most users have only 256 MB RAM.Big applications
like Office suite written in Java need 512 MB RAM or higher to
make it load fast. I use NetBeans , which is written in Java, so
your System should have a minimum of 512 MB RAM to run it
smoothly. Give it 1 GB RAM it will run even more faster!!
Since most of the users have either 128 or 256 MB RAM installed
in their System, Sun decided to write the Office suite in C++.
Or they could have written the whole thing in Java and compiled
it using a JIT compiler, which converts the bytecode to 'EXE'.
Sun could have written most of the Java API in C++, that would have
made Java zoom in Jet speed. But they didn't do it.
Of late Sun is trying to make Java more faster & stable.


----------



## abhasbajpai (Jun 12, 2006)

JGuru said:
			
		

> Why Sun has developed StarOffice & OpenOffice using C++?
> The answer is most users have only 256 MB RAM.Big applications
> like Office suite written in Java need 512 MB RAM or higher  Give it 1 GB RAM it will run even more faster!!.


 now that answer the question that why java is for future use not for today maybe by than c++ will be evilved more than java and take its leap forward



> Sun could have written most of the Java API in C++, that would have
> made Java zoom in Jet speed. But they didn't do it.
> Of late Sun is trying to make Java more faster & stable.


 this defies suns perpose if they use c++ whats the use of java even in api 
*whel one more quetion when java can run on embeded systems having memories in less than tens of mb (like in cell phones where some times the memorie is less than 2mb) than why it needs such high reuirement on pc*


----------

