Assembler Programming Part 1

Duration: 
5 days
Codes: 
A1
Versions: 
1

Overview

This is an entry level Assembly Language Programming workshop with a Commercial Application bias. Topics range from Syntax and the Assembly processing, through to code a basic application program including file processing. Whilst the emphasis is on 24/31-bit instructions, the newer 64-bit instruction set is discussed as appropriate. The workshop content is biased towards z/OS, but can be adapted to suite z/VSE if required.

At the completion of this workshop, students will know how to use the IBM Assembler Programming Language and be able to:

  • Access the correct manuals.
  • Explain the general syntax and structure of the language.
  • Explain register structure.
  • Explain how data is addressed in storage.
  • Demonstrate the ability to start and end programs correctly.
  • Select and use appropriate instructions for moving data between registers and storage.
  • Select and use appropriate instructions for moving data around storage.
  • Use appropriate instructions to alter the logic flow of a program.
  • Perform binary integer arithmetic.
  • Perform decimal arithmetic.

Audience

This course is aimed at new system programmers, technical support and software programmers and application programmers who need the ability to write and debug assembly language programs and better understand the software that their installation uses.

Prerequisites

Attendees will need to be able to edit data using TSO/ISPF and have sufficient JCL knowledge to deal with any issues which may arise when performing the exercises.

Previous programming experience would be useful, but not essential.

Course Outline

Module 1 - Assembler Documentation

  • Discusses the various IBM manuals.
  • Describes the Assembly process.
  • Introduces the elements of the assembly listing.

Module 2 – Hardware Appreciation

  • Describes the structure of Virtual Storage.
  • Provides AMODE / RMODE definitions.
  • General Purpose Registers and the associated conventions.
  • Introduces the Program Status Word (PSW).
  • Describes addressability and relocation.
  • There are 2 exercises included in this module.

Module 3 – Getting Started

  • Assembler statement syntax.
  • CSECT statement.
  • Save Areas.
  • BAKR – Branch and Stack Instruction.
  • BASR – Branch and Save Instruction.
  • BR – Branch on Register Instruction.
  • L – Load instruction.
  • LA – Load Address Instruction.
  • LG – Load Instruction (64-bit).
  • LM – Load Multiple Instruction.
  • LMG – Load Multiple Instruction (64-bit).
  • PR – Program Return Instruction.
  • ST – Store Instruction.
  • STG – Store Instruction (64-bit).
  • STM – Store Multiple Instruction.
  • STGM – Store Multiple Instruction (64-bit).
  • USING – Assembler statement.
  • END – Assembler statement.
  • PRINT – Assembler Statement.
  • TITLE – Assembler Statement.

Module 4 - Data Areas

  • DS - Define Storage Assembler statement.
  • Literals.
  • EQU – Assembler statement.
  • Simulated data structures (as per COBOL and PLI).
  • COPY – Assembler statement.
  • Placement of data areas.

Module 5 – Diagnostic Aids

  • Using the WTO macro.
  • Forcing an S0C1 ABEND.
  • Using the ABEND Macro.
  • Using the SNAP Macro.
  • Investigating an S0C7 ABEND.

Module 6 - Non-VSAM Queued I/O Macros

  • The difference between BSAM and QSAM.
  • OPEN Macro.
  • CLOSE Macro.
  • DCB Macro for both input and output sequential files.
  • GET Macro – Move Mode.
  • GET Macro – Locate Mode.
  • PUT Macro – Move Mode.
  • PUT Macro – Locate Mode.

Module 7 - Using Storage

  • MVC – Move Character Instruction.
  • MVI – Move Immediate Instruction.
  • MVCL – Move Character Long Instruction.
  • MVN – Move Numerics Instruction.
  • MVO – Move with Offset Instruction.
  • MVZ – Move Zones Instruction.
  • EX – Execute Instruction.

Module 8 - Decision Making

  • PSW format.
  • Condition Codes.
  • BC – Branch on Condition Instruction.
  • BCR – Branch on Condition Register Instruction.
  • Extended mnemonics.
  • CLC – Compare Logical Character Instruction.
  • CLCL – Compare Logical Character Long Instruction.
  • CLI. – Compare Logical Immediate Instruction.
  • BCT – Branch on Count Instruction.
  • BCTG – Branch on Count Instruction (64-bit).
  • BCTGR – Branch on Count Register Instruction (64-bit).
  • BCTR – Branch on Count Instruction.
  • C – Compare Instruction.
  • CH – Compare Half-word Instruction.
  • CR – Compare Register Instruction.

Module 9 - Using Registers

  • IC – Insert Character Instruction.
  • ICM & ICMH– Insert Character under mask Instructions.
  • LH – Load half-word Instruction.
  • LGR – Load Register (64-bit).
  • LR – Load Register.
  • LTR – Load and Test Register.
  • STC – Store Character Instruction
  • STCM & STCMH – Store Character under Mask Instructions.
  • STH – Store Half-word instruction.

Module 10 - Redefining Storage

  • DSECT – Assembler statement.
  • ORG – Assembler statement.

Module 11 – Data Conversion

  • PACK – Pack Instruction.
  • UNPK – Unpack Instruction.
  • CVB – Convert to Binary Instruction.
  • CVBG – Convert to Binary Instruction (64-bit).
  • OI – Or Immediate instruction.
  • What constitutes a valid decimal sign.
  • TR – Translate instruction.
  • TRT – Translate and Test instruction.

Module 12 – Binary Integer Arithmetic

  • A – Add instruction.
  • AG – Add instruction (64-bit).
  • AGR – Add Register Instruction (64-bit).
  • AH – Add Half-word Instruction.
  • AR – Add Register Instruction.
  • D – Divide Instruction.
  • DR – Divide Register Instruction.
  • M – Multiply Instruction.
  • MH – Multiply Half-word Instruction.
  • MR – Multiply Register Instruction.
  • S – Subtract Instruction.
  • SG – Subtract Instruction (64-bit).
  • SGR – Subtract Register Instruction (64-bit).
  • SH – Subtract Half-word Instruction.
  • SR – Subtract Register Instruction.

Module 13 – Decimal Arithmetic

  • AP – Add Packed Instruction.
  • CP – Compare Packed Instruction.
  • DP – Divide Packed Instruction.
  • ED – Edit Instruction.
  • MP – Multiply Packed Instruction.
  • SP – Subtract Packed Instruction.
  • SRP – Shift and Round Packed Instruction.
  • ZAP – Zero and Add Packed Instruction.

Module 14 – File Processing (ESDS)

  • ACB Macro.
  • ENDREQ Macro.
  • EXLST Macro.
  • GENCB Macro.
  • MODCB Macro.
  • GET Macro.
  • PUT Macro.
  • RPL Macro.
  • SHOWCB Macro.
  • Appendix – The Linkage Editor / Program Binder
  • Overview of functionality.
  • Purpose of SYSLIN.
  • Purpose of SYSLMOD.
  • The INCLUDE statement.
  • The NAME Statement.
  • Brief description of other statements.
  • Brief description of PARM options.

Thinking about Onsite?

If you need training for 3 or more people, you should ask us about onsite training. Putting aside the obvious location benefit, content can be customised to better meet your business objectives and more can be covered than in a public classroom. It's a cost effective option.

Submit an enquiry from any page on this site, and let us know you are interested in the requirements box, or simply mention it when we contact you.

Upcoming Dates

  • GREEN This class is Guaranteed To Run.
  • SPVC - Self-Paced Virtual Class.
  • Click a Date to Enroll.
Course Location Days Cost Date
Onsite
Onsite5 3500 3500 2019-07-17
Bristol
Bristol1 1250 £1250 2019-08-12
Bristol
Bristol5 6250 £6250 2019-09-02
Bristol
Bristol4 2200 £2200 2019-09-03
Bristol
Bristol3 1250 £1250 2019-09-04
Bristol
Bristol2 2500 £2500 2019-09-05
Bristol
Bristol1 3750 £3750 2019-09-06
Bristol
Bristol1 3750 £3750 2019-11-11
Bristol
Bristol4 3750 £3750 2019-11-11
Glasgow
Glasgow5 800 £800 2019-11-11
Bristol
Bristol5 3750 £3750 2019-11-11
Midlands
Birmingham5 800 £800 2019-11-11
Bristol
Bristol4 1250 £1250 2019-11-11
Bristol
Bristol3 1250 £1250 2019-11-11
Bristol
Bristol5 6250 £6250 2019-11-11
Bristol
Bristol3 3750 £3750 2019-11-11
Manchester
Manchester5 800 £800 2019-11-11
Bristol
Bristol2 1250 £1250 2019-11-11