Part of
the Cross Development Support Tool Collection
by
Douglas W. Jones
THE UNIVERSITY
OF IOWA
Department of Computer Science
Permission to copy this material without fee is granted, provided that the entire body of the document is reproduced (excepting any machine specific material, and with examples revised to reflect the implementation being documented), provided that this copyright notice is included in the copy, and provided that the copies are not made or distributed for direct commercial advantage. The names SMAL and SMAL32 may be changed in the copies by changing the suffix 32 to a suffix designating a specific machine, and material may be added to copies, for example, to document features added to support specific machines. All other rights are reserved.ACM CR Categories and Subject Descriptors: D.3.2 [Programming Languages]: Language Classifications - macro and assembly languages; D.4.9 [Operating Systems]: Systems Programs and Utilities - linkers; loaders
SMAL32 is a symbolic macro assembly language for 32 bit computers. The assembler has no built-in knowledge of any machine's instruction set. In addition to providing the basic assembly functions the SMAL32 assembler provides a powerful macro facility and a linkage editor facility supporting separate assembly, subprogram libraries, and shared common blocks. Assembler and linker output may be either absolute or relocatable, and the object language is encoded in an easily interpreted textual form.
The SMAL32 assembler is a variant of the Machine Independent SMAL assembler, originally developed at the University of Iowa as a tool for teaching and research. Assemblers in the SMAL family are written in highly machine independent Pascal or C, and have been successfully transported between a number of Pascal and C implementations.
Thanks are due to all of my students in 22C:32, Introduction to Systems Software, who have worked with various versions of the SMAL assembler starting in the early 1980's. Eric Wedel, in particular, produced the first 32 bit version of SMAL, supporting the National 32000 family of machines.
The SMAL32 cross assembler provides assembly language support for a generic 32 bit machine, minus any special provisions to support any specific machine. The SMAL32 assembler supports the assembly format and directives of Machine Independent SMAL, a symbolic macro assembly language developed at the University of Iowa as a tool for teaching and research. as such, it is a complete macro assembly language and linkage editor system in a form which may be easily transported to run on different host systems.
The object code produced by the SMAL32 assembler is relocatable, and it includes support for external symbols and FORTRAN common blocks. Additionally, the assembler serves as a linker for SMAL32 object files; as such, it produces an absolute or relocatable textual object code which may be easily hand loaded, or loaded by a loader written in about 60 lines of mid-level language code.
The SMAL32 assembler will run on any machine supporting integers with at least the precision range of 32 bit two's complement arithmetic. The C version works using standard ASCII with 8 bit characters only. The assembler does not dynamically allocate storage on the heap, but it does use recursion; this may place limits on the languages into which it may easily be translated.
This document is an adaptation of: