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

Write A Program To Find The Highest Among 5 Grades and Write It in DL

This document describes subtracting two 32-bit numbers stored in memory locations using x86 assembly language instructions. It shows the memory locations of the two numbers to be subtracted and the location to store the result. It then lists the assembly instructions to load the least significant words of each number into registers, subtract them and store the result, then load and subtract the next words while propagating the borrow, storing each result back to memory.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
104 views

Write A Program To Find The Highest Among 5 Grades and Write It in DL

This document describes subtracting two 32-bit numbers stored in memory locations using x86 assembly language instructions. It shows the memory locations of the two numbers to be subtracted and the location to store the result. It then lists the assembly instructions to load the least significant words of each number into registers, subtract them and store the result, then load and subtract the next words while propagating the borrow, storing each result back to memory.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Example 32-bit subtraction of 2 32 bit numbers X and Y that are stored in the memory as X = (DS:203h)(DS:202h)(DS:201h)(DS:200h) Y = (DS:103h)(DS:102h)(DS:101h)(DS:100h) The result

sult X = Y to be stored where X is saved in the memory MOV SI, 200h MOV DI, 100h MOV AX, [SI] SUB AX, [DI] MOV [SI], AX ;save the LS word of result MOV AX, [SI] +2 SBB AX, [DI]+2 MOV [SI] +2, AX -2Write a program to find the highest among 5 grades and write it

in DL

QUIZZ:

You might also like