Saturday, August 20, 2011

Assembly vs Machine language

1.)Assembly language is more human-readable than machine language.
2.)Statements in assembly language are written using short codes for the instruction and arguments, such as "MOV $12 SP", as opposed to machine language, where everything is written as numbers.
3.)assembler is used to translate the assembly language
4.)Assembly language can have comments and macros as well, to ease programming and understanding then machine language.
5. Assembly language is fast and efficient to write assembly language then machine language.
6.) Assembly language  uses a very small amount of memory then m/c language

Assembly Directives

Assembly Directives :-An assembler directive is a message to the assembler that tells the assembler something it needs to know in order to carry out the assembly process; for example, an assemble directive tess the assembler where a program is to be located in memory.
<label> EQU <value> Equate
ORG <value> Origin
<label> DC <value> Define constant
<label> DS <value> Define storage
END <value> End of assembly language
In each case, the term <label> indicates a user-defined label (i.e., symbolic name) that must start in column 1 of the program, and <value> indicates a value that must be supplied by the programmer (this may be a number, or a symbolic name that has a value).
1.)Equate:-The EQU assembler directive simply equates a symbolic name to a numeric value.
2.)Origin:-The origin directive tells the assembler where to load instructions and data into memory.
3.)Define Constant:-The define constant assembler directive allows you to put a data value in memory at the time that the program is first loaded.
4.)Define Storage:-The define storage directive is used to reserve one or more memory locations.
5.)END - END directive is placed after the last
statement of a program to tell the assembler that this is the end
of the program module. The assembler will ignore any
statement after an END directive.
6.)ENDP - End Procedure.
7.)ENDS - End Segment.
8.)GROUP - The GROUP directive is
used to group the logical segments.
9.)INCLUDE - This INCLUDE directive is
used to insert a block of source code from the named file
into the current source module.
10.)TYPE - TYPE operator instructs the assembler to
determine the type of a variable and determines the number of
bytes specified to that variable.
11.)PTR - It is used to assign a specific type of variable.
12.)EVEN-INSTRUCT to increment the location of the counter to the next even address.

System software (Assembly language)

 Assembly language:-
Assembly language is is a low-level programming language and symbolic representation of a processor's native code. Assembly languages are also known as symbolic languages as they use symbols to represent the arithmetic and logical operations. It uses mnemonics and symbolic operands .
This reduces coding time and the amount of information the programmer has to remember. They use assembler to convert the program in to machine language (object program).
A utility program called an assembler is used to translate assembly language statements into the target computer's machine code.
Advantage or Disadvantaged  of assembly language:-
1.)Assembly language is a symbolic representation of a processor's native code.
2.)Assemble language is hardware particular and not as prone to errors in code that are for generic hardware.because it is written for a hardware platform.
3.)It is possible to write fast and efficient .
4.)It use a very small amount of memory.
5.)Requires fewer instructions to accomplish the same result.
6.)Easy to make insertions and deletions.
Disadvantages:
1.)Programs written in such languages cannot be executed on small sized computers.
2.)It takes lot of time to code or write the program, as it is more complex in nature.
3.)Lack of portability of program between computers of different makes.
4.)Maintenance of assembly language is notoriously difficult,.