Determine how many of the values in the locations with


Figure consists of an incomplete program for the course's simulated processor and a high level pseudo code of the main program. Assume all numbers are in hexadecimal.

The program is to determine how many of the values in the locations with addresses $2000 to $2009 are less than $50, how many are equal to $50 and how many are greater than $50. The number of values which are less than, equal to and greater than $50 are to be stored in the locations labelled RESULT1, RESULT2 and RESULT3 respectively.

START .....................

ORG $1000

.....................

.....................

ORG $2000

while (loop counter ≠ 0) do

DATA DC.B $05,$10,$20,$30,$40,$50,$60,$65,$70,$80

RESULT1 DC.B $0

RESULT2 DC.B $0

RESULT3 DC.B $0

(i) Incomplete program in T121 processor assembly language

initialise the loop counter

load the test data

subtract $50 from test data

if (test data is <$50)

then increment the count for <$50

else if (test data is >$50)

then increment the count for >$50

else increment the count for =$50

decrement the loop counter

end while loop

(ii) High level pseudo code of the main program

END START

Figure Q4

(a) Write the program and test its functionality with the course's simulator. Once it is working correctly, copy and pastes your program to your MS WORD answer document.

(b) Submit a screen shot of the memory contents that include addresses from 1FF0 to 2010 when the program stops. Use the instructions given below to obtain the screen shot.

Instructions:

1. To view the memory contents at the simulator screen, click on the View menu and select

2. To capture the 'screen shot' select the window, press + on your Memory. Click on the Page down button to the required addresses. Verify that the  memory contents are indeed correct.

computer keyboard, and then paste it onto your word document.

Solution Preview :

Prepared by a verified Expert
Assembly Language: Determine how many of the values in the locations with
Reference No:- TGS0603195

Now Priced at $45 (50% Discount)

Recommended (93%)

Rated (4.5/5)