Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I want answer for G and I. Please write in .asm (like the table above) 5.15 Write ASC assembly language programs for the following. Start

image text in transcribed

image text in transcribed

I want answer for G and I.

Please write in .asm (like the table above)

5.15 Write ASC assembly language programs for the following. Start programs at locations #HO, using ORG 0 Statement. a. Subtract an integer stored at memory location A from that at B and store the result at C. b. Read several integers from the input device one at a time and store them in a memory location start- ing at Z. The input process should stop when the integer read has a value of 0. c. Change the program in (b) to store only positive integers at a location starting at POS. d. Modify the program in (b) to store the positive integers starting at POS and the negative integers starting at NEG e. Location #H50 contains an address pointing to the first entry in a table of integers. The table is also in the memory and the first entry is the number of entries in the table, excluding itself. Store the maximum and minimum valued integers at memory locations MAX and MIN, respectively. f. SORT the entries in a table of n entries in increasing order of magnitude. g. Multiply integers stored at memory locations A and B and store the result in C. Assume the product is small enough and can be represented in 16 bits. Note that multiplication is the repeated addition of multiplicand to itself multiplier times. h. Compute the absolute value of each of the 50 integers located at the memory block starting at A and store them at the block starting at B. i. Read a sequence of numbers and compute their minimum, maximum, and average values. Reading a value of 0 should terminate the reading process. What problems arise in computing the average? Opcodea Mnemonic (Hexadecimal) Description HLT 0 Halt LDA 1 ACC - M[MEM] STA 2 M[MEM] - ACC ADD 3 ACC + ACC + M[MEM] TCA 4 ACC + ACC' + 1 (2 complement) BRU 5 Branch unconditional BIP 6 Branch if ACC > 0 BIN 7 Branch if ACC

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

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

Recommended Textbook for

Pro Oracle Fusion Applications Installation And Administration

Authors: Tushar Thakker

1st Edition

1484209834, 9781484209837

Students also viewed these Databases questions