Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The following is a complete assembly language program. Some parts of the program have been left out, and you are to fill in each blank

The following is a complete assembly language program. Some parts of the program have been left out, and you are to fill in each blank with the appropriate value. What follows is the complete program: NO ADDITIONAL FIELDS ARE AVAILABLE, NOR MAY ANY BE WRITTEN IN. MAIN CSECT USING MAIN,15 STM 0,15,MAINSAVE Save all registers * LA 1,BLDPARM Get parameters for BUILD BAL 14,BUILD Go build the table * LA 1,RPTPARM Get parameters for REPORT BAL 14,REPORT Go compute values * LM 0,15,MAINSAVE Restore all registers BR 14 Return to caller * MAINSAVE DS ___________________ Register save area OUTBUF DS CL133 Output buffer ORG OUTBUF Save some space INBUF DS CL80 Input buffer _________________________ Reset to where we were TABLE DS 90F Room for 20 entries TABLEANA DC A(________________) @ of next available entry BLDPARM DC A(TABLE,TABLEANA,INBUF) BUILD parameter list RPTPARM DC A(TABLE,TABLEANA,OUTBUF) REPORT parameter list * * BUILD Subroutine * BUILD STM 0,15,BLDSAVE Save all registers LM 9,11,____________ Get parameters XREAD 0(11),80 Get first record * BLDLOOP _________________________ Check for end of file PACK 0(3,9),0(5,11) Tree ID PACK 3(3,9),9(4,11) Year planted PACK 6(4,9),17(6,11) Original cost PACK 10(4,9),27(6,11) Estimated replacement cost PACK 14(4,9),37(6,11) Actual replacement cost * LA 9,18(,9) Get to next table entry XREAD 0(11),80 Get next record, if any B ___________________ Continue * BLDEOF ST ___________________ Return new TABLEAN LM 0,15,BLDSAVE Restore all registers BR 14 Return to MAIN * BLDSAVE DS ___________________ Register save area * * REPORT Subroutine * REPORT STM 0,15,RPTSAVE Save all registers LM 9,11,____________ Get parameters * RPTLOOP _________________________ Is table finished? BNL RPTDONE Branch if so _________________________ Increment TREECNT by 1 MVC 0(133,11),=CL133' ' Clear print line * _________________________ Get tree ID to PWORK4 DP PWORK4,=P'100' Break into Block Num and Tree Num SP PWORK4(2),=P'100' Eliminate first digit '1' MVC 1(25,11),PATT1 Set header and pattern ED 16(10,11),PWORK4 Get both block and tree numbers * ZAP PWORK4,14(4,9) Get actual cost MVC 30(17,11),HDR2 Set header MVC 47(10,11),COSTPATT Set pattern _________________________ EDMK 47(10,11),PWORK4 Get actual cost S R1,=F'1' Back up MVI 0(1),C'$' Set currency symbol AP TREECOST,__________ Add actual cost to total * XPRNT 0(11),133 Print the line LA 9,18(,9) Get to next table entry B ___________________ Continue * RPTDONE MVI ___________________ Clear the print line, MVC ___________________ including carriage control ZAP PWORK6,TREECOST Get total cost of all trees SRP PWORK6,2,0 Multiply to preserve significance DP PWORK6,TREECNT Get cost per tree SRP PWORK6(4),(64-2),5 Shift back and round MVC 1(23,11),HDR3 Set header MVC 24(10,11),COSTPATT Set pattern _________________________ EDMK 24(10,11),PWORK6 Get printable cost S R1,=F'1' Back up MVI 0(1),C'$' Set currency symbol * XPRNT 0(11),133 Print the line LM 0,15,RPTSAVE Restore registers BR 14 * PATT1 DC CL15'Block / Tree = ' DC XL10'____________________________________________________' * [The pattern should display both * the block and tree so that the values appear as * ' nnn nnn ' (without the quotes, of course) ] * HDR2 DC CL17' Original Cost = ' * HDR3 DC CL23' Total cost per tree = ' Fill and msg chars * COSTPATT DC XL10'____________________________________________________' * [The pattern should be such that * the result is displayed as $nn,nnn.nn] * RPTSAVE DS 16F Register save area TREECNT DC PL2'0' Number of records processed TREECOST DC PL4'0' Total cost of all trees PWORK4 DS PL4 Work area PWORK6 DS PL6 Work area * _________________________ Always present * 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

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2017 Skopje Macedonia September 18 22 2017 Proceedings Part 3 Lnai 10536

Authors: Yasemin Altun ,Kamalika Das ,Taneli Mielikainen ,Donato Malerba ,Jerzy Stefanowski ,Jesse Read ,Marinka Zitnik ,Michelangelo Ceci ,Saso Dzeroski

1st Edition

3319712721, 978-3319712727

More Books

Students also viewed these Databases questions

Question

Do you currently have a team agreement?

Answered: 1 week ago

Question

How will the members be held accountable?

Answered: 1 week ago