Write an assembly program which prints the largest values among three variables. You can initialize three integers in data section (let's say 10, 45, 15).
Assembly program which prints the largest values among three variables : -
Here, we use N1,N2 & N3 for storing three variables. And, LRG for storing largest number among them.
Code:-
DATA SEGMENT
N1 DB 10H
N2 DB 45H
N3 DB 15H
LRg DB ?
ENDS
CODE SEGMENT
ASSUME DS:DATA CS:CODE
START:
MOV AX,DATA
MOV DS,AX
MOV AL,N1
MOV LRG,AL
CMP AL,N2
JGE LABEL1
MOV AL,N2
MOV LRG,AL
LABEL1:
MOV AL,LRG
CMP AL,N3
JGE LABEL2
MOV AL,N3
MOV LRG,AL
LABEL2:
MOV AH,4CH
INT 21H
ENDS
END START
--------------------------------------------------------------------------------
Screenshots:

Before Execution :

After Execution :

Now , you can see LRG variable has the largest.
(I have used 8086 emulator).
------------------------------------------------------------------------------------------------------------------------------------------------------
Please give your valuable feedback and also rate my efforts.
Thank You
Write an assembly program which prints the largest values among three variables. You can initialize three...
2) Write an assembly program that is algorithmically equivalent to the following C+t code Consider the variables to be 8-bit unsigned integers; you may initialize them to any values 0-255 if you like for testing purposes 13 int speed, lower, a, b; 14 15 if (speed < 98) { 16 17 if (speed <80) t 18 lower++; 19 20 21 else f 23 24 25 26 else t 27 28
2) Write an assembly program that is algorithmically equivalent to...
Two variables named largest and smallest are assigned for you. Use these variables to store the largest and smallest of the three integer values. You must decide what other variables you will need and initialize them if appropriate. Write the rest of the program using assignment statements, if statements, or elif statements as appropriate. There are comments in the code that tell you where you should write your statements. The output statements are written for you. Execute the program. Your...
Write MARIE assembly language programs that do the following: I. Write a program that inputs three integers, a, b, and c, in that order. It computes the following ia-bi-fc+ c The result should be written to output 2. Write a program that inputs integers, s. y, and z. It outputs the difference of the langest and first element entered. You may assume x. y, and z all have different values. So if 8, 12, and 9 are input, the output...
Consider a program that takes three numbers as input and prints the values of these numbers in descending order. Its input is a triple of positive integers (say x, y and z) and values are from interval [300,700]. Generate boundary value and robust test cases.
6. Write an assembly program to find the largest of twenty 32-bit values stored in ascending memory starting at "data1". Store the largest data element found at "largest", and store the address of the largest data found at "largest address" .text .global main .equ data1, 0x40000000 .equ largest, Ox40001000 .equ largestaddress, 0x40001000 LDR RO, -data1 LDR R1,=largest LDR R2, largestaddress
6. Write an assembly program to find the largest of twenty 32-bit values stored in ascending memory starting at "data1"....
Java Programming Write a program called “LargestNumber”, that compares below three numbers and prints out the largest number. Num1 = 10, Num2-15, Num3=20. 1. You must use “If/else” logical statement to compare the three numbers.
Please code in c
1. Write a program which does the following: Declare and initialize three pointers. One points to an integer, one points to a float and one points to a character variable Ask the user to enter appropriate values for these variables. Output the values to the screen by accessing the variables directly and then by using pointer references. Print the address of each variable. Modify the variables by performing any arithmetic operation only using pointer refer- ences...
Coral 5.1. Write a program whose inputs are three integers, and whose output is the largest of the three values. Ex: If the input is 7 15 3, the output is: 15 Please provide the answer in Coral with proper line spacing/format.
Four Integer Stats Write an ARM Assembly Language (I will not accept Intel Assembly code) program to prompt the user to enter four integers. Have your program output to the screen the four integers that were entered at the keyboard, along with the following: sum of the four integers, smallest value, largest value, and the average of the four values. You must utilize the scanf function for reading in the user input and the printf function for outputting the results...
3.14 CH3 LAB: Largest number Write a program whose inputs are three integers, and whose output is the largest of the three values. If the input is 7 15 3, the output is: 15 LAB ACTIVITY please give me code in c++ 3.14.1: CH3 LAB: Largest number