The first of these, the Basic Assembly Language (BAL), is an extremely restricted assembly language, introduced in 1964 and used on 360 systems with only 8 KB of main memory, and only a card reader, a card punch, and a printer for input/output, as part of IBM Basic Programming Support (BPS/360).
This language, and the line of assemblers that implemented it, continued to evolve for the System/370 and the architectures that followed, inheriting and extending its syntax.
Some in the computer industry referred to these under the generic term "Basic Assembly Language" or "BAL".
As it is an assembly language, BAL uses the native instruction set of the IBM mainframe architecture on which it runs, System/360, just as the successors to BAL use the native instruction sets of the IBM mainframe architectures on which they run, including System/360, System/370, System/370-XA, ESA/370, ESA/390, and z/Architecture.
However, all of the IBM successors to BAL have included a sophisticated macro facility that allows writing much more compact source code.
Another reason to use assembler is that not all operating system functions can be accessed in high level languages.
The application program interfaces of IBM's mainframe operating systems is defined as a set of assembly language "macro" instructions, that typically invoke Supervisor Call (SVC) [e.g., on z/OS] or Diagnose (DIAG) [on, e.g., z/VM] instructions to invoke operating system routines.
It is possible to use operating system services from programs written in high-level languages by use of assembler subroutines.
The format of assembler language statements reflects the layout of an 80-column punched card, though successive versions have relaxed most of the restrictions.
Three main types of instructions are found in the source code of a program written in assembler.
Programmers are still responsible for actually loading the address of "base" into the register before writing code that depends on this value.
Thus typically you may see the following in an assembler program: Some notable instruction mnemonics are BALR[b] for a call storing the return address and condition code in a register, SVC,[c] DIAG,[d] and ZAP.
Macros can include conditional assembler instructions, such as AIF (an ‘if’ construct), used to generate different code according to the chosen parameters.
For instance, in MVS (later z/OS), STORAGE (with the OBTAIN parameter) dynamically allocates a block of memory, and GET retrieves the next logical record from a file.
These macros are operating-system-dependent; unlike several higher-level languages, IBM mainframe assembly languages don't provide operating-system-independent statements or libraries to allocate memory, perform I/O operations, and so forth, and different IBM mainframe operating systems are not compatible at the system service level.
It has no support for macro instructions or extended mnemonics (such as BH in place of BC 2 to branch if condition code 2 indicates a high compare).
[19] While working at IBM, John Robert Ehrman created and was the lead developer for HLASM[e] and is considered the "father of high level assembler".
The name may come from the additional macro language capabilities, such as the ability to write user-defined functions.
[18] The RSECT directive (Read-only Control Section) allows the assembler to check reentrancy on a per-section basis.
On the other hand it has a number of features not found in other System/360 assemblers—notably instructions to update a card image source dataset, named common, and implicit definition of SETA assembler variables.
[28]: 53, 73 The assembler for the System/360 Model 67 Time Sharing System has a number of differences in directives to support unique TSS features.
The PSECT directive generates a Prototype Control Section containing relocatable address constants and modifiable data used by the program.
Later, IBM recoded OS/360 in a systems programming language, PL/S, but, except for a short trial, decided not to release the PL/S compiler to users.