Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solve the following problems using Assembly Language Code Question 2 Declare_an_array_of_size_10_and_populate_the_array_by_taking_inputs_from_the_user._The_inputs_should_be_within_the_range_[0_to_9]._The_task_is_to_place_all_odd_numbers_at_the_front_of_the_array_without_changing_the_order_of_even_numbers._Then_print_the_elements_of_the_array_in_new_lines._The_order_of_the_odd_numbers_should_also_be_unchanged. Remember_you_cannot_declare_a_new_array_here._You_have_to_do_this_in-place._This_is_a_must.____ Sample input 01: 6, 4, 5, 9, 0, 2, 1, 7, 8, 3

Solve the following problems using Assembly Language Code

Question 2

Declare_an_array_of_size_10_and_populate_the_array_by_taking_inputs_from_the_user._The_inputs_should_be_within_the_range_[0_to_9]._The_task_is_to_place_all_odd_numbers_at_the_front_of_the_array_without_changing_the_order_of_even_numbers._Then_print_the_elements_of_the_array_in_new_lines._The_order_of_the_odd_numbers_should_also_be_unchanged.

Remember_you_cannot_declare_a_new_array_here._You_have_to_do_this_in-place._This_is_a_must.____

Sample input 01:

6, 4, 5, 9, 0, 2, 1, 7, 8, 3

Sample Output 01:

5

9

1

7

3

6

4

0

2

8

Solve the problem using assembly language using "emu8086" Software:

Do not use advanced level syntax. I have to Solve the problem in my Academic way.

Try not to use - CALL,PROC,RET,JZ and Macro msg and all other advanced level syntax.

ScreenShot of the "emu8086" Software:

image text in transcribed

A 1 emu8086 - assembler and microprocessor emulator 4.08 file edit bookmarks assembler emulator math ascii codes help +++ * E new open examples save compile emulate calculator convertor options help about GO model small ; We choose model small because we need less than 64kb of memory size 002 003 ; We are creating messages 004 original source co... 005 printmsg macro msg ntmag 006 ; Pushing general 698 Mov ah, 4ch ng to emulator: noname.exe_ n 007 push ax 999 int 21h 008 push bx 100 file math debug view external virtual devices virtual drive help 099 push cx 101 G10 push dx 102 ; Procedure to read a n 1 ID >> 311 LEA dx,msg ; Load: 103 readnum proc near regis 012 mov ah,09h ; Use Load reload step back single step run step delay ms: 0 104 push ax G13 int 21 h G14 ; Poping all regi: 166 push cx 105 push bx alled registers F490: 92 94 . L 015 pop dx F400:02 94 916 pop cx 107 push dx 108 mov num,00 AX 4C 85 F4200: FF 255 RES BIOS DI 017 popbx 109 r1: F4201: FF 255 RES INT 921h 018 popax 110 mov ah,01 h B8 | 00 | 09 F4202: CD 205 = I RET 019 end 111 int 21h F4203 : 21 033 ! ADD CBX + SI, AL 020 .data 112 cmp al,dh CX 00 00 | F4204: CF 207 1 ADD [BX + SI], AL 021 113 je r2 14205: GIG GIGIO NULL ADD [BX + SI], AL 022 msg1 db Gah,Odh," 114 mov CX, ax DX 00 05 F4206: 00 000 NULL ADD [BX + SI], AL 023 arr dw 3_dup> 115 and cx,00ffh +4207: 00 000 NULL ADD [BX + SI], AL 024 msg2 db Gah, Odh," 10 -.. av L. AL CS F499 F4208: 00 000 NULL ADD [BX + SI], AL 025 msg3 db Gah, odh," F4209: 00 900 NULL ADD [BX + SI), AL 926 ms.O4 dh fahadh" IP TAO: 00 00 00 000 NULL ADD [BX + SI), AL 022 SERI emulator screen (80x25 chars) 00 000 NULL ADD [BX + SIJ, AL 028 00 000 NULL ADD [BX + SI], AL 029 00 000 NULL ADD [BX + SI), AL 030 1st Input:4 00 000 NULL ADD [BX + SI], AL 031 2nd Input:5 90 000 NULL ADD [BX + SI], AL 032 3rd Input:6 00 000 NULL ADD [BX + SI], AL 033 go 900 NULL Sorted Array:4 5 6 034 ADD [BX + SI), AL 00 000 NULL Median: 5 035 ADD [BX + SIL, AL 90 000 NULL ADD [BX + SIT, AL 036 00 000 NULL ADD [BX + SI], AL 032 00 000 NULL 038 039 040 source reset aux Vars debug stack flags 041 042 043 044 045 046 G47 048 049 050 AV 1 line: 166

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions

Question

Find Io in the network infigure. 2 kll 4000/y 12 k 4 kn 2 kf 12 mA

Answered: 1 week ago

Question

Presentations Approaches to Conveying Information

Answered: 1 week ago