Welcome to z/Architecture Assembler Language Part 2: Machine Instructions, the second course in the three part series for the z/Architecture Assembler Language Specialization.
This course teaches z/Architecture machine instructions and Assembler language instructions that a programmer needs to write Assembler application programs and utilizes hands-on labs.
By the end of this course, you will be able to:
- Code z/Architecture machine instructions that:
- Copy data to/from registers
- Perform signed binary integer arithmetic operations
- Compare signed binary integers
- Perform conditional or unconditional branching
- Move or compare characters
- Operate on bits
- Perform decimal arithmetic operations
- List the Assembler Jump and Branch extended mnemonics
- Understand the role of the PSW condition code
- Understand the role of the PSW program mask
- Format a decimal number for displaying or printing
This is an intermediate course, intended for learners with a background in computer science and professionals that require Assembler knowledge on IBM Z.
Before taking this course, you should have completed the first course in the three part series for the z/Architecture Assembler Language Specialization, z/Architecture Assembler Language Part 1: The Basics. To complete the labs, you need basic knowledge of TSO/ISPF and JCL. In particular, you should know how to:
- Logon to TSO
- Edit a file with the ISPF editor
- Submit a job
- View a job's output in SDSF
You can learn about TSO/ISPF in the course Getting Started on Mainframe with z/OS Commands and Panels.
Overview
Syllabus
- Moving data in and out of registers
- This module continues with a focus on assembler, transitioning from the "why" to the "how." We'll explore key machine instructions—LOAD and STORE—which move data in and out of registers and memory. These instructions are fundamental to assembler programs and conform to z/Architecture specifications. The LOAD instruction variants include moving data to register halves or full registers using base displacement, long displacement, relative addressing, and immediate operands. STORE instructions mirror these variants but move data from registers to memory. Understanding these instructions' patterns and uses is crucial for efficient assembler programming, enabling both the maintenance of older programs and the creation of new, optimized applications. You will also get started with your first hands on lab exercise in this module.
- Binary arithmetic
- This module delves into advanced arithmetic instructions in assembly language, focusing on addition, subtraction, multiplication, and division operations. We will explore the nuances of integer and floating-point arithmetic, handling of remainders, signed and unsigned operations, and the intricacies of instruction sets used for these calculations.
- Comparing and branching
- In this module, you'll delve into the concepts of jumping, branching, and comparing instructions in programming. We'll start with the basics of program execution, highlighting how the CPU processes instructions sequentially—unless interrupted by jumps or branches. You'll learn the differences between conditional and unconditional jumps, as well as the role of extended mnemonics in simplifying coding. We'll then explore branching in detail, including various formats like base-displacement and relative addressing. Finally, we'll cover comparison instructions, focusing on how to compare signed binary integers and set condition codes. By the end of the module, you'll be well-prepared to code and debug using these essential instructions.
- Working with characters and bits
- In this module, you'll take a detour from working with signed binary integers and dive into instructions that operate on character strings. The module delves into how characters are used to represent data in a readable form and introduces key concepts like the EBCDIC character representation. You will learn about MOVE and COMPARE instructions, focusing on their role in manipulating and comparing character data. The module also covers the importance of setting and testing individual bits within z/Architecture, using logical operations like AND, OR, and XOR. Through practical examples, you will understand how to efficiently manipulate and clear memory fields, ensuring accurate data processing and output.
- Packed decinmal arithmetic
- In this module, you'll explore essential z/architecture instructions that handle decimal numbers. You'll delve into decimal formats, and learn to perform arithmetic operations like adding, subtracting, multiplying, rounding, and dividing. The module covers how to move and compare decimal numbers and introduces key concepts such as packed decimal format and operand management. Additionally, the module delves into essential operations for working with packed decimals in assembler language. You'll explore how to round decimals using the Shift and Round Decimal (SRP) instruction, including understanding its operands, condition codes, and how to handle both rounding and overflow scenarios. You will practice decimal arithmetic operations such as addition, subtraction, multiplication, and division, with a focus on avoiding common pitfalls like division errors and overflows. The module also covers how to format decimals for display using the EDIT instruction, ensuring accurate and readable output. Through detailed explanations and practical examples, you'll understand how these instructions maintain precision and manage large numbers, ultimately enhancing your ability to work with decimal data in assembly language.
- Final Assessment
- Take this quiz to earn your badge to z/Architecture Assembler Language Part 2 - Machine Instructions
Taught by
Jeff Bisti