IBM Z Open Editor: A modern IDE for IBM High Level Assembler

By Daniel Beall

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 Senior Technical Staff Member of the IBM zMilicode team, Mike Fulton, an IBM Distinguished Engineer and IBM Z Open Automation Utilitiesopen in new window creator, and Walter Church of the IBM 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 on 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 Workspacesopen in new window 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 Editoropen in new window 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-refencing 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 memoryopen in new window, cryptographic, and SIMD instructions. The programmer must be able tohave code completion for instructions as well as inspect them.

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.

Editor Features

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.

COMPLETION GIF

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

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

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 groupsopen in new window will have to be set.

COPYBOOK GIF

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

HLASM PEEK REFERENCES GIF

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

HLASM OUTLINE GIF

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 documentationopen in new window to adjust vertical rulers and tabstops from defaults.

HLASM RULERS AND TABSTOPS GIF

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

First, find out more about our editor at our About Pageopen in new window, and then see a full list of features on our Documentation Pageopen in new window. Next, please ensure prerequisitesopen in new window for our editor are installed. Then, download the extension through the Visual Studio Code Marketplaceopen in new window. Once the extension is installed, open an assembler file of your choice, or one of our samplesopen in new window. 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 surveyopen in new window about HLASM editors and tooling.

2. For any questions, issues, or enhancement ideas, please do not hesitate to open an issue at our GitHub pageopen in new window.

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.

Last Updated:
Contributors: Keng-Hui Beall, Peter Haumer, Peter Haumer, Chun Hong Zheng