Question: 1. Write a program that searches for a character inside a string. Both the string and the search character should be taken from the user.
1. Write a program that searches for a character inside a string. Both the string and the search character should be taken from the user. Once the character is found, your program should output the location of the character, that is, the index of the character where it resides. If there are multiple instances of the same character, then take only the first one into consideration.
2. Write a complete assembly program to read 16 digits, each digit separated by a single space from the keyboard. Convert them from character to numbers and calculate the average, lowest and highest score and display them on the screen.
Hint: Subtract 30h from each character to get actual digit. Before display, add 30h to each digit. For division operation, use appropriate shift instruction.
3. Write a program to calculate the number of ones in the binary string of a number.
Write the code in assebly language in EMU8086.
For example like this pic below:

#emu8086 - assembler and microprocessor emulator 4.08 file edit bookmarks assembler emulator math ascii codes help 7 help new open save compile emulate calculator convertor options about examples G1 include 'emu8086.inc' 02 03 - model small 04 -stack 100h 95 06.data 07 str db 50 dup( 08 len equ $-str 09 char db ? 10 11 .code 12 13 main proc 14 I 15 mov ax, Cdata 16 mov ds, ax 17 18 lea distr 19 moy dx, len 20 call get_string 21 22
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
