Thursday, October 9, 2008

final question

Since not all MCS 213 students can try DEBUG commands because of the technical problems of our computers, search now any Turbo C program with assembly codes in it and run this in your PC. Check the result of your running C program.If the program produces the expected output, copy the Turbo C codes into your post and its result. YOu may do this by pressing Print Screen on your keyboard for the result of your program then, switch to Paint Brush and Paste. Resize the window and copy this to your post.


int openfile(FILE **fileptr, char *name, char *mode)
{
*fileptr = fopen(name, mode);
...
}
int main()
{
FILE *fp;
openfile(&fp, "foo", "r");
...
}

question # 5

Research in the net the most recent assembler. Describe its history, nature and applications. Evaluate this assembler from its predecessor.

Cite your reference. Refrain from copying and pasting answers.


FASM is a low-level assembler. It does not support as many high-level statements as MASM or TASM.Instead it provides syntax features and macros which make it possible to customize or create missing statements. Its memory addressing syntax is similar to TASM's ideal mode and NASM. Brackets are used to denote memory operands as in both assemblers but their size is placed outside the brackets like in NASM.

FASM is a multi-pass assembler. It makes extensive code size optimization, and allows more forward referencing. A usual FASM construct is defining data or procedures only if they are used somewhere in the code, something that in most languages is done per-object by the linker.

FASM is based on the SSSO principle (same source, same output). This means the contents of the resulting file are not affected by the command line[9] (except recently (in 1.67.24) added "-D" switch). Such an approach saves FASM sources from compilation problems often present in many assembly projects. On the other hand, it makes it very hard to maintain a project that consists of multiple separately compiled source files, or mixed-language projects. FASM projects can be built from a single source directly into executable without a linking stage.


history:

The project was started in 1999 by Tomasz Grysztar, aka Privalov (at that time, an undergraduate student of mathematics from Poland) and its first public release was announced on March 15, 2000. FASM is completely written in assembly language and comes with full source. It is self-hosting and has been able to assemble itself since version 0.90 (May 4, 1999). It has been used to write several operating systems including MenuetOS KolibriOS and DexOS.


references:


www.wikipedia.com




Wednesday, October 1, 2008

question # 4

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

Cite your reference.

Assembly language

From Wikipedia.com, the free encyclopedia

See the terminology section below for information regarding inconsistent use of the terms assembly and assembler.

An assembly language is a low-level language for programming computers. It implements a symbolic representation of the numeric machine codes and other constants needed to program a particular CPU architecture. This representation is usually defined by the hardware manufacturer, and is based on abbreviations (called mnemonics) that help the programmer remember individual instructions, registers, etc. An assembly language is thus specific to a certain physical or virtual computer architecture (as opposed to most high-level languages, which are usually portable).

Assembly languages were first developed in the 1950s, when they were referred to as second generation programming languages. They eliminated much of the error-prone and time-consuming first-generation programming needed with the earliest computers, freeing the programmer from tedium such as remembering numeric codes and calculating addresses. They were once widely used for all sorts of programming. However, by the 1980s (1990s on small computers), their use had largely been supplanted by high-level languages, in the search for improved programming productivity. Today, assembly language is used primarily for direct hardware manipulation, access to specialized processor instructions, or to address critical performance issues. Typical uses are device drivers, low-level embedded systems, and real-time systems.

A utility program called an assembler is used to translate assembly language statements into the target computer's machine code. The assembler performs a more or less isomorphicmnemonic statements into machine instructions and data. (This is in contrast with high-level languages, in which a single statement generally results in many machine instructions. A compiler, analogous to an assembler, is used to translate high-level language statements into machine code; or an interpreter executes statements directly.) translation (a one-to-one mapping) from

Many sophisticated assemblers offer additional mechanisms to facilitate program development, control the assembly process, and aid debugging. In particular, most modern assemblers (although many have been available for more than 40 years already) include a macro facility (described below), and are called macro assemblers.




In computing, a high-level programming language is a programming language with strong abstraction from the details of the computer. In comparison to low-level programming languages, it may use natural language elements, be easier to use, or more portable across platforms. Such languages hide the details of CPU operations such as memory access models and management of scope.

A high level language isolates the execution semantics of a computer architecture from the specification of the program, making the process of developing a program simpler and more understandable with respect to a low-level language. The amount of abstraction provided defines how 'high level' a programming language is.


question # 3

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


Cite your reference.


A good all around assembler, great for beginners because of its simplicity



.http://flatassembler.net/

Monday, September 22, 2008

Question # 2
Research in the net usual applicappliations done in assembly language. Describe these applications briefly and cite the efficiency and effectiveness of these applications.Include your reference. REFRAIN FROM COPYING AND PASTING THE ENTIRE TEXTS.









Travel
See All...
if (typeof ANSW != "undefined")
ANSW.Init(10,"");
setTz();
assignParam("screenres",screen.width,1000*60*60*24*365*5);
Sponsored Links
Assembly Code LibraryOpen Source Code Snippet Library. Free Community for Developers.www.daniweb.com/code
InduKey Assembly Ltd.OEM Assembling & Manufacturing of Electromechanical Products in Chinawww.indukey-assembly.com
Computer Desktop Encyclopedia: assembly language
A programming language that is one step away from machine language. Each assembly language statement is translated into one machine instruction by the assembler. Programmers must be well versed in the computer's architecture, and, undocumented assembly language programs are difficult to maintain. It is hardware dependent; there is a different assembly language for each CPU series.
It Used to All Be Assembly Language
In the past, control programs (operating systems, database managers, etc.) and many applications were written in assembly language to maximize the machine's performance. Today, C/C++ is widely used instead. Like assembly language, C/C++ can manipulate the bits at the machine level, but it is also portable to different computer platforms. There are C/C++ compilers for almost all computers.
Assembly Language Vs. Machine Language
Although often used synonymously, assembly language and machine language are not the same. Assembly language is turned into machine language. For example, the assembly instruction COMPARE A,B is translated into COMPARE contents of memory bytes 2340-2350 with 4567-4577 (where A and B happen to be located). The physical binary format of the machine instruction is specific to the computer it's running in.
They Can Be Quite Different
Assembly languages are quite different between computers as is evident in the example below, which takes 16 lines of code for the mini and 82 lines for the micro. The example changes Fahrenheit to Celsius.

Wednesday, September 10, 2008

My first BLOG!

Now that you have your first blog, your first writing assignment is to answer the question below:What topic(s) in MCS 213 do you find easy and/or difficult and why?Follow this format:Title: Question #:
Question:________________
Answer: MCS 213 is difficult.And i expect it. Because there are program languages that i can't understand.
But i try my best to catch up by listening to your lecture.
Student Name:Jose Krisol A. Rosit