Docsity

Computer organization and Assembly language, Study notes of Microprocessor and Assembly Language Programming

Toggle sidebar
bg1
Lab No.1
Student Name: Roll no:
Introduction of Assembly Language
Objective:
In this lab you will become:
Familiar with Assembly language & its types
Familiar with Assembler & Linker
Familiar with emulator software:
Introduction:
Assembly Language: Assembly language is a low-level programming language for a
computer, or other programmable device specific to particular computer architecture in
contrast to most high level programming languages, which are generally portable across
multiple systems. Unlike machine language, which consists of binary and hexadecimal
characters, assembly languages are designed to be readable by humans Assembly language is
converted into executable machine code by a utility program referred to as an assembler like
NASM, MASM etc.
List of High Level Languages:
1. Python
2. Java
3. JavaScript
4. C++
5. C#
6. Ruby
7. Perl
8. PHP
List of Low Level Languages:
1. assembly language
2. machine language
pf3
pf4
pf5

Partial preview of the text

Download Computer organization and Assembly language and more Study notes Microprocessor and Assembly Language Programming in PDF only on Docsity!

Lab No.

Student Name: Roll no:

Introduction of Assembly Language

Objective:

In this lab you will become:  Familiar with Assembly language & its types  Familiar with Assembler & Linker  Familiar with emulator software:

Introduction:

Assembly Language: Assembly language is a low-level programming language for a computer, or other programmable device specific to particular computer architecture in contrast to most high level programming languages, which are generally portable across multiple systems. Unlike machine language, which consists of binary and hexadecimal characters, assembly languages are designed to be readable by humans Assembly language is converted into executable machine code by a utility program referred to as an assembler like NASM, MASM etc. List of High Level Languages :

  1. Python
  2. Java
  3. JavaScript
  4. C++
  5. C#
  6. Ruby
  7. Perl
  8. PHP List of Low Level Languages:
  9. assembly language
  10. machine language

Types of Assembly Language

1) CISC(Complex Instructions Set Computer) Assembly Language : o Developed when people wrote assembly Language. o Complicated, often specialized instructions with many affects. o Many Complicated Addressing nodes. o Often executed by a little program microcode. 2) RISC (Reduced Instruction Set Computer) Assembly Language: o Response to growing use of Compilers. o Easier to target uniform instruction sets. o Make the Most common operations as fast as possible. o Designed to be pipelined. 3) DSP (Digital Signal Processing) Assembly Language: o Digital signal processors designed specifically for signal processing algorithms. o Lots of Regular arithmetic on vectors. o Often Written by Hands. o Substantial instruction level-parallelism. 4) VLIW (Very Long instructions Word) Assembly Language: o Response to growing desire for instruction level-parallelism. o Many parallel ALU’s. o Heavily pipelined. o Very difficult to Program by Hand. o More Regular Instruction Set.

Assembler

An assembler is a program that converts source-code programs written in assembly language into object files in machine language. Popular assemblers have emerged over the years for the Intel family of processors. These include  MASM (Macro Assembler from Microsoft) o MASM contains a macro language that has features such as looping, arithmetic, and text string processing. MASM gives you greater control over the hardware. By using MASM, you also can reduce time and memory overhead in your code.  TASM (Turbo Assembler from Borland), o It is used to convert your assembly language file to an object file that contains the machine code that the processor will execute.

Softwares That Work On Assembly Language

1. emu8086: 8086emu is an cross-platform emulator for the Intel 8086 microprocessor. 2. Flat Assembler: The flat assembler is a fast and efficient self-assembling x86 assembler for DOS. 3. NASM: The Netwide Assembler, NASM, is an 80x86 and x86-64 assembler designed for portability and modularity.

Using the Emulator

If you want to load your code into the emulator, just click " Emulate " button. The emulator can load executables created by other assemblers as well by select Show emulator from the Emulator menu.

And then loading files from " MyBuild " or any other folder. So if there are no files in " MyBuild " folder return to source editor, select Examples from File menu, load any sample, compile it and then load into the emulator: [ Single Step ] button executes instructions one by one stopping after each instruction. [ Run ] button executes instructions one by one with delay set by step delay between instructions. Double click on register text-boxes opens " Extended Viewer " window with value of that register converted to all possible forms. You can modify the value of the register directly in this window. Double click on memory list item opens " Extended Viewer " with WORD value loaded from memory list at selected location. Less significant byte is at lower address: LOW BYTE is loaded from selected position and HIGH BYTE from next memory address. You can modify the value of the memory word directly in the " Extended Viewer " window; you can modify the values of registers on runtime by typing over the existing values. [ Flags ] button allows you to view and modify flags on runtime.

Code:

__________________________________________________________________

__________________________________________________________________

__________________________________________________________________

__________________________________________________________________

__________________________________________________________________

__________________________________________________________________

__________________________________________________________________

__________________________________________________________________

__________________________________________________________________

__________________________________________________________________

__________________________________________________________________

__________________________________________________________________

__________________________________________________________________

__________________________________________________________________