3. Write a program in assembly language that reads a number from the keyboard and displays it on the screen.
4. Write a program in assembly language to ask two digits from the user, store the digits in the EAX and EBX register, respectively, add the values, store the result in a memory location 'res' and finally display the result.
3)
section .text
global _start
_start:
mov ecx, msg
mov edx, msg_len
mov ebx, 1
mov eax, 4
int 0x80
mov eax,3
mov ebx,0
mov ecx,sum
int 80h
mov ecx, res_prompt
mov edx, res_len
mov ebx, 1
mov eax, 4
int 0x80
mov ecx, sum
mov edx, 2
mov ebx, 1
mov eax, 4
int 0x80
mov eax, 1
int 0x80
section .data
msg db "Enter a number ", 0xA
msg_len equ $ - msg
res_prompt db "The input number is "
res_len equ $ - res_prompt
segment .bss
sum resb 2
Output :-

4)
section .text
global _start
_start:
mov ecx, msg
mov edx, msg_len
mov ebx, 1
mov eax, 4
int 0x80
mov eax,3
mov ebx,0
mov ecx,dig_1
mov edx,2
int 80h
mov ecx, msg
mov edx, msg_len
mov ebx, 1
mov eax, 4
int 0x80
mov eax,3
mov ebx,0
mov ecx,dig_2
mov edx,2
int 80h
mov ecx, res_prompt
mov edx, res_len
mov ebx, 1
mov eax, 4
int 0x80
mov eax, [dig_1]
sub eax, '0'
mov ebx, [dig_2]
sub ebx, '0'
add eax, ebx
add eax, '0'
mov [res],eax
mov ecx, res
mov edx, 1
mov ebx, 1
mov eax, 4
int 0x80
mov eax, 1
int 0x80
section .data
msg db "Enter a digit ", 0xA,0xD
msg_len equ $ - msg
res_prompt db "The sum of two digits is "
res_len equ $ - res_prompt
segment .bss
dig_1 resb 2
dig_2 resb 2
res resb 1
Output :-

3. Write a program in assembly language that reads a number from the keyboard and displays...
write a program in x86 assembly language that sorts 10 integers entered from the keyboard and displays them in order
Write a program in assembly language that loads register R2 with the word in memory location which is 10 bytes above the address in R0; and loads register R3 with the word in memory location which is 10 bytes below the address in R1. Your program must compare the two numbers in R2 and R3. If number in R2 is less than or equal to the number in R3 it must add the two numbers and save the result in...
Problem 1: Write a program that reads a positive float number and displays the previous and next integers. Sample Run: Enter a float: 3.5 The previous and next integers are 3 and 4. Problem 2: Write a program that reads two integers and displays their sum, difference, product, and the result of their division. Sample Run: Enter two integers: 8 5 Sum: 8, Difference: 3, Product: 40, Division: 1.6 Problem 3: Write a program that reads a three-digit integer from...
Using emu8086.inc , write an assembly program that display the message 'Enter the number:' Then, reads a byte from the user, then count the number of 1’s in it, and display them on screen.
Create the following two programs in assembly language: 1. Write a program that will call a procedure to push the following Decimal value into eax - 31000 and then clear the register using pop. 2. Write a program that will call a procedure to use minMax to push an array values into eax register.
1. Write a program that reads a sequence of numbers from the keyboard, and displays the smallest number. The sequence has at least one number and is terminated by -999(-999 will not appear in the sequence other than as the end marker). 2. Write a program which requests an integer input n from the keyboard and computes the sum of square of k for all k from 1 to n(inclusive). use java
NOTE: explain the lines in comments for better understanding Write an assembly program (for x86 processors - Irvine) that has two procedures, a main procedure and a procedure called Fib. The fib procedure is to uses a loop to calculate and printout the first N Fibonacci numbers. Fibonacci sequence is described by the following formula: Fib(1) = 1, Fib(2) = 1, Fib(n) = Fib(n – 1) + Fib(n – 2). The value of N is to be communicated to this...
Write a program that reads k integers and displays their sum. Write a program that reads k values representing family income from the keyboard and place them into the array. Find the maximum income among these values. Count the families that make less than 10 percent of the maximum income. (JAVA)
Write a program to draw this number triangl using MIPS assembly
language
The number of rows is inputted from keyboard.
6. Write a program to draw this number triangle 1 1〈--|--〉1 The number of rows is inputted from keyboard.
6. Write a program to draw this number triangle 1 1〈--|--〉1 The number of rows is inputted from keyboard.
In C Language Write a program that reads characters from scanf1 (keyboard) and gives the number of vowels (lower case) entered, stopping when ‘q’ has been entered. Construct three versions of this program, using the while, do-while, and for loops. 3 different version