Compilation
This chapter describes how to compile a program in OpenFrame ASM.
1. Compile
OpenFrame ASM compiles asm source files into a binary file that can run on OpenFrame ASM VM. The compilation process involves the following steps:
-
Preprocessing
During preprocessing, an asm file is proprocessed into an asmi file. Preprocessing involves interpreting and executing macro commands and conditional assembly commands to generate assembly commands.
The following command preprocesses the TEST.asm file and creates the TEST.asmi file.
ofasm -E TEST.asm
-
Assembly
During assembly, an asmi file is assembled into an asmo file. An asmo file is a binary file that can run on OpenFrame ASM VM.
The following command assembles the preprocessed file, TEST.asmi, into an asmo file.
ofasm -S TEST.asmi
[Note]
A single command can perform both preprocessing and assembly steps to directly create an asmo file from an asm file.
The following command compiles the TEST.asm file into the TEST.asmo in a single execution.
ofasm TEST.asm
2. ofasm Command
The following describes how to use the OpenFrame ASM compile command (ofasm).
ofasm sourcefile... [command option...]
-
Source files
The files to compile must have the 'asm' extension to be recognized as an ASM source file.
-
Basic compile command options
Option Description -o file name
Sets an output file.
--debug
Outputs log messages during preprocessing and compilation.
-L <dir>
Sets a macro library path.
-h
Displays help.
--version
Displays the current version information of OpenFrame ASM.
-E
Only executes preprocessing (input: *.asm file, output: *.asmi file).
-S
Only executes assembly (input: *.asmi file, output: *.asmo file).
--enable-cics
Enables CICS library.
--list
Displays macros, copybooks, and machine and assembler instructions supported in OpenFrame ASM.