Question

Using assembly language, make a source code program that would yield such results or output. Enter...

Using assembly language, make a source code program that would yield such results or output.

Enter values: 2,4,1,6,8,9,3 Odd count: 3 Evens: 2,4,6,8

0 0
Add a comment Improve this question Transcribed image text
Answer #1

.model small

.data

arr1 db 2,4,1,6,8,9,3

Evens db 10 dup(?)

Oddcount db 0

Evencount db 0

.code

MOV ax,@data

MOV ds,ax

LEA bx,arr1

LEA SI,Evens

MOV cx,07

MOV dh,02

L1: MOV ah,00

MOV al,[bx]

MOV dl,al

DIV dh

CMP ah,00

JE even

INC Oddcount

INC bx

LOOP L1

JMP call

even: MOV [SI],dl

INC SI

INC bx

LOOP L1

call :

MOV ax,0000

MOV bx,[SI]

MOV al,Oddcount

L2:MOV bl,[SI]

INC SI

JMP L2

MOV ax,4C00h

INT 21h

end

Add a comment
Know the answer?
Add Answer to:
Using assembly language, make a source code program that would yield such results or output. Enter...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Four Integer Stats Write an ARM Assembly Language (I will not accept Intel Assembly code) program...

    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...

  • Write a program for a 2-bit multiplier in assembly language. Also, multiple 01 and 10 and show th...

    Write a program for a 2-bit multiplier in assembly language. Also, multiple 01 and 10 and show the output in the program. Review the pipeline table and suggest changes to improve the performance. Output: Assembly language code with screenshot of the output. Also mention/highlight the cycle count for the complete program. The cycle count should be optimized for performance improvement. Also, display pipeline table with 3-4 suggestion for improvements FOR RISC-V using RIPES simulator

  • using Assembly Language Write a code that gives the following output :- * ** *** ****...

    using Assembly Language Write a code that gives the following output :- * ** *** **** ***** using registers and counters only.

  • In PEP8 code. assembly pep8 code. 30. Write an assembly language program that corresponds to the...

    In PEP8 code. assembly pep8 code. 30. Write an assembly language program that corresponds to the following C+ program #include <iostream> using namespace std; int num; int main() cin >> num: num = num/ 16; cout << "num = " << num << endl; return 0; 21 de

  • NEED HELP WITH THIS . Write a MARIE assembly language program that would simulate calling and exe...

    NEED HELP WITH THIS . Write a MARIE assembly language program that would simulate calling and executing the following C function, as shown below: z = someFunction(a, b); where z, a and b are main( ) program variables, and the values stored in a and b are input by the user. The value stored in z will be output. Did your program execute correctly? This is the code for the function: int someFunction(int x, int y) { return 3 *...

  • Write a program that outputs "Hello World!" in assembly language using the MASM assembler. Code should...

    Write a program that outputs "Hello World!" in assembly language using the MASM assembler. Code should be in 32 bit code. preferably in visual studio

  • Write this code using x86 assembly language using the irvine32 library

    Write this code using x86 assembly language using the irvine32 library Create a procedure that fills an array of doublewords with N random integers, making sure the values fall within the range j...k, inclusive. When calling the procedure, pass a pointer to the array that will hold the data, pass N, and pass the values of j and k. Preserve all register values between calls to the procedure. Write a test program that calls the procedure twice, using different values...

  • INTEL 80x86 ASSEMBLY LANGUAGE CODE Write a windows32 assembly language program that utilizes a recursive procedure....

    INTEL 80x86 ASSEMBLY LANGUAGE CODE Write a windows32 assembly language program that utilizes a recursive procedure. The main (_MainProc) procedure should: accept, from the user, a positive integer. Guard against non-positive integers being entered using a loop. call the sumseries sub-procedure using the cdecl protocol, receive the results of the sub-procedure, and display the results. The sumseries sub-procedure should: recursively find the sum of the series: 1*2 + 2*3 + 3*4 + ... + i*(i+1) (This is an iterative definition....

  • Make a Complete Code in C++ language. Create a Complete program of Tower of Hanoi using...

    Make a Complete Code in C++ language. Create a Complete program of Tower of Hanoi using stack implementation. The code should not copied means code should unique. Code should not copy paste from any where. Write the code in easy way means coding should of beginner level. Also use more and more comments in the code for better understanding. The code should complete and should able to run. Also provide output of the program. ( 1 ) Code should not...

  • Make a Complete Code in C++ language. Create a Complete program of Tower of Hanoi using...

    Make a Complete Code in C++ language. Create a Complete program of Tower of Hanoi using stack implementation. The code should not copied means code should unique. It is very neccessary to make code by own. Code should not copy paste from any where. Write the code in easy way means coding should of beginner level. Also use more and more comments in the code for better understanding. The code should complete and should able to run. Also provide output...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT