Skip to content

Assembler partitioning

This post provides my look on MP ASM and an attempt to analyze and decompose it on parts. Despite this post provides ‘partitioning’ of a MP ASM only, many similarities can be found in other assemblers.

Although macro-assembler in most cases is referred as a single language, it worth to mention that it actually consists of two languages – ASM part and macro part. This is especially noticeable when switching from one family to another – macro part remains the same while ASM part is noticeably different due to difference in the instruction sets. Besides these two languages, there are also some other languages involved in process of developing an ASM application.
Table 1 gives list of identified programming languages (PL), their inputs and productions:

Language Operates on Produces Description
ASM Device resources Object files Target device language
Macro Macro variables and ASM statements Expanded ASM – intermediate source PL operating on ASM constructions
Preprocessor Input files and source code lines Preprocessed source PL operating on source lines
LKR Object files and sections, device definition Executable file PL operating on objects produced by ASM, It is also used to provide definition of device resources, so linker may properly allocate them.
MCP Source files Commands the compiler and linker A kind of “PL” used to specify what sources/files constitute a project
DEV Device definition Device simulation model PL for defining device architecture and resources for the simulator
SCL Device and application model Visual simulation or traces a VHDL-like simulation language

In some cases these languages provide overlapping capabilities, such as preprocessor’s #define vs macro’s equ and macro’s .org vs linker’s section start=.
From this set of languages only ASM is a “real” device language, whose statements will be actually executed by the device(s). The other languages are tool languages, executed by the development tools.
Also there is a pseudo language used for expressing statement semantics (A <- B – A). Such pseudo language is necessary, because the mnemonics themselves are not descriptive enough (not “human readable”). Having just a mnemonic it is hard to say what the action it implies and what objects it affects. Furthermore, similar mnemonics given by different vendors may imply different semantics, which make it even more complicated.

Post a Comment

Your email is never published nor shared. Required fields are marked *