0% found this document useful (0 votes)
40 views

Micro LR 1

The document is a lab report that discusses an introduction to assembly language and the Turbo Assembler (TASM) software. It includes objectives, equipment used, a discussion of basic assembly concepts like registers and memory models, sample code to read and display characters from keyboard, and a conclusion on the importance of understanding assembly language. The lab aims to familiarize students with assembly syntax, basic 8086 microprocessor features, and using TASM to write and test assembly programs.

Uploaded by

Umar Mustafa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

Micro LR 1

The document is a lab report that discusses an introduction to assembly language and the Turbo Assembler (TASM) software. It includes objectives, equipment used, a discussion of basic assembly concepts like registers and memory models, sample code to read and display characters from keyboard, and a conclusion on the importance of understanding assembly language. The lab aims to familiarize students with assembly syntax, basic 8086 microprocessor features, and using TASM to write and test assembly programs.

Uploaded by

Umar Mustafa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

LAB REPORT 1

Computer Engineering
Oct 4, 2022

Name: Umar Mustafa


ID: 200365 UM
Class: BCE-5A

1
Air University Islamabad Submitted to: Mam Mariam Sabir
AIR UNIVERSITY
DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING

EXPERIMENT NO 1

Lab Title: INTRODUCTION TO ASSEMBLY LANGUAGE AND TURBO ASSEMBLER (TASM)


Student Name: Umar Mustafa Reg. No: 200365
Objective:
.
LAB ASSESSMENT:

Excellent Good Average Satisfactory Unsatisfactory


Attributes
(5) (4) (3) (2) (1)
Ability to Conduct
Experiment
Ability to assimilate the
results
Effective use of lab
equipment and follows
the lab safety rules

Total Marks: Obtained Marks:

LAB REPORT ASSESSMENT:


Excellent Good Average Satisfactory Unsatisfactory
Attributes
(5) (4) (3) (2) (1)

Data presentation

Experimental results

Conclusion

Total Marks: Obtained Marks:

Date: Signature:

2
EXPERIMENT 01

INTRODUCTION TO ASSEMBLY LANGUAGE AND TURBO


ASSEMBLER (TASM)

OBJECTIVES:
1. Getting introduced to assembly language
2. Learning some basic commands
3. Introduction to the syntax of assembly language programming
4. Learning the use of turbo assembler (TASM)
5. Some theoretical Background

EQUIPMENT:
SOFTWARE:
Turbo assembler (TASM)

DISCUSSION:
Before starting coding in assembly we should get familiarized with some basic coding
parameters, assembly language syntax and some basics of microprocessors.

Intel 8086
The 8086 is a 16-bit microprocessor chip designed by Intel between early 1976 and June
8, 1978, when it was released. 8086 Microprocessor is an enhanced version of 8085
microprocessor. It consists of powerful instruction set, which provides operations like
multiplication and division easily.

Features of 8086
The most prominent features of a 8086 microprocessor are as follows −It has an
instruction queue, which is capable of storing six instruction bytes from the memory
resulting in faster processing.
It was the first 16-bit processor having 16-bit ALU, 16-bit registers, internal data bus, and
16-bit
external data bus resulting in faster processing.
3
It is available in 3 versions based on the frequency of operation
−8086 → 5MHz
8086-2 → 8MHz
(c)8086-1 → 10 MHz
It uses two stages of pipelining, i.e. Fetch Stage and Execute Stage, which improves
performance. Fetch stage can pre-fetch up to 6 bytes of instructions and stores them in
the queue. Execute stage executes these instructions.
It has 256 vectored interrupts.
It consists of 29,000 transistors.

Introduction to Registers:
There are four type of registers in microprocessors:
1. AX –(16 bit AH,AL) (A & L)
2. BX (Base register) MOV BL, [500] (BL = 500H)
3. CX
4. DX
AX, BX are mainly used for arithmetic operations and saving address. CX is used for
saving the values for counts which is used in executing loop instructions and DX is mainly
used for I/O operations.

PROGRAM STRUCTURE:
MEMORY MODELS:
The size of code and data a program can have is determined by specifying memory model
using the .MODEL directive. The models used are SMALL, LARGE, and HUGE but the
appropriate one is .SMALL. The model directive should come before any segment
definition.

DATA SEGMENT:
The data segment is used for all the variables definitions. We use .DATA directive
followed by variable and constant declaration.

STACK SEGMENT:
The purpose of stack segment is to set aside a block of memory to store the stack. The
declaration syntax is:

4
.stack size
E.g:
.stack 100h
100 bytes would be reserved for stack. If size omitted, 1KB is the default size that would
be given to stack.

CODE SEGMENT:
Code segment contains all the programming instructions. The declaration syntax is:
.code
The last line here should be END directive followed by the exit.

Syntax:
.model small
.stack 100h
.data
.code
.startup
; Instructions go here
; Data definitions go here
.end
In 8086 assembly language, we do not call operating system subprograms by name,
instead, we use a software interrupt mechanism.
An interrupt signals the processor to suspend its current activity (i.e. running your
program) and to pass control to an interrupt service program (i.e. part of the operating
system).
The 8086 int instruction generates a software interrupt. It uses a single operand which is
a number indicating which MSDOS subprogram is to be invoked. For I/O and some other
operations, the number used is 21h. Thus, the instruction int 21h transfers control to the
operating system, to a subprogram that handles I/O operations.

INT 21h:
INT 21h may be used to invoke a large number of DOS functions; a particular function is
requested by placing a function number in AH register and invoking INT 21h. In this lab,
we will need the following functions.
5
In Lab Tasks
Q1: Take character from keyboard and display it.
Code

Output

6
Q2: Start with displaying a”?” and then reading a character from
keyboard and displaying it on next line.
Code

Output

7
Conclusion
1. Assembly language learning helps in understanding the processor and memory
functions. If the programmer is writing, any program that needs to be a compiler
that means the programmer should have a complete understanding of the
processor.
2. Today, assembly language is still used for direct hardware manipulation, access
to specialized processor instructions, or to address critical performance issues.
3. Turbo Assembler (sometimes shortened to the name of the executable, TASM) is
an assembler for software development published by Borland in 1989. It runs on
and produces code for 16- or 32-bit x86 MS-DOS and compatible on Microsoft
Windows.

You might also like