25.descending Order

  • June 2020
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View 25.descending Order as PDF for free.

More details

  • Words: 248
  • Pages: 2
Adam’s Engineering College, Paloncha ECE Department –MPI LAB Experiment No.: 24 Page 1 of 1

Year : III/IV B.Tech II Semester

FACTORIAL OF A GIVEN NUMBER Aim: To write assembly language programs to find the ascending order of the given series of numbers. Registers: - Al, Bx, CL and DL Description: - Arranging the given series of numbers in ascending order and the result is stored in corresponding pointer. Ports:- None. DATA SEGMENT A DB 5 DUP(0) DATA ENDS CODE SEGMENT ASSUME CS: CODE, DS: DATA START: MOV CL, 05 MOV DL, 05 L1: MOV DX, 00 L2: MOV AL, A[BX] CMP AL, A[BX+1] JC L3 XCHG AL, A[BX+1] MOV A[BX], AL L3: INCBX LOOP L2 DEC DL MOV CL, 01 LOOP L1 CODE ENDS END START

Lab in-charge

HOD, ECE

Adam’s Engineering College, Paloncha ECE Department –MPI LAB Experiment No.: 24 Page 2 of 1

Year : III/IV B.Tech II Semester

(2) DATA SEGMENT X DB ? FACT DB 2 DUP(0) DATA ENDS CODE SEGMENT ASSUME CS: CODE, DS: DATA, ES: DATA START: MOV AL, 01 MOV BL, X LOOK: JZ NEXT MUL BL JNZ LOOK NEXT: MOV FACT, AL CODE ENDS END START (3) DATA SEGMENT X DB ? FACT DB 2 DUP(0) DATA ENDS CODE SEGMENT ASSUME CS: CODE, DS: DATA, ES: DATA START: MOV AL, 01 MOV CL, X LOOK: JZ NEXT MUL CL LOOP LOOK NEXT: MOV FACT, AL CODE ENDS END START Result:-

Input :- 5 Output:- 78H

Lab in-charge

HOD, ECE

Related Documents

Order
November 2019 49
Order
May 2020 24
Order
December 2019 59
Order
November 2019 60
Order Tickets
June 2020 2
Order Disbarment
June 2020 3