Introduction To Assembly Language
Introduction To Assembly Language
Introduction To Assembly Language
CHAPTER 1
OVERVIEW OF COMPUTER SYSTEMS
• Our operating system hides several of the low-level details so that the
assembly language programmer can work easily
• System hardware, which consists of digital logic circuits and the associated
support electronics execute the machine language instructions.
CISC PROCESSOR
• Disadvantages:
• Though the code size is minimized but it requires several clock cycles to execute a single
instruction. Thereby reduce the overall performance of the computer.
• Implementing pipelining for CISC instruction is a bit complicated.
• The hardware structure needs to be more complex to simplify software implementation.
• Designed to minimize the memory requirement when memory was smaller and costlier. But
today the scenario has changed nowadays memory is inexpensive and mostly all
computers have a large amount of memory.
RISC PROCESSOR
• RISCdesigns use uniform instruction length for almost all instructions, and
employ strictly separate load/store-instructions.
• The many varieties of RISC designs include MIPS, SPARC, IBM POWER
instruction set, Alpha, RISC-V, ARM architecture, ARC.
• RISC processors are also used in supercomputers, Unix workstation, embedded
processors in laser printers, routers and similar products
• The use ofARM architecture processors in smartphones and tablet computers
such as the iPad and Android devices provided a wide user base for RISC-
based systems.
RISC PROCESSOR
Transistors used for storing complex instructions Spends more transistors on memory registers
The machine language instructions of CISC RISC processors use fixed-length machine
processors vary in length language instructions
WHAT IS ASSEMBLY LANGUAGE?
• The first instruction increments the variable result. This assembly language
instruction is equivalent to result++;
WHAT IS ASSEMBLY LANGUAGE?
• The operands in these instructions are in processor registers. The processor registers t1, t2,
and t3 are identified by $.
• The andi instruction performs bitwise and of t1 contents with 15 and writes the result in t2.
• The second instruction adds contents of t1 and t2 and stores the result in t3.
• The last instruction copies the t1 value into t2.
ADVANTAGES OF HIGH-LEVEL LANGUAGES
• It takes a lot of time and effort to write the code for the same.
• The syntax is difficult to remember
• It has a lack of portability between different computers
WHY PROGRAM IN THE ASSEMBLY LANGUAGE?
• Space efficiency refers to the memory requirements of a program, i.e., the size
of the executable code
• Time efficiency refers to the time taken to execute a program. Obviously a
program that runs faster is said to be better from the time-efficiency point of
view
• Assembly language programs have direct control over system hardware. For
example, writing a device driver to a new scanner on the market almost
certainly requires programming in the assembly language
TYPICAL APPLICATIONS
• Time efficiency: Applications for which the execution speed is important fall
under two categories:
• 1. Time convenience (to improve performance)
• 2. Time-critical (to satisfy functionality)
1. Applications in the first category benefit from time-efficient programs
because it is convenient or desirable. For example, a graphics package that
scales an object instantaneously is more pleasant
TYPICAL APPLICATIONS
• Text book
• https://en.wikipedia.org/wiki/Complex_instruction_set_computer
• https://en.wikipedia.org/wiki/Reduced_instruction_set_computer
• https://cs.stanford.edu/people/eroberts/courses/soco/projects/risc/risccisc/