Category Archives: IBM Mainframe Assembler

Videos and word documents that cover how to program in IBM mainframe assembler language.

Instruction of the Day: CRB

Learn one new instruction today – Compare and Branch – CRB.  You can tighten your code just a bit with CRB, an instruction that combines a comparison operation on two registers with a branch operation – all in one line.  It comes with some extended mnemonics that make it easy to use.  Learn all about it here in the time it takes to finish a cup of coffee.

2 Comments

Filed under IBM Mainframe Assembler

z390 Support in VisibleZ

I envisioned VisibleZ as a teaching tool for assembly language – I wanted to force students to deal with object code as a way to learn the assembly language. With VisibleZ, after writing a few bytes of object code, you can watch the effects of a given instruction on the state of the machine, and in the process learn a thing or two.  Or, you can simply step through the hundreds of pre-written program snippets that comes with it.  I’ve tried to make it easy to write program snippets – two hex characters represent a byte, with bytes separated by spaces – all in a text file. No need to write a large program to get some experience with an instruction.

A few months ago, James Cray, one of the contributors to  z390, the Portable Assembler and Emulator Project , suggested it would be nice to be able to load z390 object modules into VisibleZ.  If you’re not familiar with that project, and you don’t have access to a mainframe, you should check it out.  Using z390 you can write large, well-developed assembler programs and run them on your pc.  It also supports Cobol and CICS!

I didn’t want to want to change my original file format, but I decided to take James’ advice by providing some support for z390.  I’ve just posted an experimental version (executable jar / codes.zip -code snippets) of VisibleZ that will take the assembler listings produced by z390 and scrape off the object code and format it it to run in VisibleZ.  You will have to install z390 separately and tell VisibleZ where it lives on your machine.  After that you can assemble a program and run your program, all within VisibleZ.

The experimental version runs on Windows only.  If there is any interest in getting this to run on Linux, let me know.  I’ll remind you that VisibleZ still has limited support for QSAM files – 80 byte records and a limit of three input and three output files.

Leave a comment

Filed under IBM Mainframe Assembler

Why you should be using LAY

The ability to load an address in assembler is a powerful tool. Working with an object from a distance (Load Address) rather than directly (Load) gives us the power of pointers and opens up the possibility of creating data structures. LA, an RX instruction, was the traditional instruction for working with addresses. LAY, an RXY-a instruction, offers some advantages over LA that you should consider. Read about the differences in these instructions here.

Leave a comment

Filed under IBM Mainframe Assembler

Revising the lectures

I’m in the process of revising lecture videos and notes for the entire site. The beginning videos (Starting Assembler 1 and 2) are now revisions of older ones that correct typos, misspeakings, etc., and include some new material on System/z. I’ve also added a third video that walks through the architectural components mentioned in the first two videos using VisibleZ as a demonstration tool – a good introduction for beginners.

2 Comments

Filed under IBM Mainframe Assembler

Techniques for Converting From Binary to Packed-Decimal

If you are generating a binary result in a register and converting the result back to packed-decimal, you need to be keenly aware of the limitations of each of these data types. For large binary values, you will need some conversion techniques that aren’t found in Principles of Operation. This article discusses several approaches for converting double-precision binary back to packed-decimal.

Leave a comment

Filed under IBM Mainframe Assembler

VZ Update 5/23/2016

This update in VisualZ corrects a flaw in the packed decimal arithmetic instructions that occurred when using large values.  You should also download codes.zip which includes many new packed decimal test programs.  To get the latest versions, click the Download VZ tab on the homepage.

Leave a comment

Filed under IBM Mainframe Assembler

VisualZ Update 5/17/2016

I’ve updated the RunnerB.jar file for VisualZ.  Replacing your copy of RunnerB.jar with this one will give you the most up-to-date version of VisibleZ.   This update fixes a problem with condition code settings that occurred in some cases for A, AH, S, and SH.  This version also includes many new immediate arithmetic instructions.   LARL was also added to the instruction set.  You should also download codes.zip, upzip it, and replace your Codes directory with this one.  The new Codes directory contains sample programs for each of the new instructions that was added.

Leave a comment

Filed under IBM Mainframe Assembler