Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Macro (computer science)
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Macros for machine-independent software== Macros are normally used to map a short string (macro invocation) to a longer sequence of instructions. Another, less common, use of macros is to do the reverse: to map a sequence of instructions to a macro string. This was the approach taken by the [[STAGE2|STAGE2 Mobile Programming System]], which used a rudimentary macro compiler (called SIMCMP) to map the specific instruction set of a given computer into ''machine-independent'' macros. Applications (notably compilers) written in these machine-independent macros can then be run without change on any computer equipped with the rudimentary macro compiler. The first application run in such a context is a more sophisticated and powerful macro compiler, written in the machine-independent macro language. This macro compiler is applied to itself, in a [[Bootstrapping (computing)|bootstrap]] fashion, to produce a compiled and much more efficient version of itself. The advantage of this approach is that complex applications can be ported from one computer to a very different computer with very little effort (for each target machine architecture, just the writing of the rudimentary macro compiler).<ref>{{cite journal |last1=Orgass |first1=Richard J. |last2=Waite |first2=William M. |date=September 1969 |title=A base for a mobile programming system |journal=Communications of the ACM |location=New York, NY, USA |publisher=ACM |volume=12 |issue=9 |pages=507β510 |doi=10.1145/363219.363226 |s2cid=8164996 |doi-access=free}}</ref><ref>{{cite journal | last = Waite | first = William M. | title = The mobile programming system: STAGE2 | journal = Communications of the ACM | volume = 13 | issue = 7 | pages = 415β421 | publisher = ACM | location = New York, NY, USA | date = July 1970 | doi = 10.1145/362686.362691 | s2cid = 11733598 }}</ref> The advent of modern programming languages, notably [[C (programming language)|C]], for which compilers are available on virtually all computers, has rendered such an approach superfluous. This was, however, one of the first instances (if not the first) of [[Bootstrapping (compilers)|compiler bootstrapping]].
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Macro (computer science)
(section)
Add topic