| Index of Coding Examples, Figures, and Tables |
|
xii | |
| Preface to the Second Edition |
|
xxiii | |
| Preface to the First Edition |
|
xxiv | |
| Acknowledgments |
|
xxviii | |
| About the Author |
|
xxx | |
|
Assembler Language Programming Style and Content |
|
|
1 | (32) |
|
Characteristics of Good Assembler Language |
|
|
1 | (30) |
|
Has Simple, Easy-to-Understand Logic |
|
|
2 | (1) |
|
Uses Mostly Simple Instructions |
|
|
2 | (1) |
|
Has No Relative Addressing |
|
|
3 | (4) |
|
|
|
7 | (3) |
|
|
|
10 | (1) |
|
|
|
10 | (4) |
|
Does Not Modify Instructions |
|
|
14 | (2) |
|
Does Not Abnormally Terminate (ABEND) Due to User Error |
|
|
16 | (2) |
|
Requests and Checks Feedback from Macro Instructions |
|
|
18 | (1) |
|
Has Internal Tables with the Capacity of Expanding |
|
|
19 | (1) |
|
Provides Meaningful Error Messages |
|
|
20 | (2) |
|
Uses Only Standard Interfaces |
|
|
22 | (1) |
|
Lets the Assembler Determine Lengths |
|
|
23 | (3) |
|
Has OP-Codes, Operands, and Comments Aligned |
|
|
26 | (1) |
|
Contains Meaningful Comments |
|
|
27 | (1) |
|
|
|
28 | (1) |
|
Has Meaningful DS Instructions |
|
|
29 | (1) |
|
Does Not Specify BLKSIZE for Files |
|
|
30 | (1) |
|
What Is Advanced Assembler Language? |
|
|
31 | (1) |
|
|
|
32 | (1) |
|
Assembler Language Programming Development and Structure |
|
|
33 | (36) |
|
|
|
33 | (1) |
|
|
|
34 | (1) |
|
Writing Meaningful Comments |
|
|
35 | (3) |
|
Conventions for General Purpose Register Usage |
|
|
38 | (4) |
|
Step-by-Step Development of a Well-Structured Program |
|
|
42 | (15) |
|
Suggestions for Debugging Difficult Problems |
|
|
57 | (8) |
|
|
|
58 | (2) |
|
Using the SNAP Macro Instruction |
|
|
60 | (1) |
|
|
|
61 | (1) |
|
|
|
61 | (4) |
|
|
|
65 | (3) |
|
Bibliography for Chapter 2 |
|
|
68 | (1) |
|
The Macro Facility and Conditional Assembler Language |
|
|
69 | (60) |
|
Introduction to the Macro Facility |
|
|
69 | (17) |
|
|
|
69 | (1) |
|
Structure of a Macro Definition |
|
|
70 | (3) |
|
|
|
73 | (7) |
|
|
|
80 | (3) |
|
Comments in Macro Definitions |
|
|
83 | (1) |
|
Placement of Macro Definitions |
|
|
84 | (1) |
|
|
|
85 | (1) |
|
|
|
85 | (1) |
|
|
|
86 | (1) |
|
|
|
86 | (14) |
|
|
|
87 | (1) |
|
|
|
87 | (3) |
|
|
|
90 | (9) |
|
Concatenating Variable Symbols |
|
|
99 | (1) |
|
Coding Simple Macro Definitions |
|
|
100 | (5) |
|
Simple Macros that Generate Tables |
|
|
101 | (1) |
|
Simple Macros that Generate Executable Code |
|
|
102 | (3) |
|
Conditional Assembler Language |
|
|
105 | (10) |
|
What Is Conditional Assembler Language? |
|
|
105 | (2) |
|
Compare and Branch Instructions |
|
|
107 | (3) |
|
|
|
110 | (5) |
|
|
|
115 | (1) |
|
Coding Complex Macro Definitions |
|
|
115 | (9) |
|
Guidelines for Generating Labels |
|
|
116 | (1) |
|
Generating Messages from a Macro Definition |
|
|
117 | (1) |
|
Examples of Complex Macro Definitions |
|
|
118 | (6) |
|
Some Useful Macro Definitions |
|
|
124 | (4) |
|
The INITL Macro Instruction |
|
|
124 | (3) |
|
The RCNTL Macro Instruction |
|
|
127 | (1) |
|
Bibliography for Chapter 3 |
|
|
128 | (1) |
|
Supervisor Services and Macro Instructions |
|
|
129 | (64) |
|
What Are Supervisor Services? |
|
|
129 | (1) |
|
Standard, List, and Execute Forms of Macro Instructions |
|
|
130 | (1) |
|
The EXTRACT Macro Instruction |
|
|
130 | (2) |
|
|
|
132 | (3) |
|
The LOAD and DELETE Macro Instructions |
|
|
135 | (5) |
|
The LINK Macro Instruction |
|
|
140 | (3) |
|
The XCTL Macro Instruction |
|
|
143 | (2) |
|
The ATTACH, DETACH, and CHAP Macro Instructions |
|
|
145 | (8) |
|
The WAIT and POST Macro Instructions |
|
|
153 | (4) |
|
The ENQ and DEQ Macro Instructions |
|
|
157 | (5) |
|
The WTO Macro Instruction |
|
|
162 | (3) |
|
The WTOR Macro Instruction |
|
|
165 | (4) |
|
The GETMAIN and FREEMAIN Macro Instructions |
|
|
169 | (4) |
|
The STIMER Macro Instruction |
|
|
173 | (4) |
|
The TTIMER Macro Instruction |
|
|
177 | (3) |
|
The TIME Macro Instruction |
|
|
180 | (1) |
|
The SNAP Macro Instruction |
|
|
181 | (8) |
|
The ABEND Macro Instruction |
|
|
189 | (2) |
|
Bibliography for Chapter 4 |
|
|
191 | (2) |
|
Advanced Assembler Language Techniques |
|
|
193 | (80) |
|
Using General Purpose Register 13 as a Base Register |
|
|
193 | (1) |
|
Accessing the Data from the PARM Parameter of the JCL EXEC Statement |
|
|
194 | (2) |
|
|
|
196 | (4) |
|
Converting from Hexadecimal into Character |
|
|
200 | (3) |
|
|
|
203 | (6) |
|
|
|
209 | (3) |
|
Writing Reuseable Programs |
|
|
212 | (8) |
|
Building an Expandable Variable-length Table |
|
|
220 | (7) |
|
|
|
227 | (6) |
|
|
|
233 | (10) |
|
|
|
243 | (3) |
|
Communicating with a Problem Program Via System Commands |
|
|
246 | (7) |
|
Issuing Commands and Submitting Jobs from a Problem Program |
|
|
253 | (16) |
|
Issuing Commands and Submitting Jobs Via the JES2 Internal Reader |
|
|
254 | (6) |
|
Issuing Commands Via the MGCR Macro Instruction |
|
|
260 | (9) |
|
Obtaining the Addresses of the TCB and the ASCB |
|
|
269 | (2) |
|
Bibliography for Chapter 5 |
|
|
271 | (2) |
|
Programming ABEND Recovery |
|
|
273 | (44) |
|
Recovering from Program Interruption ABENDs |
|
|
273 | (14) |
|
Difference between the SPIE and the ESPIE Macro Instructions |
|
|
275 | (5) |
|
Using the SPIE Macro Instruction |
|
|
280 | (3) |
|
Using the ESPIE Macro Instruction |
|
|
283 | (4) |
|
Mixing the SPIE and the ESPIE Macro Instructions |
|
|
287 | (1) |
|
Recovering from System and User ABENDs |
|
|
287 | (28) |
|
|
|
287 | (2) |
|
The ESTAE Macro Instruction |
|
|
289 | (2) |
|
The SETRP Macro Instruction |
|
|
291 | (3) |
|
Writing an ESTAE Recovery Exit Routine |
|
|
294 | (21) |
|
Bibliography for Chapter 6 |
|
|
315 | (2) |
|
Programming Dataset Allocation |
|
|
317 | (44) |
|
Modifying the Job File Control Block |
|
|
318 | (19) |
|
Typical Reasons for Modifying the JFCB |
|
|
318 | (1) |
|
The RDJFCB Macro Instruction |
|
|
319 | (1) |
|
|
|
319 | (1) |
|
Required JCL DD Statement for RDJFCB |
|
|
320 | (1) |
|
The OPEN and CLOSE Macro Instructions |
|
|
320 | (1) |
|
JFCB Modification Coding Examples |
|
|
321 | (16) |
|
Dynamic Allocation (SVC 99) |
|
|
337 | (22) |
|
|
|
344 | (5) |
|
|
|
349 | (1) |
|
|
|
350 | (2) |
|
|
|
352 | (1) |
|
Dynamic Information Retrieval |
|
|
353 | (5) |
|
|
|
358 | (1) |
|
Bibliography for Chapter 7 |
|
|
359 | (2) |
|
Processing a Partitioned Dataset |
|
|
361 | (58) |
|
What Is a Partitioned Dataset? |
|
|
361 | (2) |
|
The Structure of the PDS Directory |
|
|
363 | (1) |
|
Reading the Entire PDS Directory |
|
|
364 | (8) |
|
Reading the PDS Directory Using QSAM |
|
|
365 | (3) |
|
Reading the PDS Directory Using BSAM |
|
|
368 | (2) |
|
A Macro Definition to Read the PDS Directory |
|
|
370 | (2) |
|
Reading Individual Members of a PDS |
|
|
372 | (14) |
|
Reading Members Using QSAM |
|
|
373 | (4) |
|
Reading members Using BPAM |
|
|
377 | (9) |
|
Writing New Members into a PDS |
|
|
386 | (12) |
|
Creating New Members Using QSAM |
|
|
387 | (2) |
|
Creating New Members Using BPAM |
|
|
389 | (9) |
|
Updating Existing Members of a PDS |
|
|
398 | (15) |
|
Alias Considerations Updating Members of a PDS |
|
|
398 | (1) |
|
Updating (Rewriting) Existing Members Using QSAM |
|
|
398 | (5) |
|
Updating (Rewriting) Existing Members Using BPAM |
|
|
403 | (4) |
|
Updating In-place Using QSAM |
|
|
407 | (2) |
|
Updating In-Place Using BPAM |
|
|
409 | (4) |
|
|
|
413 | (5) |
|
|
|
413 | (1) |
|
|
|
414 | (1) |
|
Assigning an Alias Name to an Existing Member |
|
|
414 | (4) |
|
Providing or Changing User-Data for a Member |
|
|
415 | (1) |
|
Bibliography for Chapter 8 |
|
|
418 | (1) |
|
Programming Paging Efficiency |
|
|
419 | (14) |
|
Brief Overview of MVS Paging |
|
|
419 | (3) |
|
Efficient Program Organization |
|
|
422 | (1) |
|
Paging Control Macro Instructions |
|
|
422 | (5) |
|
The PGRLSE Macro Instruction |
|
|
423 | (1) |
|
The PGLOAD Macro Instruction |
|
|
424 | (2) |
|
The PGOUT Macro Instruction |
|
|
426 | (1) |
|
Using the Paging Control Macro Instructions |
|
|
427 | (3) |
|
Using the PGRLSE Macro Instruction |
|
|
428 | (1) |
|
Using the PGLOAD Macro Instruction |
|
|
429 | (1) |
|
Using the PGOUT Macro Instruction |
|
|
430 | (1) |
|
Bibliography for Chapter 9 |
|
|
430 | (3) |
|
Selected Advanced Supervisor Services Macros |
|
|
433 | (24) |
|
Authorizing a User Program |
|
|
433 | (2) |
|
The MODESET Macro Instruction |
|
|
435 | (1) |
|
The TESTAUTH Macro Instruction |
|
|
435 | (2) |
|
The PGFIX and PGFREE Macro Instructions |
|
|
437 | (3) |
|
The REESERVE Marco Instruction |
|
|
440 | (4) |
|
The SETLOCK Macro Instruction |
|
|
444 | (7) |
|
The SVCUPDTE Macro Instruction |
|
|
451 | (2) |
|
The SYSEVENT Macro Instruction |
|
|
453 | (2) |
|
Bibliography for Chapter 10 |
|
|
455 | (2) |
|
Introduction to Channel Programming |
|
|
457 | (62) |
|
What Is Channel Programming? |
|
|
457 | (1) |
|
Control Blocks and Instructions Used in Channel Programming |
|
|
458 | (10) |
|
Channel Programming for DASD |
|
|
468 | (33) |
|
DASD Track and Record Format |
|
|
468 | (1) |
|
DASD Exception Conditions |
|
|
469 | (1) |
|
Reading Data from a DASD Dataset |
|
|
470 | (12) |
|
Writing Data into a DASD Dataset |
|
|
482 | (19) |
|
Channel Programming for Magnetic Tape Devices |
|
|
501 | (16) |
|
Magnetic Tape Volume Format |
|
|
502 | (2) |
|
Magnetic Tape Device Exception Conditions |
|
|
504 | (1) |
|
Reading Data from a Magnetic Tape Dataset |
|
|
505 | (6) |
|
Writing Data to a Magnetic Tape Dataset |
|
|
511 | (6) |
|
Bibliography for Chapter 11 |
|
|
517 | (2) |
|
|
|
519 | (28) |
|
|
|
519 | (1) |
|
Types and Characteristics of SVC Routines |
|
|
520 | (1) |
|
|
|
521 | (1) |
|
Guidelines for Selecting an SVC Type |
|
|
522 | (1) |
|
SVC programming Requirements and Considerations |
|
|
522 | (3) |
|
SVC Routine Coding Examples |
|
|
525 | (13) |
|
Inserting SVC Routines into the Operating System |
|
|
538 | (2) |
|
Dynamically Loading SVC Routines |
|
|
540 | (5) |
|
Bibliography for Chapter 12 |
|
|
545 | (2) |
|
Using the MVS Common Area |
|
|
547 | (14) |
|
|
|
547 | (1) |
|
Contents of the Common Area |
|
|
547 | (1) |
|
Requirements to Use the Common Area |
|
|
548 | (4) |
|
Coding Examples of Using the CSA |
|
|
552 | (6) |
|
|
|
558 | (1) |
|
Bibliography for Chapter 13 |
|
|
558 | (3) |
|
Programming Using 31-Bit Addressing |
|
|
561 | (50) |
|
Introduction to 31-Bit Addressing Mode |
|
|
563 | (1) |
|
Requirements, Rules, and Conventions of 31-Bit Addressing Mode |
|
|
564 | (1) |
|
Machine Instruction Considerations |
|
|
565 | (2) |
|
Instructions Sensitive to Addressing Mode |
|
|
565 | (1) |
|
Instructions That Manipulate Addressing Mode |
|
|
566 | (1) |
|
Addressing Mode and Residency Mode |
|
|
567 | (5) |
|
Meaning of AMODE/RMODE Attributes |
|
|
567 | (1) |
|
Values and Valid Combinations of AMODE/RMODE |
|
|
567 | (1) |
|
Assignment of AMODE/RMODE Via the Assembler |
|
|
568 | (1) |
|
Assignment of AMODE/RMODE Via the Linkage Editor |
|
|
569 | (1) |
|
Assignment of AMODE/RMODE Via the Loader |
|
|
570 | (1) |
|
MVS Services Support of AMODE/RMODE Attributes |
|
|
570 | (2) |
|
Dynamically Setting AMODE |
|
|
572 | (1) |
|
Allocating Virtual Storage Via GETMAIN |
|
|
572 | (2) |
|
Establishing Linkage between Programs with Different Addressing Modes |
|
|
574 | (12) |
|
Using the BASSM and the BSM Machine Instructions |
|
|
574 | (1) |
|
Supervisor-Assisted Linkage |
|
|
575 | (1) |
|
|
|
575 | (3) |
|
|
|
578 | (4) |
|
Capping (Prologue and Epilogue) |
|
|
582 | (4) |
|
Typical Program Linkage Situations |
|
|
586 | (2) |
|
Using Virtual Storage above the 16MB Line by 24-Bit Addressing Mode Programs |
|
|
588 | (4) |
|
Performing I/O by 31-Bit Addressing Mode Programs |
|
|
592 | (11) |
|
The PGSER Macro Instruction |
|
|
603 | (3) |
|
Converting Existing Programs into 31-Bit Addressing Mode |
|
|
606 | (2) |
|
|
|
608 | (1) |
|
Writing New Programs in 24-Bit Addressing Mode |
|
|
609 | (1) |
|
Writing New Programs in 31-Bit Addressing Mode |
|
|
609 | (1) |
|
Bibliography for Chapter 14 |
|
|
609 | (2) |
|
Inter-Address Space Communications |
|
|
611 | (82) |
|
Inter-Address Space Communications via Shared DASD |
|
|
611 | (1) |
|
Inter-Address Space Communications via the Common Area |
|
|
612 | (1) |
|
Inter-Address Space Communications via SRBs |
|
|
612 | (27) |
|
Requirements for Using SRBs |
|
|
613 | (3) |
|
|
|
616 | (23) |
|
|
|
639 | (1) |
|
Inter-Address Space Communications via CMS |
|
|
639 | (52) |
|
|
|
640 | (2) |
|
Macro and Machine Instructions Used with CMS |
|
|
642 | (2) |
|
Requirements to Set Up a Cross-Memory Environment |
|
|
644 | (1) |
|
Cross-Memory Authorization |
|
|
644 | (3) |
|
|
|
647 | (5) |
|
|
|
652 | (2) |
|
Releasing the Cross-Memory Environment |
|
|
654 | (1) |
|
Using Cross-Memory Services |
|
|
655 | (1) |
|
Calling a Program in Another Address Space |
|
|
655 | (20) |
|
Passing Data Directly between Address Spaces |
|
|
675 | (15) |
|
|
|
690 | (1) |
|
Bibliography for Chapter 15 |
|
|
691 | (2) |
|
|
|
693 | (64) |
|
Address Space Control Mode |
|
|
693 | (2) |
|
|
|
694 | (1) |
|
|
|
694 | (1) |
|
Issuing Macros Instructions in AR Mode |
|
|
695 | (1) |
|
|
|
695 | (3) |
|
|
|
698 | (38) |
|
Data Space Ownership and Availability |
|
|
698 | (2) |
|
|
|
700 | (1) |
|
|
|
701 | (4) |
|
Gaining Access to a Data Space |
|
|
705 | (2) |
|
Moving Data Into and Out of a Data Space |
|
|
707 | (5) |
|
Dumping the Virtual Storage of a Data Space |
|
|
712 | (3) |
|
Passing ALETs across Address Spaces |
|
|
715 | (7) |
|
Sharing Data Spaces across Address Spaces |
|
|
722 | (10) |
|
Using Data Spaces Efficiently |
|
|
732 | (1) |
|
Increasing the Size of a Data Space |
|
|
733 | (1) |
|
Releasing Data from a Data Space |
|
|
734 | (1) |
|
|
|
734 | (1) |
|
Data Space Usage Considerations |
|
|
735 | (1) |
|
|
|
736 | (16) |
|
Hiperspace Ownership and Availability |
|
|
736 | (1) |
|
|
|
737 | (1) |
|
|
|
738 | (2) |
|
Gaining Access to a Hiperspace |
|
|
740 | (1) |
|
Moving Data Into and Out of a Hiperspace |
|
|
741 | (8) |
|
Sharing Hiperspaces across Address Spaces |
|
|
749 | (1) |
|
Using Hiperspaces Efficiently |
|
|
750 | (1) |
|
Hiperspace Usage Considerations |
|
|
751 | (1) |
|
When to Use Extended Addressability |
|
|
752 | (2) |
|
Data Space and Hiperspace Differences |
|
|
752 | (1) |
|
|
|
752 | (1) |
|
|
|
753 | (1) |
|
Relationship of Extended Addressability to VIO |
|
|
753 | (1) |
|
Bibliography for Chapter 16 |
|
|
754 | (3) |
| Appendix A The Assembler |
|
757 | (14) |
|
A.1 Required JCL for the Assembler |
|
|
757 | (2) |
|
A.2 Invoking the Assembler from a Problem Program |
|
|
759 | (10) |
|
Bibliography for Appendix A |
|
|
769 | (2) |
| Appendix B The Linkage Editor |
|
771 | (34) |
|
B.1 Basic Program and Linkage Editor Terms |
|
|
771 | (2) |
|
B.2 Linkage Editor Functions |
|
|
773 | (1) |
|
B.3 Input to the Linkage Editor |
|
|
774 | (6) |
|
B.4 Naming the Load Module |
|
|
780 | (1) |
|
B.4 Selected Linkage Editor Options |
|
|
781 | (1) |
|
B.6 Selected Linkage Editor Control Statements |
|
|
782 | (10) |
|
B.7 Required JCL for the Linkage Editor |
|
|
792 | (1) |
|
B.8 Invoking the Linkage Editor from a Problem Program |
|
|
793 | (11) |
|
Bibliography for Appendix B |
|
|
804 | (1) |
| Bibliography |
|
805 | (4) |
|
MVS and Assembler Language Programming |
|
|
805 | (1) |
|
|
|
805 | (4) |
| Index |
|
809 | |