Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

CSCI 360-1 Assignment 3 Basic Assembler (mainframe) Fall 2018 75 points This assignment is in three parts. Each part is worth 25 programming points. Part

CSCI 360-1 Assignment 3 Basic Assembler (mainframe) Fall 2018

75 points

This assignment is in three parts. Each part is worth 25 programming points.

Part A

Write an assembler program that does the following:

Declare a fullword with label NUM1with the value 142.

Declare a fullword with label NUM2with the value 37.

Subtract NUM2from NUM1. To do this, simply load these numbers into registers and use an SR.

Add NUM1 to NUM2. To do this, load the two numbers into registers (a different pair of registers) and use an AR.

Now use an XDUMPto dump out the registers and look at the register values to see your answer.

Part B

Modify the assembler program from Part A as follows:

Declare two consecutive fullwords of storage with labels RESULTS1and RESULTS2.

Store (ST) the NUM1answer (NUM1 minus NUM2) into RESULTS1.

Store (ST) the NUM2answer (NUM2plus NUM1) into RESULTS2.

XDUMPthat area of storage (containing RESULTS1and RESULTS2) using XDUMP. You can use XDUMPto print the two fullwords, RESULTS1 and RESULTS2, in storage by using the label followed by the length of the field like this:

XDUMP RESULTS1,8 DUMP 8 BYTES BEGINNING AT LABEL RESULTS1

Go into the XDUMPoutput and verify your math is correct.

Part C

Now rewrite your assembler program using explicit addressing. This means on the Land ST, take out your labels and fill in the addresses of the various fullwords. You can get these addresses from the program listing of Part B.

Other Notes

To get started, use Option 3 Move/Copy within TSO/ISPF Utilities to copy your ASSIGN1member in your ASSIGNSPDSE. Name the new member ASSIGN3A. Remove the following three lines of instructions:

LA 3,12 LOAD 12 INTO REGISTER 3

LA 9,5 LOAD 5 INTO REGISTER 9

AR 3,9 ADD REGISTER 9 TO REGISTER 3

and begin adding what you need to to complete Part A above.

Once again, you are encouraged to complete Part A as a PDSE member named ASSIGN3Ain your own ASSIGNSPDSE. Then, for Part B, create an entirely new PDSE member named ASSIGN3Band, when you're ready, create an entirely new PDSE member named ASSIGN3C

*************************************EXAMPLE***************************************************************

//KC03nnnA JOB ,'your name here',MSGCLASS=H

//JSTEP01 EXEC PGM=ASSIST

//STEPLIB DD DSN=KC00NIU.ASSIST.LOADLIB,DISP=SHR

//SYSPRINT DD SYSOUT=*

//SYSIN DD *

******************************************************************

* *

* ASSIGNMENT 1 - YOUR FIRST MAINFRAME PROGRAM *

* *

* DATE DUE: 09/05/2018 *

* *

* Replace KC03nnn above with your KC-ID assigned to you by *

* your instructor. DO NOT LEAVE OUT THE CAPITAL LETTER A AT *

* THE END OF YOUR KC-ID! Also, put your name in all capital *

* letters in the first line where it says 'your name here'. *

* *

* Note that this documentation box does not go past column 65! *

* *

******************************************************************

MAIN CSECT

USING MAIN,15 ESTABLISH ADDRESSABILITY ON REGISTER 15

LA 3,12 LOAD 12 INTO REGISTER 3

LA 9,5 LOAD 5 INTO REGISTER 9

AR 3,9 ADD REGISTER 9 TO REGISTER 3

XDUMP , DUMP THE REGISTER CONTENTS

BR 14 RETURN TO CALLER

END MAIN

/*

//

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_2

Step: 3

blur-text-image_3

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

Database Basics Computer EngineeringInformation Warehouse Basics From Science

Authors: Odiljon Jakbarov ,Anvarkhan Majidov

1st Edition

620675183X, 978-6206751830

More Books

Students explore these related Databases questions