Assembler Language Programming: Basic
|Duration: 5 days|
|Participants: This courses is designed for the beginner assembler language application programmer who needs to code, maintain, and/or debug application programs written in zSeries, System/390, or System/370 Assembler Language.|
Upon successful completion of this course you will be able to:
- Describe the steps used in the assembly process.
- Entry and return macros and other standards for coding assembler programs.
- Code in a recommended program organization that includes modular routines, standard register usage, DSECTs, ORGs that are self-adjusting for length changes, and well-documented maintainable code.
- Define and use assembler pseudo-instructions.
- Code all the macros for processing QSAM files (physical sequential files) using both Move mode and Locate mode.
- Code the instructions for compare and branch looping.
- Code data validation routines that check for valid input data, including numeric validation.
- Code report programs that use editing to create formatted output fields.
- Code assembler language programs that use: standard linkage conventions, data area and constant definitions, decimal arithmetic operations, data validation, data movement operations, and typical SS instructions, including TR, TRT, MVCL, CLCL, and SRP.
- Use multiple base registers and literal control for managing large programs.
- Code "above the line" assembler language programs that use 31-bit addressing and describe the instructions that are restricted to 24-bit addressing.
- Debug assembler language programs using SNAP dumps and system-provided storage dumps and standard debugging techniques.
- Use Principles of Operation and other IBM books available in Book Manager as well as those in QuickRef.
- This course teaches how to use the zSeries, System/370, or System/390 Assembler Language instruction set. It includes standards for coding assembler programs, discussions of the base-displacement technique of addressing main storage, use of hexadecimal notation for identifying storage addresses and contents, coding rules and standards, the assembly process, standard QSAM I/O macros, "above and below the line" coding considerations, and basic dump reading.
- Emphasis is placed on modular and structured programs and register use to facilitate debugging and dump reading.
- After taking this course, developers wishing to be more proficient in assembler should take our 'Intermediate Assembler Language Programming' course.
Before taking this course, you should be able to:
- Program in a procedural language, such as COBOL.
- Understand basic data processing concepts and terminology.
- Code basic JCL statements.
- Understand programming fundamentals, such as data manipulation, looping, conditional processing, and I/O.
|Format: Lecture and hands-on workshops.|
- Basic Assembler Language Programming
What is Assembler?
Reference Books and Manuals
- Prepare and Run Assembler Programs
Rules for Labels
- Numbering Systems and Data Storage
Main Storage and AMODE
Concepts of Bases
Converting Between Hexadecimal and Binary
What Does The Hex Mean?
Pack a Number
Packed Decimal Data
Unpack a Packed Decimal Number
Fixed Binary Point
IBM Mainframe Data Forms
Converting Between Number Systems
Strongly vs Weakly Typed Data
Define Storage, Define Constant
DS and DC Location
Truncation and Padding
DC Storage Types
DS / DC Structures and ORG
- Displacement Concepts
VSAM File Organization
- Base Displacement Concepts
General Purpose Registers
GPR Typical Usage
Base Displacement Concept
Establish Base Register
Labels Translate to Base Displacement
Machine Instruction Formats
Review: Machine Instruction Format
RR Machine Instruction Format
SS Machine Instruction Format
- Program Logic: Arithmetic and Modularization
Entry and Exit Linkage
Arithmetic Sequence for Raw Data
Arithmetic Sequence for Stored Data
AP and SP
Structured Code Using Multiple Registers
Structured Code Using Just One Register
- Debugging Tips
Simple Debugging Tips
Debugging S0Cn Abends
More Simple Debugging Tips
Eye Catcher Literal
- Moving Data
Moving Data Concepts
Tips for Handling Negatives
Zone vs Numeric; MVZ and MVN
- More Packed Instructions
Self-Defining Constants and LTORG
ORG to Extend a Record
ORG to Redefine a Field
ORG for VB Records
Self-Defining Constants vs SI
Multiply Packed Concept
Divide Packed Concept
Truncating Packed Numbers
Decimal Places and MVN
Decimal Places and MVO
Rounding - SRPVSAM File Organization
- Compare Values and Branch
Branch After Compare
Branch After Arithmetic
- Editing Numbers and Printing Records
Types of Instructions
Numeric Editing (ED)
Common Editing Pattern Characteristics
LA and BCTR
Fancy Equates for Lengths
- Fixed-Point Binary Instructions
FPB Logic for Processing
Binary Instruction Set Introduction
Benefits and Limitation
FPB Typical Sequence
Load and Test Register
- Basic Table Processing
BCT LOOPS with TABLES - Packed Decimal
BCT LOOPS with TABLES – Fixed-Point Binary
BCT Loop with LTR
Advanced Looping Instructions
- Program Sectioning and DSECTS
Multiple Base Registers
Get and Put Locate with DSECT
- TR, TRT, and LA Instructions
Load Address (LA)
Translate (TR) - To Convert Bytes to Different Bytes
Translate (TR) - To Convert to Lowercase
Translate and Test (TRT) - To Test Bytes
Fancy Lengths Examples
List of Extended Mnemonics Available