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

Lab Report

This lab report discusses basic assembly language instructions such as MOV, XCHG, ADD, SUB, INC, DEC, and NEG. The report was written by Bilawal Hassan, a student at the University of Management & Technology. The objectives are to understand how to use these basic instructions in assembly language programming. Each instruction is explained, such as MOV to move data between locations and registers, ADD to add operands and store the result, and INC to increment a value by 1. In conclusion, the student learned about these fundamental assembly instructions that are important for writing efficient programs for microprocessors.

Uploaded by

f2021266175
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Lab Report

This lab report discusses basic assembly language instructions such as MOV, XCHG, ADD, SUB, INC, DEC, and NEG. The report was written by Bilawal Hassan, a student at the University of Management & Technology. The objectives are to understand how to use these basic instructions in assembly language programming. Each instruction is explained, such as MOV to move data between locations and registers, ADD to add operands and store the result, and INC to increment a value by 1. In conclusion, the student learned about these fundamental assembly instructions that are important for writing efficient programs for microprocessors.

Uploaded by

f2021266175
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Department of Computer Science

School of Systems and Technology

University of Management & Technology

Computer Organization & Assembly Language Lab Student Name: Bilawal Hassan

Student ID: F2021266175

Resource Person: Waseem Iqbal Section: V-5

Lab Report # 04

Title: Basic assembly language instruction.

Objectives:
The objectives of this lab report are to understand the basic assembly instructions such as MOV, XCHG,
ADD, SUB, INC, DEC, and NEG and to learn how to use them in assembly language programming.

Understanding:
Assembly language is a low-level programming language that is used to write programs for microprocessors
and microcontrollers. It is a symbolic representation of machine language, which makes it easier for
programmers to write and understand programs that run on the hardware. In assembly language programming,
instructions are written in mnemonic form, which is then translated into machine code by an assembler.
MOV (Move) instruction is used to move data from one location to another. It copies the value of the source
operand to the destination operand. For example, MOV AX, BX copies the value of BX into AX register.
XCHG (Exchange) instruction is used to exchange the values of two operands. For example, XCHG AX, BX
exchanges the values of AX and BX registers.
ADD (Addition) instruction is used to add two operands and store the result in the destination operand. For
example, ADD AX, BX adds the values of AX and BX registers and stores the result in AX register.
SUB (Subtraction) instruction is used to subtract the second operand from the first operand and store the result
in the destination operand. For example, SUB AX, BX subtracts the value of BX from AX and stores the result
in AX register.
INC (Increment) instruction is used to increment the value of the operand by 1. For example, INC AX
increments the value of AX register by 1.
DEC (Decrement) instruction is used to decrement the value of the operand by 1. For example, DEC AX
decrements the value of AX register by 1.
NEG (Negation) instruction is used to negate the value of the operand. For example, NEG AX negates the
value of AX register.

Learning/Conclusions:

In this lab report, we learned about some of the basic assembly instructions such as MOV, XCHG, ADD, SUB,
INC, DEC, and NEG. These instructions are fundamental to assembly language programming and are used
extensively in writing programs for microprocessors and microcontrollers. By understanding these instructions,
we can write efficient and effective programs that run on the hardware.

You might also like