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
Core War
(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!
==Development== ''Core War'' was inspired by a [[self-replication|self-replicating]] program called [[Creeper (program)|Creeper]] and a subsequent program called Reaper that destroyed copies of Creeper.<ref name=dewdney84>{{Cite journal|last=Dewdney |first=A. K. |author-link=A. K. Dewdney |date=May 1984 |title=In the game called Core War hostile programs engage in a battle of bits. |journal=[[Scientific American]] |url=https://corewar.co.uk/dewdney/1984-05.htm |access-date=2023-05-27}}</ref> Creeper was created by Bob Thomas at [[BBN Technologies|BBN]].<ref>{{Cite journal|last=Shoch |first=J. |author-link=John Shoch |author2=Hupp, J. |date=March 1982 |title=The 'Worm' Programs - Early Experience with a Distributed Computation |journal=[[Communications of the ACM]] |doi = 10.1145/358453.358455 |volume=25 |issue=3 |pages=172β180|s2cid=1639205|doi-access=free }}</ref> Dewdney was not aware of the origin of Creeper and Reaper and refers to them as a rumor originating from [[Darwin (programming game)|Darwin]] and the worm experiments of [[John Shoch|Shoch]] and Hupp. The 1984 ''[[Scientific American]]'' article on ''Core War''<ref name=dewdney84/> nevertheless cites the game ''[[Darwin (programming game)|Darwin]]'', played by [[Victor A. Vyssotsky]], [[Robert Morris (cryptographer)|Robert Morris]], and [[Douglas McIlroy]] at [[Bell Labs]] in 1961. The word "Core" in the name comes from [[magnetic-core memory]], an obsolete [[random-access memory]] technology. This term was then, and still today, typically in use as the term for working memory in working memory dumps, called [[core dump|core dumps]], on Unix and most Unix-like systems. Additionally, the default filename used for core dumps on such systems is usually "core" or contains the word core. The first description of the Redcode language was published in March 1984, in ''Core War Guidelines'' by D. G. Jones and [[A. K. Dewdney]].<ref name=dewdneycwg>{{cite web |url=https://corewar.co.uk/standards/cwg.txt |title=Core War Guidelines |access-date=2023-05-27 |last=Jones |first=D. G. |author2=Dewdney, A. K. |author-link2=A. K. Dewdney |date=March 1984}}</ref> The game was introduced to the public in May 1984, in an article written by Dewdney in ''Scientific American''. Dewdney revisited ''Core War'' in his "Computer Recreations" column in March 1985,<ref>{{Cite journal|last=Dewdney |first=A. K. |author-link=A. K. Dewdney |date=March 1985 |title=A Core War bestiary of viruses, worms and other threats to computer memories. |journal=Scientific American |url=https://corewar.co.uk/dewdney/1985-03.htm |access-date=2023-05-27}}</ref> and again in January 1987.<ref>{{Cite journal|last=Dewdney |first=A. K. |author-link=A. K. Dewdney |date=January 1987 |title=A program called MICE nibbles its way to victory at the first Core War tournament. |journal=Scientific American |url=https://corewar.co.uk/dewdney/1987-01.htm |access-date=2023-05-27}}</ref> The International Core Wars Society (ICWS) was founded in 1985, one year after Dewdney's original article. The ICWS published new standards for the Redcode language in 1986 and 1988, and proposed an update in 1994 that was never formally set as the new standard.<ref>{{cite web|url=https://corewar.co.uk/standards/icws94.txt |title=Annotated Draft of the Proposed 1994 Core War Standard |access-date=2023-05-27 |last=Doligez |first=Damien |author2=Durham, Mark |date=8 November 1995}}</ref> Nonetheless, the 1994 draft was commonly adopted and extended, and forms the basis of the ''de facto'' standard for Redcode today. The ICWS was directed by Mark Clarkson (1985β1987), William R. Buckley (1987β1992), and Jon Newman (1992β); currently{{when|date=May 2024}} the ICWS is defunct.<ref>{{cite web|url=https://corewar.co.uk/history.htm |title=A Brief History of Corewar |access-date=2023-05-27 |last=Metcalf |first=John}}</ref> ===Redcode=== <div style="float: right; margin-left: 1em; margin-bottom: 0.5em; border: #99B3FF solid 1px; padding: 0.25em;"> <syntaxhighlight lang="redcode"> 0000: ADD.AB # 4, $ 3 0001: MOV.F $ 2, @ 2 0002: JMP.B $ -2, $ 0 0003: DAT.F # 0, # 0 </syntaxhighlight> {{center|1=Assembled ICWS-94 style Redcode}} </div> Redcode is the [[programming language]] used in ''Core War''. It is executed by a [[virtual machine]] known as a ''Memory Array Redcode Simulator'', or ''MARS''. The design of Redcode is loosely based on actual [[Complex instruction set computer|CISC]] [[assembly language]]s of the early 1980s, but contains several features{{vague|date=May 2021}} not usually found in actual computer systems. Both Redcode and the MARS environment are designed to provide a simple and abstract platform without the complexity of actual computers and processors. Although Redcode is meant to resemble an ordinary CISC assembly language, it is quite simplified relative to "real" assembly, and has no absolute memory addressing The original 8 instructions are described as follows. Later versions added NOP, multiply and more complex comparisons.<ref>{{Cite web|url=https://vyznev.net/corewar/guide.html#start_instr|title = The beginners' guide to Redcode, v1.23}}</ref> {| class="wikitable" ! Opcode !! Mnemonic !! Argument(s) !! Action |- | 0 || DAT || B || A non-executable instruction used to store the data value B. |- | 1 || MOV || A, B || Move the contents of A to location B. |- | 2 || ADD || A, B || Add the contents of A to the contents of location B and store the result in location B. |- | 3 || SUB || A, B || Subtract the contents of A from the contents of location B and store the result in location B. |- | 4 || JMP || A || Jump to location A. |- | 5 || JMZ || A, B || If the contents of B is zero, jump to location A; otherwise, continue with the next instruction. |- | 6 || JMG || A, B || If the contents of B is greater than zero, jump to location A; otherwise, continue with the next instruction. |- | 7 || DJZ || A, B || Decrement the contents of location B by 1. If location B is now zero, jump to location A; otherwise, continue with the next instruction. |- | 8 || CMP || A, B || Compare the contents of A with the contents of B. If they're not equal, skip the next instruction; otherwise, execute the next instruction. |} The ICWS '94 draft standard added more addressing modes, mostly to deal with A-field indirection, to give a total of 8 modes: {| class="wikitable" ! Mode !! Action |- | # || Immediate |- | $ || Direct (the <code>$</code> may be omitted) |- | * || A-field indirect (added in the '94 draft standard) |- | @ || B-field indirect |- | { || A-field indirect with predecrement (added in the '94 draft standard) |- | < || B-field indirect with predecrement |- | } || A-field indirect with postincrement (added in the '94 draft standard) |- | > || B-field indirect with postincrement (added in the '94 draft standard) |}
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)