TITLE 'Modify Array - Replace Negatives with Zero' SHELL * AUTHOR: CSECT * DESCRIPTION: YOUR NAME HERE This program processes an array of ten fullwords, replacing negative values with 0, and stores the count of modified elements in the memory location immediately before the array. The program outputs the array before and after modification. WORKING * STATUS: RO EQU 0 R1 EQU 1 R2 EQU 2 R3 EQU 3 R12 EQU 12 R13 EQU 13 R14 * EQU 14 'INDEX' REGISTER TEMP STORAGE REGISTER COUNTER REGISTER ARRAY ELEMENT REGISTER BASE REGISTER SAVE AREA POINTER RETURN REGISTER * STANDARD ENTRY AND INITIALIZATION: STM R14, R12, 12 (R13) SAVE REGISTERS BALR R12, RO USING BASE, R12 LOAD BASE REGISTER DECLARE BASE ADDRESS AND REGISTER SAVE R13 R13 ADDRESS OF SAVE AREA BASE ST R13, SAVE+4 LA R13, SAVE * START: LA LA LA R2,0 RO, ARRAY R1,10 LOOP L R3,0 (RO) C R3, F'0' BNL SKIP LA R2,1 (R2) ST R2, MODIFIED MVI 0 (RO),0 SKIP LA RO, 4 (RO) BCT R1, LOOP RESET MODIFIED COUNT TO ZERO LOAD ARRAY START ADDRESS SET LOOP COUNTER (10 ELEMENTS) LOAD CURRENT ARRAY ELEMENT CHECK IF NEGATIVE IF NOT NEGATIVE, SKIP MODIFICATION INCREMENT MODIFIED COUNT STORE UPDATED COUNT REPLACE NEGATIVE VALUE WITH ZERO MOVE TO NEXT ELEMENT DECREMENT COUNTER AND LOOP IF NOT DONE ST R2, MODIFIED STORE MODIFIED COUNT * STANDARD EXIT: DONE L R13, SAVE+4 RESTORE R13 LM R14, R12, 12 (R13) RESTORE REGISTERS BR R14 RETURN * STORAGE: SAVE DS MODIFIED DS 18F F SAVE AREA ARRAY DC STORAGE FOR MODIFIED COUNT F'-5',F'3',F'0',F'-1'‚F'6',F'-8',F'4',F'−2',F'7',F'-9' END SHELL Z390I V1.5.06 Copyright 2011 Automated Software Tools Corporation z390 is licensed under GNU General Public License Log file = C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\z390\z390_2025_0404_100725.LOG Enter command or help Microsoft Windows [Version 10.0.26100.3476] (c) Microsoft Corporation. All rights reserved. *** 04/04/25 10:07:50 CMD task started C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\2390>CD \Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\2390\ C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\z390>ASMLG C:\Users\jonesrich44\Documents\test23 C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\2390>rem asmlg assemble, link, and go from mlc to 390 execution C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\z390>echo off 10:07:50 test23 AZ390E error 29 MZ390 START USING Z390 V1.5.06 ON J2SE 1.8.0 441 04/04/25 - (1/1) 1 TITLE 'MODIFY Array Replace Negatives with Zero' AZ390E ERRSUM Critical Error Summary Option AZ390E ERRSUM Fix and repeat until all nested errors resolved AZ390E ERRSUM missing macro ='MODIFY AZ390E ERRSUM total missing AZ390E ERRSUM total missing copy files =0 macro files =1 =0 = 0 = 1 AZ390E ERRSUM total undefined symbols AZ390E ERRSUM total mz390 errors AZ390E ERRSUM total az390 errors 10:07:51 test23 MZ390 ENDED RC=12 SEC= 0 MEM (MB) = 35 IO=224 Press any key to continue . . . C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\z390>exit *** 04/04/25 10:07:51 CMD task ended TOT SEC=1 TOT LOG_IO=18
TITLE 'Modify Array - Replace Negatives with Zero' SHELL * AUTHOR: CSECT * DESCRIPTION: YOUR NAME HERE This program processes an array of ten fullwords, replacing negative values with 0, and stores the count of modified elements in the memory location immediately before the array. The program outputs the array before and after modification. WORKING * STATUS: RO EQU 0 R1 EQU 1 R2 EQU 2 R3 EQU 3 R12 EQU 12 R13 EQU 13 R14 * EQU 14 'INDEX' REGISTER TEMP STORAGE REGISTER COUNTER REGISTER ARRAY ELEMENT REGISTER BASE REGISTER SAVE AREA POINTER RETURN REGISTER * STANDARD ENTRY AND INITIALIZATION: STM R14, R12, 12 (R13) SAVE REGISTERS BALR R12, RO USING BASE, R12 LOAD BASE REGISTER DECLARE BASE ADDRESS AND REGISTER SAVE R13 R13 ADDRESS OF SAVE AREA BASE ST R13, SAVE+4 LA R13, SAVE * START: LA LA LA R2,0 RO, ARRAY R1,10 LOOP L R3,0 (RO) C R3, F'0' BNL SKIP LA R2,1 (R2) ST R2, MODIFIED MVI 0 (RO),0 SKIP LA RO, 4 (RO) BCT R1, LOOP RESET MODIFIED COUNT TO ZERO LOAD ARRAY START ADDRESS SET LOOP COUNTER (10 ELEMENTS) LOAD CURRENT ARRAY ELEMENT CHECK IF NEGATIVE IF NOT NEGATIVE, SKIP MODIFICATION INCREMENT MODIFIED COUNT STORE UPDATED COUNT REPLACE NEGATIVE VALUE WITH ZERO MOVE TO NEXT ELEMENT DECREMENT COUNTER AND LOOP IF NOT DONE ST R2, MODIFIED STORE MODIFIED COUNT * STANDARD EXIT: DONE L R13, SAVE+4 RESTORE R13 LM R14, R12, 12 (R13) RESTORE REGISTERS BR R14 RETURN * STORAGE: SAVE DS MODIFIED DS 18F F SAVE AREA ARRAY DC STORAGE FOR MODIFIED COUNT F'-5',F'3',F'0',F'-1'‚F'6',F'-8',F'4',F'−2',F'7',F'-9' END SHELL Z390I V1.5.06 Copyright 2011 Automated Software Tools Corporation z390 is licensed under GNU General Public License Log file = C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\z390\z390_2025_0404_100725.LOG Enter command or help Microsoft Windows [Version 10.0.26100.3476] (c) Microsoft Corporation. All rights reserved. *** 04/04/25 10:07:50 CMD task started C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\2390>CD \Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\2390\ C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\z390>ASMLG C:\Users\jonesrich44\Documents\test23 C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\2390>rem asmlg assemble, link, and go from mlc to 390 execution C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\z390>echo off 10:07:50 test23 AZ390E error 29 MZ390 START USING Z390 V1.5.06 ON J2SE 1.8.0 441 04/04/25 - (1/1) 1 TITLE 'MODIFY Array Replace Negatives with Zero' AZ390E ERRSUM Critical Error Summary Option AZ390E ERRSUM Fix and repeat until all nested errors resolved AZ390E ERRSUM missing macro ='MODIFY AZ390E ERRSUM total missing AZ390E ERRSUM total missing copy files =0 macro files =1 =0 = 0 = 1 AZ390E ERRSUM total undefined symbols AZ390E ERRSUM total mz390 errors AZ390E ERRSUM total az390 errors 10:07:51 test23 MZ390 ENDED RC=12 SEC= 0 MEM (MB) = 35 IO=224 Press any key to continue . . . C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\z390>exit *** 04/04/25 10:07:51 CMD task ended TOT SEC=1 TOT LOG_IO=18
Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 18RQ
Related questions
Question
make corrections of this program based on the errors shown. this is CIS 227 .

Transcribed Image Text:TITLE 'Modify Array - Replace Negatives with Zero'
SHELL
* AUTHOR:
CSECT
* DESCRIPTION:
YOUR NAME HERE
This program processes an array of ten fullwords,
replacing negative values with 0, and stores the count
of modified elements in the memory location immediately
before the array. The program outputs the array before
and after modification.
WORKING
* STATUS:
RO
EQU
0
R1
EQU
1
R2
EQU
2
R3
EQU
3
R12
EQU
12
R13
EQU
13
R14
*
EQU 14
'INDEX' REGISTER
TEMP STORAGE REGISTER
COUNTER REGISTER
ARRAY ELEMENT REGISTER
BASE REGISTER
SAVE AREA POINTER
RETURN REGISTER
* STANDARD ENTRY AND INITIALIZATION:
STM R14, R12, 12 (R13) SAVE REGISTERS
BALR R12, RO
USING BASE, R12
LOAD BASE REGISTER
DECLARE BASE ADDRESS AND REGISTER
SAVE R13
R13 ADDRESS OF SAVE AREA
BASE
ST
R13, SAVE+4
LA
R13, SAVE
*
START:
LA
LA
LA
R2,0
RO, ARRAY
R1,10
LOOP
L
R3,0 (RO)
C
R3, F'0'
BNL
SKIP
LA
R2,1 (R2)
ST
R2, MODIFIED
MVI
0 (RO),0
SKIP
LA
RO, 4 (RO)
BCT
R1, LOOP
RESET MODIFIED COUNT TO ZERO
LOAD ARRAY START ADDRESS
SET LOOP COUNTER (10 ELEMENTS)
LOAD CURRENT ARRAY ELEMENT
CHECK IF NEGATIVE
IF NOT NEGATIVE, SKIP MODIFICATION
INCREMENT MODIFIED COUNT
STORE UPDATED COUNT
REPLACE NEGATIVE VALUE WITH ZERO
MOVE TO NEXT ELEMENT
DECREMENT COUNTER AND LOOP IF NOT DONE
ST
R2, MODIFIED
STORE MODIFIED COUNT
* STANDARD EXIT:
DONE
L
R13, SAVE+4
RESTORE R13
LM
R14, R12, 12 (R13)
RESTORE REGISTERS
BR
R14
RETURN
* STORAGE:
SAVE
DS
MODIFIED DS
18F
F
SAVE AREA
ARRAY
DC
STORAGE FOR MODIFIED COUNT
F'-5',F'3',F'0',F'-1'‚F'6',F'-8',F'4',F'−2',F'7',F'-9'
END
SHELL
![Z390I V1.5.06
Copyright 2011 Automated Software Tools Corporation
z390 is licensed under GNU General Public License
Log file = C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\z390\z390_2025_0404_100725.LOG
Enter command or help
Microsoft Windows [Version 10.0.26100.3476]
(c) Microsoft Corporation. All rights reserved.
*** 04/04/25 10:07:50 CMD task started
C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\2390>CD \Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\2390\
C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\z390>ASMLG C:\Users\jonesrich44\Documents\test23
C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\2390>rem asmlg assemble, link, and go from mlc to 390 execution
C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\z390>echo off
10:07:50 test23
AZ390E error 29
MZ390 START USING Z390 V1.5.06 ON J2SE 1.8.0 441 04/04/25
-
(1/1) 1 TITLE 'MODIFY Array Replace Negatives with Zero'
AZ390E ERRSUM Critical Error Summary Option
AZ390E ERRSUM Fix and repeat until all nested errors resolved
AZ390E ERRSUM missing macro ='MODIFY
AZ390E ERRSUM total missing
AZ390E ERRSUM total missing
copy files =0
macro
files =1
=0
= 0
= 1
AZ390E ERRSUM total undefined symbols
AZ390E ERRSUM total mz390 errors
AZ390E ERRSUM total az390 errors
10:07:51 test23
MZ390 ENDED RC=12 SEC= 0 MEM (MB) = 35 IO=224
Press any key to continue . . .
C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\z390>exit
*** 04/04/25 10:07:51 CMD task ended TOT SEC=1 TOT LOG_IO=18](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F13826b36-d9c7-4b21-b2b5-e06bf4de5564%2F92ca93a4-6637-4c6a-923a-5f02be655365%2F7wc7wl_processed.png&w=3840&q=75)
Transcribed Image Text:Z390I V1.5.06
Copyright 2011 Automated Software Tools Corporation
z390 is licensed under GNU General Public License
Log file = C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\z390\z390_2025_0404_100725.LOG
Enter command or help
Microsoft Windows [Version 10.0.26100.3476]
(c) Microsoft Corporation. All rights reserved.
*** 04/04/25 10:07:50 CMD task started
C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\2390>CD \Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\2390\
C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\z390>ASMLG C:\Users\jonesrich44\Documents\test23
C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\2390>rem asmlg assemble, link, and go from mlc to 390 execution
C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\z390>echo off
10:07:50 test23
AZ390E error 29
MZ390 START USING Z390 V1.5.06 ON J2SE 1.8.0 441 04/04/25
-
(1/1) 1 TITLE 'MODIFY Array Replace Negatives with Zero'
AZ390E ERRSUM Critical Error Summary Option
AZ390E ERRSUM Fix and repeat until all nested errors resolved
AZ390E ERRSUM missing macro ='MODIFY
AZ390E ERRSUM total missing
AZ390E ERRSUM total missing
copy files =0
macro
files =1
=0
= 0
= 1
AZ390E ERRSUM total undefined symbols
AZ390E ERRSUM total mz390 errors
AZ390E ERRSUM total az390 errors
10:07:51 test23
MZ390 ENDED RC=12 SEC= 0 MEM (MB) = 35 IO=224
Press any key to continue . . .
C:\Users\jonesrich44\AppData\Local\Programs\Automated Software Tools\z390>exit
*** 04/04/25 10:07:51 CMD task ended TOT SEC=1 TOT LOG_IO=18
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps

Recommended textbooks for you
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage

Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning

EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage

Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning

EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT

C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning

C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr

Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,