One of the most challenging tasks a programmer can face is attempting to analyse and understand a legacy assembler system. Many features of assembler make analysis difficult, and these are the same features that make migration from assembler to a high-level language difficult. In this paper, we discuss the application of program transformation technology to assist with analysing and understanding legacy assembler systems. We briefly introduce the fundamentals of our program transformation theory and program slicing, which generalizes to conditional semantic slicing. These transformations are applied to a large commercial assembler system to automatically generate high-level abstract descriptions of the behaviour of each assembler module, with error handling code sliced away. The assembler system was then migrated to C. The result is a dramatic improvement in the understandability of the programs; on average a 6000-line assembler listing is condensed down to a 132-line high-level language abstraction. A second case study, involving over one million lines of source code from many different assembler systems, showed equally dramatic results.But if this field contains a string, then we wish the fourth character, not the first. There is nothing to stop the assembler programmer from using a four-byte character field as an integer, and vice-versa. * 5 * PRINT NOGEN 6 REGEQU 7 CSECT 8 DCBD
scite is a Brooklyn-based organization that helps researchers better discover and understand research articles through Smart Citations–citations that display the context of the citation and describe whether the article provides supporting or contrasting evidence. scite is used by students and researchers from around the world and is funded in part by the National Science Foundation and the National Institute on Drug Abuse of the National Institutes of Health.