|
ASTOC
Overview
ASTOC
has been designed as an expert tool but also as an optimized component
for the most efficient conversion approach. The targets were:
- Convert assembler
to C with maximum precision
- Extract knowledge
for two purposes: code documentation and programmer transition
- Grant absolute
conversion control to the programmer(s) in charge
- Automate
whatever can be automated
This is the
strategy that embeds ASTOC conversion tools:
PREPARE
A PROJECT
After initial
project planning, the work area is defined and all targeted assembler
modules are collected. Data structures and interfaces are mapped,
macro conversion strategies are selected and based on these findings
the ASTOC toolset is configured.
CONVERT
A proper preparation
which requires a rather small period of time makes the subsequent
conversion almost self-running. The three-step ASTOC approach is
the following:
1.
Process
ASTOC
reads and analyzes single assembler source files. Files are checked
for correctness, completeness and integrity. Extensive reporting
is performed on missing or incorrect parts, in order to make this
phase as short as possible. Global and local macros are processed
individually according to the selected rules. Finally, ASTOC generates
pre-conversion pseudo-code.
2.
Optimize
During
iterative optimizer runs, ASTOC reorganizes code blocks,
eliminates control flow problems and maps to C constructs. Program
simulation and register tracking aid in correct re-engineering to
produce structured code.
3.
Rewrite
Finally,
ASTOC outputs distinct ANSI C-language source files with
meaningful code and data names and a clean organization. On top
of this, ASTOC includes the selected amount of embedded documentation:
- To ease
the transition to C for assembler programmers, the original assembler
code can be listed as comments.
- If this amount
of information is not required, only the original comments will
be included, producing more compact C code.
After conversion,
some manual code adjustments may be required to incorporate the
generated code into the global project.
COMPILE
and TEST
Since ASTOC
may be applied to individual modules at a time, they can each be
compiled and tested immediately.

This strategy has been found to be an efficient yet flexible general-purpose
approach to the translation of mainframe assembler. Using advanced
tools to speed-up the most labor-intensive phases, almost every
assembler conversion project can be completed in considerably less
time with far better results.
|