PART I: MULTIPLE CHOICE
Write the letter of the correct answer. (2 points each)
_____ 1. A field defined as DC CL3'32' will contain __________ in machine code.
_____ 2. The absolute address 23D507 would be aligned on a fullword boundary.
_____ 3. What is the smallest unit of memory that has its own address?
_____ 4. How many bits in a fullword?
_____ 5. Under the EBCDIC coding system, each character requires ________ to represent it in the computer.
_____ 6. If your program abends with an interrupt code of 0004, this means what?
_____ 7. Register 5 = 00000022 and register 7 = 00000014. What absolute address will the D(X,B) address 19(7,5) resolve to?
_____ 8. If your program abends with an interrupt code of 0009, this means what?
_____ 9. The instruction LR 5,4 will
_____ 10. A field defined as DC F'29' will contain __________ in machine code.
PART II: ENCODING/DECODING
Fill in the blanks on the assembly listing below (27 points total):
(1 point each) (2 points each) (2 points each) LOCATION COUNTER MACHINE SOURCE VALUE LANGUAGE LANGUAGE 000000 EXAM CSECT 000000 USING EXAM,15 _______________ 5850 F018 _____________________ _______________ ___________________ L 7,NUM2 _______________ 1A75 _____________________ _______________ ___________________ LR 2,7 _______________ ___________________ S 2,NUM4 _______________ ___________________ ST 2,RESULT _______________ 07FE _____________________ 000018 ___________________ NUM1 DC F'38' _______________ 0000001B NUM2 DC F'27' _______________ ___________________ TEXT DC C'ABCD' 000024 0000001C NUM4 DC F'28' 000028 RESULT DS F END EXAM
PART III: DEBUGGING
Answer the following questions using the ASSIST COMPLETION DUMP given below. All ‘address’ should be given in hexadecimal. (12 points, 2 for each answer)
ASSIST COMPLETION DUMP PSW AT ABEND FFC50009 4000000C REGS 0-3 F4F4F4F4 F4F4F4F4 00000000 F4F4F4F4 REGS 4-7 00000000 00000017 F4F4F4F4 F4F4F4F4 REGS 8-11 F4F4F4F4 F4F4F4F4 F4F4F4F4 F4F4F4F4 REGS 12-15 F4F4F4F4 00000028 FFFE7960 00000000 USER STORAGE 000000 1B225850 F0185C40 F01C1D42 5040F024 000010 5050F020 07FEF5F5 00000017 00000001 000020 F5F5F5F5 F5F5F5F5 F5F5F5F5 00000000 000030 F5F5F5F5 F5F5F5F5 F5F5F5F5 F5F5F5F5 000040 F5F5F5F5 F5F5F5F5 F5F5F5F5 F5F5F5F5 000050 F5F5F5F5 F5F5F5F5 F5F5F5F5 F5F5F5F5
What is the address of the instruction that WOULD HAVE BEEN EXECUTED NEXT had the program not ABENDed?
What is the length (in bytes) of the instruction that caused the ABEND?
What was the condition code at ABEND (give a decimal number)?
What is the address of the instruction that caused the ABEND?
What type of program interrupt occurred (give the name)?
Why did the program ABEND? Be as specific as possible.
PART IV. SHORT CODING (3 points each)
Write assembly language instructions to perform the following tasks. Define ANY extra storage you use. You may use register equates if you wish. Inefficient code will not receive full credit.
Add five to register 3.
Save the contents of register 6 in a storage area labeled RESULT, also define the storage area RESULT.
Test the contents of registers 4 and 5. Branch to the label ENDIF1 if the contents of register 4 are greater than or equal to the contents of register 5.
Multiply the contents of register 5 by –1.
Set register 4 equal to zero.
PART V. LONG CODING (23 points)
Write a COMPLETE assembler program (including all storage areas) to read in an unknown number of 80 byte records. Each record contains a single integer number in EBCDIC character format. You may assume that the number is always present and is a valid integer.
Your program should calculate the average of all of the numbers read in. Print the average (with an appropriate label) starting at the top of a new page. Inefficient code will not receive full credit.