You are on page 1of 2

11/12/21, 9:35 AM Declare An Array That Contains The Numbers: 1,2,3,... | Chegg.

com

  Home Study tools


 My courses
 My books Career Life 

Find solutions for your homework Search

home / study / engineering / computer science / computer science questions and answers / declare an array that contains the numbers: 1,2,3,4 (by…

Question: Declare an array that contains the numbers: 1,2,3,4 (byte size).… Post a question
Answers from our experts for your tough
homework questions

Declare an array that contains the numbers: 1,2,3,4 (byte size).


Use BX to point to the first array element Enter question
initially. Subtract the
second array element from the first, and store the result in the
fourth element. Use the
INC and DEC commands to change the array
element that is pointed to.ls

Save the indirect.s source file as


/home/username/project1/indirect.s.
*To be done in linux assembly language
Continue to post
0 questions remaining

Expert Answer

Anonymous answered this


Was this answer helpful? 0 0
Snap a photo from your
143 answers phone to post a question
Answer: We'll send you a one-time download
link
This is an emu8086 assembly code:

.MODEL SMALL 888-888-8888 Text me


.STACK 100h
By providing your phone number, you agree to receive a one-tim
.DATA automated text message with a link to get the app. Standard
messaging rates may apply.

Array DB 1,2,3,4 //DECLARATION IN BYTE SIZE

.CODE

MAINPROC My Textbook Solutions

MOV AX,@DATA

MOV DS,AX

OUTPUT:

MOV BX,ARR[0] // BX POINTING TO ARRAY FIRST


ELEMENT Matching Operations Principles of..
Supply with... and Supply...
MOV ah ,ARR[1] //storing second  element in ah 2nd Edition 14th Edition 3rd Edition

View all solutions


SUB ah, BX //Subtracting from Second array element to
first and stores in ah

MOV ARR[3],ah // substracted value storing to 4th


element in array

MAIN ENDP

END MAIN

FEEL FREE TO COMMENT ON COMMENT SECTION

please🙏🙏upvote sirr

Comment


Questions viewed by other students

Q: Repeat the previous problem, but use SI to point to the first


array element. Use indexed addressing with a
displacement value to
access other array elements. E.g. do not change the contents of the
SI register. Save the
indexed.s source file as
/home/username/project1/indexed.s.
*To be done in linux assembly language

A: See answer

https://www.chegg.com/homework-help/questions-and-answers/declare-array-contains-numbers-1-2-3-4-byte-size--use-bx-point-first-array-element-ini… 1/2
11/12/21, 9:35 AM Declare An Array That Contains The Numbers: 1,2,3,... | Chegg.com

  Home Study tools


 My courses
 My books Career Life 

COMPANY

LEGAL & POLICIES

CHEGG PRODUCTS AND SERVICES

CHEGG NETWORK

CUSTOMER SERVICE

© 2003-2021 Chegg Inc. All rights reserved.

https://www.chegg.com/homework-help/questions-and-answers/declare-array-contains-numbers-1-2-3-4-byte-size--use-bx-point-first-array-element-ini… 2/2

You might also like