What is CALLC?

CALLC is a z/TPF high-level programming service (also characterized as a general macro) that can be used to invoke a C function from a BAL (Basic Assembly Language) program.

To get a clear understanding, we start by defining a basic assembler language, what it’s used for and why we need a macro to call its function.

BAL is the assembly language used by the IBM 360/370/390 computer family. Without certain operating-system-specific code, it is impossible to program in assembly language. At the very least, one must adhere to the right communication norms. For I/O activities, it is also essential to interact with the OS, which is commonly done directly.

BAL, like the majority of IBM 360 languages, is card-oriented. Labels must begin in column 1 and work their way down. Unless they are extended to the following line, statements may not go above column 71. By putting an X in column 72, one can resume writing statements.

The BAL looks like this:


Now that we know what BAL means, it is now time to know what a macro is, since CALLC constitutes the two.

What is a macro?

A macro is a sequence of keyboard strokes or button presses that are recorded and then instantaneously played back when needed.

For instance, during an appointment for a simple bladder infection, one simple keystroke can indeed add a Read code submission, a few other free text, and simply prescribe medications – assuming, of course, you’ve initially prepared the macro editor to carry out some of these precise activities when ALT-F7 is pressed.

Windows Operating system has a basic macro recorder, but to get the most out of the macro method to data entering, you’ll need a far more advanced macro application. Macro Express 2000, for example, is a polished, stable, and versatile macro editor which also offers great value for money.

What the CALLC will help you achieve?

By using macros to speed up and automate bulk actions when running processes, the CALLC can help to achieve the following:

  • It makes the process of gaining total control of the system and its resources go more smoothly. The programmer may use this to develop code that accesses registers and retrieves the memory locations of pointers and entries without difficulty. It mostly aids in speed improvements, which boosts productivity and efficiency.
  • Comprehending the memory and CPU functions is aided by learning BAL. When writing a program that involves the use of a compiler, the developer has to have a deep understanding of the processor. Now, because BAL aids in comprehending how processors and memories operate, CALLC accelerates the learning process by using repeated and symbolic language.
  • BAL, as we all know, aids in directly engaging hardware. BAL is mostly concerned with computer architecture, and it comprehends different types of processors and how they vary between different processors. In comparison to other high-level languages, BAL also relates to transparency. It just contains a few operations, but it’s useful for learning the algorithms as well as other control flows. It simplifies the code and makes it easier to debug. That’s all without using macros to call some C functions within the process. Introducing CALLC makes the process of debugging the follow of controls even less tedious, as when a bug is fixed in one part, the macros repeat the same correct set of codes on the other parts.

How CALLC works

How CALLC works

Explaining the chart above

  1. label: This is a metaphorical name or identifier given to the macro statement.
  2. fname: This is simply the name of the C function that’ll be called using the macro
  3. label1: This is the name of a storage space that holds a parameter.
  4. freg: The data in raw floating-point representation is stored in this floating-point register (F0-F15).
  5. reg: This is the register in which a parameter is stored.
  6. regaddr: This is merely the register that holds the parameter’s address.
  7. AMODE: The AMODE determines the format in which all address parameters are expressed. The following are valid formats for format addresses:
  • amodedef: The AMODE argument of the BEGIN macro specifies the default value. The default value for the AMODE argument is 31 if it has not been earlier defined within the BEGIN macro.
  • 31: This indicates that the addresses are in 31-bit format.
  • 64: This indicates that the addresses are in 64-bit format.

Favorable Conditions for Setting Up CALLC

  • Use a pointer to send the address of an object as a parameter. Similarly, you may use a storage identifier that includes the parameter to pass an object as a parameter. Do not use a register to pass the structure itself. Examples of providing parameters may be seen in the CPROC macro.
  • The CALLC macro must have the same number of arguments as the equivalent CPROC macro.
  • As a return type, if an object is not supported. return its address using a pointer.


The example below demonstrates an assembly program that calls a three-parameter C function. To invoke the C function, use the CALLC and CPROC macros.

invoke the C function
Source: IBM

In the example above, “myfname” is the C function

Leave a Comment