Write a program loop that get the negative of the contents


Assignment

1. Write a program loop using a pointer and a counter that get the negative of the contents of memory locations 300 through 30F.

2. Write a subroutine code to divide two positive numbers by repeated subtraction method. For example, to divide 100 over 8 by subtracting 8 from 100 until the reminder be less than 8, then count the times of the subtractions, to give the result. The first number, second number, and then the result locations must follow the calling code.

3. Assume in locations A and B resides two 8 bit signed magnitude numbers. Write an assembly subroutine code to multiply them and saves the result in C location. Start your code from 100. The code should be general for any sign of A and B numbers.

Try the code for A and B as positive and negative respectively, then, for both of them as negative numbers.

          ORG         100
          BSA          MUL
A        HEX          0080
B        HEX          1004
C        HEX          0000
          HLT

4. Write a code to add two 128-bit data. Assume first number resides in location 200 to 2007 and the lower word starts first, and second number resides in locations 2008 to 200F. The result starts from address 2010. The code starts at location 100. Assume all data are represented by 2's complement format.

Format your assignment according to the following formatting requirements:

1. The answer should be typed, double spaced, using Times New Roman font (size 12), with one-inch margins on all sides.

2. The response also includes a cover page containing the title of the assignment, the student's name, the course title, and the date. The cover page is not included in the required page length.

3. Also include a reference page. The Citations and references should follow APA format. The reference page is not included in the required page length.

Solution Preview :

Prepared by a verified Expert
Assembly Language: Write a program loop that get the negative of the contents
Reference No:- TGS02981086

Now Priced at $30 (50% Discount)

Recommended (94%)

Rated (4.6/5)