Here is a program that rearranges assembly language so that it becomes structured,
making use of Maurer’s theory of loop trees.
The rearranged program has exactly the same flow graph as
the original program; it is not merely an equivalent program (which might
be slower).
You can use this page to rearrange programs written in any of five assembly languages, as indicated below.
When you choose a language by clicking on its button:
Wait for a new window (containing data) to open.
Choose Select All from your Edit menu.
Choose Copy from your Edit menu.
Close the new window.
Click in the white ASSEMBLER DESCRIPTION
box below.
Choose Paste from your Edit menu.
ASSEMBLER DESCRIPTION:
Once you have clicked on a language, you may now rearrange one of your own programs, written in that language.
If you wish to do this, type it (or copy and paste it) into the white ORIGINAL PROGRAM box, below (scrolling down, if necessary).
The rearranged program may now be copied and pasted back into your own files. To do this:
Click anywhere in the white REARRANGED PROGRAM box above.
Choose Select All from your Edit menu.
Choose Copy from your Edit menu.
Click in the window (in your own files) where you want the rearranged program.
Choose Paste from your Edit menu.
After copying and pasting, convert the result back to a monospaced font to see its original spacing.