Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

solve the problem using Assembly Language only Question 1 Create_an_array_of_size_10._Take_inputs_from_the_user_and_populate_the_array._The_inputs_will_be_numerical_values_ranging_from_[1-9]._Now,_you_are_to_find_all_the_pairs_of_numbers_whose_sum_is_equal_to_10._ If_there_are_no_such_pairs_then_print_SORRY!_No_Such_Pairs Remember_that_a_number_can_be_used_to_form_multiple_pairs Sample Input 01: 1 2 3 4 5 6 7 8 9 1

solve the problem using Assembly Language only

Question 1

Create_an_array_of_size_10._Take_inputs_from_the_user_and_populate_the_array._The_inputs_will_be_numerical_values_ranging_from_[1-9]._Now,_you_are_to_find_all_the_pairs_of_numbers_whose_sum_is_equal_to_10._

If_there_are_no_such_pairs_then_print_SORRY!_No_Such_Pairs

Remember_that_a_number_can_be_used_to_form_multiple_pairs

Sample Input 01:

1 2 3 4 5 6 7 8 9 1

Sample Output 01:

19

28

37

46

Sample Input 02:

1 2 3 4 1 1 2 3 4 5

Sample Output 02:

SORRY! No Such Pairs

Kindly provide comments, so that i can understand every lines.

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 with AI-Powered Solutions

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

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions