Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Macro (computer science)
(section)
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]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)