Category Archives: IBM Mainframe Assembler

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

Date Correction

IBM zDay is September 15.

Leave a comment

Filed under IBM Mainframe Assembler

IBM zDay, September 15

IBM zDay is coming soon, September 15. It’s a chance to catch 150 IBM zSystems experts for free!

Register at >>> ibm.biz/ibmzday-2022

IBM zDay: Sept. 15th, 8:00 AM to 4:00 PM EST
For Students! Special IBM zDay 24-Hr Global Meetup: Starts Sept. 14th! Students and life-long learners from around the world will come together to advance their skills and participate in hands-on coding activities designed for all levels, including our all-new 2022 IBM zStudent Contest.

Free virtual conference designed for all levels – no experience required
Connect, learn, and be inspired by 80 sessions across 5 content-rich tracks:

IBM zSYSTEMS: Build a flexible, AI-infused, sustainable business with IBM zSystems. Accelerate and scale with infrastructure that is optimized at its core to secure your enterprise.
IBM LinuxONE: Build a sustainable infrastructure with IBM LinuxONE, an enterprise-grade Linux server designed to meet the needs of mission-critical workloads in the hybrid cloud.
MODERNIZATION: Build a connected business with IBM zSystems and Cloud. Leverage APIs to extend and access applications and data, and refactor or rewrite existing application code.
COMMUNITY: Learn how our global community is shaping the digital landscape, evolving the tech industry and making the world a better place.

2 Comments

Filed under IBM Mainframe Assembler

Testing, Testing, Testing

After a good bit of experimentation with QSM, a testing plugin for WordPress, I’m happy with the tests I can produce online. I’ve settled on 10 questions per test grouped around a single idea like “Binary Data”. I’ve built ten tests so far, and I’ll keep adding more tests each week until there is a sufficient number of tests to cover a first course.

To take a test, select TEST BANK on the home page and choose a test from a list. The results are displayed online, and you can have them emailed to yourself if you like. Let me know if you uncover an error. Tests, like programs, are difficult to construct, and “punctilious” is a goal for me, and not always reality.

Leave a comment

Filed under IBM Mainframe Assembler

Brush Up Your USING Skills

The point of a USING statement is to inform the assembler which register to choose and which displacement to create when generating object code addresses. The IBM System/360 started with a single USING statement. Today, we have access to several different formats for creating USING statements. Are you familiar with them? If not, start here with a discussion of Labeled (or Named) USING statements. This kind of USING has distinct advantages over simple USING statements, especially in situations where the same data structure occurs multiple times and needs to be referenced simultaneously (as in linked lists). Here is some code you can use to play with these ideas.

Leave a comment

Filed under IBM Mainframe Assembler

I’m taking a break

I’m dealing with chemo therapy treatments these days, and it’s knocked me for a bit of a loop. I’ll be back to fix a few things on the site when I’m feeling better. The testing feature isn’t working yet, and I want to add a lot more tests. Spoiler alert: I am going to put Visiblez on the web as an application you can run from a browser. Look for it soon!
– David

Leave a comment

Filed under IBM Mainframe Assembler

Test Yourself Update

I decided to remove the need to register an email address in the testing system for the moment because I couldn’t convince myself it was working correctly. So, if you take the test, you should get the results immediately. Without the email address, I can’t send you a record of the test by email. I’m not sure if that’s critical or not. I’m working on a way to present multiple tests, and after I settle on that, I’ll start building the database of questions. If you have suggestions, send them by email (woolbright_david@columbusstate.edu) or comment in the blog.

Leave a comment

Filed under IBM Mainframe Assembler

Test Yourself – and help me out

I’ve added a plugin to the website that will allow me to create tests or quizzes, grade them, and send you the results. I’m in the early stages of implementing a database of assembler questions on a variety of topics. So far, I’ve created the first test that asks questions about character data and instructions. I could use your help trying out the test system to see how it works. There is a box at the bottom of the test where you can report any problems with the test. Will you give it a try and let me know what you think?

Go to the Test Yourself tab on the home page and select the Character Data #1 test. To get the results, you will have to provide an email address. I make no money from this site, so I will not use your email for commercial purposes.

My goal is to build a database to help you prepare for job interviews, or just to brush up on various aspects of this large language.

2 Comments

Filed under IBM Mainframe Assembler

Search String – SRST

Anubha Agarwal wrote and asked for a video covering Search String (SRST). I don’t have a video quite yet, but here are my notes on this instruction. It’s an interesting one that can be used to search for the first occurrence of a single character in a given area of storage. It was probably added to the instruction set to help compiler writers who needed to search for C strings which are terminated with X’00’.

The interesting feature of the instruction is that it can be interrupted by the CPU for efficiency reasons when searching large areas of storage. The programmer can then decide whether to continue searching or not.

I stumbled over the examples given in the Principles of Operation, until I realized the code is flawed. A BC 1,LOOP instruction should be BC 3,LOOP, so pay close attention to those two examples.

Now that I’ve written down my thoughts, I’ll put together a video soon and provide some program examples you can experiment with. This instruction is definitely worth a look.

2 Comments

Filed under Fans of IBM z, IBM Mainframe Assembler

14th Marist ECC Conference, June 12-14, 2022

Marist College

The Marist Enterprise Computing conference (ECC) confernce is one of the best IBM mainframe conferences going: Great speakers, food, location, and no conference fee. This year it’s meeting face-to-face again on the beautiful Marist College campus, Poughkeepsie, NY. There is even an opportunity to give a presention of your own.

Check out the conference website here:  https://ecc.marist.edu/web/conference2022

3 Comments

Filed under Fans of IBM z, IBM Mainframe Assembler

Shifty Shifts

Perhaps you’re like me, and as a fledgling assembler programmer, you learned the Shift and Round Decimal instruction (SRP) from a handful of choice examples.  Something like this one,

         SRP    MYFIELD,3,0    SHIFT MYFIELD LEFT BY 3 DIGITS

If you were lucky, maybe someone showed you the 64-N trick for computing a right shift by N digits like this one,

         SRP    MYFIELD,64-3,5 SHIFT MYFIELD RIGHT BY 3 DIGITS

or    

         SRP    MYFIELD,61,5   SHIFT MYFIELD RIGHT BY 3 DIGITS

After trying this out and getting it to work in a few programs, I committed the ideas to memory and didn’t give it much thought for a few years. At some point though, I figured out that that second parameter in these instructions is a base/displacement address, and not just a decimal number that somehow gets converted to 2’s complement. Looking up the explicit format for the instruction I found this,

         SRP    D1(L1,B1),D2(B2),I3   

The second parameter is a base/displacement, so the 3, or 64-3, or 61 we coded above, is treated as a displacement by the assembler and the base register is assumed to be 0. So, what’s going on with that address? The Principles of Operation solved the mystery for me. The base/displacement address is converted to an effective address, the effective address is then truncated to the rightmost 6 bits, and the remaining value is treated as a 2’s complement binary integer. With that value, we can shift 32 digits to the right or 31 digits to the left.

Never one to miss a trick (albeit rather slowly), it finally dawned on me, that if operand 2 is a base/displacement address, we could put the shift factor in a register and make the displacement 0 like this,

       L      R6,=F’-3’        SHIFT FACTOR GOES IN R3

         SRP    MYFIELD,0(R6),5  SHIFT MYFIELD RIGHT BY 3 DIGITS

Not much of an improvement, if any, but it does open the possibility of changing the shift factor on the fly by manipulating the register dynamically instead of hard-coding it into the instruction at assembly time – a technique you might occasionally find useful.

The same technique (but with a different interpretation of those 6 bits) works on all shift operations. For example, SRA, SRDA, SLL, …  The 6-bit shift factor for these shifts is treated as a plain binary number (instead of 2’s complement) because the direction of the shift is baked into the instruction. In all cases, you can put the shift factor in the register, and use it to control the shift factor on the fly – very shifty!

You can watch that happen in this short Viziblez demo video here.

2 Comments

Filed under IBM Mainframe Assembler