Are you catching all the overflows that occur when you perform packed decimal arithmetic? Not sure? Read about the Set Program Mask instruction (SPM) that controls how decimal overflows (as well as a few others) are handled inside your program. Learn all about it here.
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.
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.
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.
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.
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.
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.
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.
Can’t remember all the details of the Divide Single Grande Fullword Register instruction (DSGFR)? Not sure of the set up for Multiply Single (MS)? Consulting Principles of Operation for the umpteenth time today? You can quickly learn (or review) 21 grande arithmetic instructions using the visual clues I’ve provided on four new pages (pdf). Check out the pages below and leave the POPS manual for the hard stuff.
- Visual Prompts For Grande Multiplication (pdf)
- Visual Prompts For Grande Addition (pdf)
- Visual Prompts For Grande Subtraction (pdf)
- Visual Prompts For Grande Division (pdf)
Additionally, I’ve added a video to explain the visual clue sheets and exactly how these instructions work:
All of these items have been added to the video course.
Are you bewildered by the plethora of branch instructions in assembly language? Perhaps you’re wondering what all that jumping around is about? Not sure when to choose JNE over BNE or BC? This new paper addresses those issues and a few more you might find helpful. I’ll give you my own take on how to decide when to jump and when to branch. You might also learn a new way to load base registers, get a grip on relative branching, or improve your understanding of addressability. Click here for the pdf and jump in!