Tuesday, September 23, 2008

Question # 4:

Justify what situations or applications programmers will rather use Assembly Languages than Higher Level Progamming Languages and vice versa.


Answer:

Assembly language are generally very simple, unlike in a high-level language. Each instruction typically consists of an operation or opcode plus zero or more operands. Most instructions refer to a single value, or pair of values. Generally, an opcode is a symbolic name for a single executable machine language instruction. Operands can be either immediate (typically one byte values, coded in the instruction itself) or the addresses of data elsewhere in storage.


Most assemblers also support pseudo-operations, which are directives obeyed by the assembler at assembly time instead of the CPU at run time. (For example, pseudo-ops would be used to reserve storage areas and optionally set their initial contents.) Often the names of pseudo-ops start with a dot to distinguish them from machine instructions.


Most assemblers provide flexible symbol management, letting programmers manage different namespaces, automatically calculate offsets within data structures, and assign labels that refer to literal values or the result of simple computations performed by the assembler. Labels can also be used to initialize constants and variables with relocatable addresses.


Assembly languages, like most other computer languages, allow comments to be added to assembly source code that are ignored by the assembler. Good use of comments is even more important with assembly code than with higher-level languages.

http://www.wikipedia.com/

Wednesday, September 17, 2008

Tuesday, September 16, 2008

Question # 3:

Research in the net what is the best assembler and why.



Answer:
High-level assemblers is the best assembler because it can provide language abstractions such as:


1. Advanced control structures .


2. High-level procedure/function declarations and invocations .


3. High-level abstract data types, including structures/records, unions, classes, and sets .


4. Sophisticated macro processing .


5.Object-Oriented features such as encapsulation, polymorphism, inheritance, interfaces .





http://en.wikipedia.org/wiki/Assembly_language#Assembler

Question # 2:

Research in the net usual applications done in assembly language. Describe these applications briefly and cite the efficiency and effectiveness of these applications.


Answer:
Typical Application:
Hard-coded assembly language is typically used in a system's boot ROM(BIOS on IBM-compatible PC systems). This low-level code is used, among other things, to initialize and test the system hardware prior to booting the OS, and is stored in ROM. Once a certain level of hardware initialization has taken place, execution transfers to other code, typically written in higher level languages; but the code running immediately after power is applied is usually written in assembly language.

Many compilers render high-level languages into assembly first before fully compiling, allowing the assembly code to be viewed for debugging and optimization purposes. Relatively low-level languages, such as C, often provide special syntax to embed assembly language directly in the source code. Programs using such facilities, such as the Linux kernel, can then construct abstractions utilizing different assembly language on each hardware platform.

The system's portable code can then utilize these processor-specific components through a uniform interface.
Assembly language is also valuable in reverse engineering, since many programs are distributed only in machine code form, and machine code is usually easy to translate into assembly language and carefully examine in this form, but very difficult to translate into a higher-level language. Tools such as the Interactive Disassembler make extensive use of disassembly for such a purpose.

A particular niche that makes use of assembly language is the demoscene. Certain competitions require the contestants to restrict their creations to a very small size (e.g. 256B, 1KB, 4KB or 64 KB), and assembly language is the language of choice to achieve this goal.

When resources, particularly CPU-processing constrained systems, like the Amiga and the Commodore 64, are a concern, assembler coding is a must: optimized assembler code is written "by hand" and instructions are sequenced manually by the coders in an attempt to minimize the number of CPU cycles used; the CPU constraints are so great that every CPU cycle counts. However, using such techniques has enabled systems like the Commodore 64 to produce real-time 3D graphics with advanced effects, a feat which would be considered unlikely or even impossible for a system with a 0.99MHz processor.

http://en.wikipedia.org/wiki/Assembly_language#Assembly_language

Sunday, September 14, 2008

Question # 1:

What topic(s) in MCS 213 do you find easy and/or difficult and why?

Answer:
The topics I find difficult is the programming exercises such as: The conversion of binary system to decimal system and conversion of decimal system to number system. For me what makes it difficult is that because of i have no idea about the formula to be used.