by Daniel Beall

IBM Z Open Editor banner

It may seem that an assembler editor simply needs syntax highlighting. After all, don’t assembler programmers need only the most spartan of tools? However, after collaborating with IBMer assembler experts Brenton Belmar, a STSM of the zMilicode Team, Mike Fulton, a DE and IBM Z Open Automation Utilities creator, and Walter Church of the z/VM team, this sentiment could not be proven more wrong. We found that assembler deserves, just like COBOL and PL/I (two languages our IBM Z Open Editor also supports), much more attention. The IBM Z Open Editor adds, with version 1.0 available June 12th, 2020, a new language server for IBM High Level Assembler (HLASM), bringing support for developers who want to use Visual Studio Code or Red Hat CodeReady Workspaces to develop and maintain their applications.

Before we dive into the specifics of our assembler support, you might be wondering what exactly language servers and the Z Open Editor are. The Z Open Editor is an extension for Visual Studio Code that provides language support for IBM Enterprise COBOL and PL/I. The language server is what “powers” our tooling for languages like COBOL, PL/I, and now HLASM. Language servers are implementations of language server protocol which is an initiative to standardize communication between editors and programming language tooling.

The process of building a language server for HLASM and adding it to our extension was not trivial, and we could not have done it without listening to users. From Brenton, Mike, and Walter, we discovered several important points about assembler:

  • HLASM has very advanced features compared to traditional assembly languages such as macros, copybooks, and conditional assembler.
  • HLASM programs can be very large. We found assembler programs with upwards of thirty thousand lines of code and of symbols. Navigating and exploring such large programs requires the ability to have indexes in the form of outline views and cross-referencing support in the editor that is language aware and goes beyond simple search.
  • z/Architecture is a CISC, or complex instruction set computer-architecture, with a myriad of instructions. In addition to bread-and-butter instructions, the latest mainframes support state-of-the-art hardware transactional memory, cryptographic, and SIMD instructions. The programmer must have code completion for instructions as well as be able to inspect them.

Editor Features

It’s clear the collaborative process helped us keep the uniqueness of assembler in mind. While designing the outline view, we experimented with including every symbol within a program. However, after better learning our user’s needs, we found that it is better to simply have only CSECTs, DSECTs, and macros in the outline view. Often, if every symbol were to be included, the outline view would become extremely cluttered. The outline view is not the only feature where we’ve kept assembler’s distinctiveness firmly in mind. In our code completion, we include reference information about assembler instructions. And, last but not least, we have included configurable vertical bars and tab stops to help users easily ‘eyeball’ sequence numbers and continuation line indicators. We feel these features will help assembler programmers, both veterans and novices alike, have a better experience working with language in our editor.

Let me walk you through some of the capabilities we added and how we think they can be useful for assembler developers.

Code Completion: When typing an instruction or operand, the editor will suggest instructions or symbol names. Since HLASM has over a thousand instructions, we found this to be very useful for quickly searching for relevant instructions.

Code completion gif
Code completion in IBM Z Open Editor

Hover: Never worry about having to scroll to find the contents of a symbol again. To preview the contents of an operand symbol, simply move your mouse cursor over the symbol.

Hover gif
Hover in IBM Z Open editor

Go to Definition: To go to where a symbol is defined, simply right click an operand symbol, and click ‘Go to Definition.’ This is very convenient for large assembler programs. Having to scroll through a program or press Ctrl +F (Windows) or Cmd+F (Mac) to search through every use of a symbol is very tedious in comparison.

Go to definition gif
Go to definition in IBM Z Open Editor

Copybook Resolution: To preview the contents of a copybook, move your mouse cursor over the copybook name in a COPY statement. You can also open the copybook in a separate editor by pressing Ctrl+Click (Windows) or Cmd+Click (Mac). To use this feature property groups will have to be set.

Copybook gif
Copybook resolution in IBM Z Open Editor


Peek References:
A results references view is displayed underneath symbols. Click any result to go to that location within a file.

references gif
Peek references in IBM Z Open Editor

Outline View: Explore and navigate assembler code. Relevant macros, CSECTs, and DSECTs are shown in the outline view.

outline gif
Outline in IBM Z Open Editor

Configurable Vertical Rulers and Tabstops: Easily navigate within a line. Press Tab to move forward and Shift+Tab to move backwards. Vertical rulers are included by default. Please see our documentation to adjust vertical rulers and tabstops from defaults.

Tabs gif
Vertical rulers and tabs in IBM Z Open Editor

Excited to try the Z Open Editor with HLASM support? Here’s how

First, find out more about our editor at our About Page , and then see a full list of features on our Documentation Page . Next, please ensure prerequisites for our editor are installed. Then, download the extension through the Visual Studio Code Marketplace. Once the extension is installed, open an assembler file of your choice, or one of our samples. The editor should offer syntax highlighting and the features described above.

We would love to hear from you

We’re incredibly thankful for having the opportunity to work with assembler experts such as Brenton, Walter, and Mike. But, at the same time, we want to better meet the needs of users external to IBM. We greatly welcome any feedback about our editor and how you and your organization are using assembler.

Having said that, we’ve created two ways for you to easily provide your comments:

  1. Take our survey about HLASM editors and tooling.
  2. For any questions, issues, or enhancement ideas, please do not hesitate to open an issue at our GitHub page.

We’re looking forward to hearing from you and appreciate any feedback to improve this solution and help you be more productive.

Further Resources

In addition to trying our editor, we invite you to sample further resources related to mainframe hardware, the Z Open Editor, and HLASM.

For questions or comments regarding this blog post, please reach out to offering manager Neeraj Kumar at NeerajKumar@ibm.com.

Join The Discussion

Your email address will not be published. Required fields are marked *