Tuesday, October 7, 2008

MCS213 Report




Intel 8048


-The Intel 8048 microcontroller

-Intel's first microcontroller

-was used in the Magnavox Odyssey² video game console

-The 8048 is probably the most prominent member of Intel's MCS-48 family of microcontrollers.

-A 8048-family chip with UV EPROM, the 8749.

-This one is made by NEC.

-The 8048 has a Modified Harvard architecture, with internal or external program ROM and 64–256 bytes of internal (on-chip) RAM.

-Though the 8048 was eventually replaced by the very popular Intel 8051/8031, even at the turn of the millennium it remains quite popular, due to its low cost, wide availability, memory efficient one-byte instruction set, and mature development tools.

-Because of this it is much used in high-volume consumer electronics devices such as TV sets, TV remotes, toys, and other gadgets where cost-cutting is essential.




Intel 8051

-The Intel 8051 is a Harvard architecture

-single chip microcontroller which was developed by Intel in 1980 for use in embedded systems.

-Intel's original versions were popular in the 1980s and early 1990s
-8051-compatible devices manufactured by more than 20 independent manufacturers including Atmel, Infineon Technologies (formerly Siemens AG), Maxim Integrated Products (via its Dallas Semiconductor subsidiary), NXP (formerly Philips Semiconductor), Nuvoton (formerly Winbond), ST Microelectronics, Silicon Laboratories (formerly Cygnal), Texas Instruments and Cypress Semiconductor.

-Intel's official designation for the 8051 family of µCs is MCS 51.
http//www.wikipedia.com/

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.



Answer:

#include
#define perkilo 25.5


/* Programmed by Harvey Losin *//* http://www.bikoy.com/harvey *//* webmaster@bikoy.com */
main()
{int kilo;
float amount;
clrscr();

printf("This program will ask the user to input the kilos");
printf("\n How many kilos of rice you want to buy?:");
scanf("%d",&kilo);
amount=perkilo*kilo;
printf("\nThe price per kilo of rice is P%d,perkilo");
printf("\nThe kilos of rice you bought is %d",kilo);
printf("\nYou will pay P%f",amount);
getch();
}

http://www.harveys.com/

Wednesday, October 1, 2008

Question # 5:

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



Answer:


The most recent assembler is the c++:


History



Many credit the origin of the name "C" as being a follow-on to APL (A Programming Language) and then BCPL, (B Computer Programming Language), or just plain "B" as it was most commonly called. APL was completely different in concept. With B, the original idea was to create machine code that was as closely identical to coding in assembly as possible, along with library functions for input/output, mathematical functions, etc. For the purists who thought it necessary to program in assembly to get full performance, it allowed the opportunity to program at a higher level and achieve better productivity. C is very similar to B, and while is not as efficient as B, it is available for a much greater variety of processors and platforms.



Stroustrup began work on C with Classes in 1979. The idea of creating a new language originated from Stroustrup's experience in programming for his Ph.D. thesis. Stroustrup found that Simula had features that were very helpful for large software development, but the language was too slow for practical use, while BCPL was fast but too low-level to be suitable for large software development. When Stroustrup started working in AT&T Bell Labs, he had the problem of analyzing the UNIX kernel with respect to distributed computing. Remembering his Ph.D. experience, Stroustrup set out to enhance the C language with Simula-like features. C was chosen because it is general-purpose, fast, portable and widely used. Besides C and Simula, some other languages which inspired him were ALGOL 68, Ada, CLU and ML. At first, the class, derived class, strong type checking, inlining, and default argument features were added to C via Cfront. The first commercial release occurred in October 1985.


In 1983, the name of the language was changed from C with Classes to C++ (++ being the increment operator in C and C++). New features were added including virtual functions, function name and operator overloading, references, constants, user-controlled free-store memory control, improved type checking, and BCPL style single-line comments with two forward slashes (//). In 1985, the first edition of The C++ Programming Language was released, providing an important reference to the language, since there was not yet an official standard. In 1989, Release 2.0 of C++ was released. New features included multiple inheritance, abstract classes, static member functions, const member functions, and protected members. In 1990, The Annotated C++ Reference Manual was published. This work became the basis for the future standard. Late addition of features included templates, exceptions, namespaces, new casts, and a Boolean type.


As the C++ language evolved, a standard library also evolved with it. The first addition to the C++ standard library was the stream I/O library which provided facilities to replace the traditional C functions such as printf and scanf. Later, among the most significant additions to the standard library, was the Standard Template Library.



Nature



C++ provides more than 30 operators, covering basic arithmetic, bit manipulation, indirection, comparisons, logical operations and more. Almost all operators can be overloaded for user-defined types, with a few notable exceptions such as member access (. and .*). The rich set of overloadable operators is central to using C++ as a domain specific language. As a simple example, a class that represents a matrix could overload the multiplication (*) and other arithmetic operators, allowing it to be treated by application code similarly to the standard numerical types.:


matrix A, B;
matrix C = A * B;


The overloadable operators are also an essential part of many advanced C++ programming techniques, such as smart pointers.


Overloading an operator does not change the precedence of calculations involving the operator, nor does it change the number of operands that the operator uses (any operand may however be ignored).



C++ Templates support generic programming. Function (or method) templates and class templates are supported. C++ templates are implemented by expansion : at compile-time, there is a complete expansion of the function or class template. Template expansion is a very powerful concept that can lead to optimized code, and to policy-based template metaprogramming. However, with this power there is also a cost. The expansion may increase code size, since for each type using the template at compile time, a duplicate of the templatized code is made: one copy for each type. This is in contrast to template type erasure seen in other languages (Java programming language) where at compile-time the type is erased and a single template body is preserved.







http://www.answers.com/