Skip to content

Core War is a 1984 programming game created by D. G. Jones and A. K. Dewdney in which two or more battle programs (called "warriors") compete for control of a virtual computer. These battle programs are written in an abstract assembly language called Redcode.

Notifications You must be signed in to change notification settings

vkinnune/42-corewar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Corewar

A fierce battle of survival between battle programs.

This project recreates the game “Core war” by D. G. Jones & A. K. Dewdney

Objective

  • The assembler: this is the program that will compile your champions and translate them from the language you will write them in (assembly language) into “Bytecode”.Bytecode is a machine code, which will be directly interpreted by the virtual machine.
  • The virtual machine: It’s the “arena” in which your champions will be executed. It offers various functions, all of which will be useful for the battle of the champions. Obviously, the virtual machine should allow for numerous simultaneous processes; we are asking you for a gladiator fight, not a one-man show simulator.

Installation

make to compile the Assembler and Corewar (the Virtual Machine)

Assembler

./asm <your_champ.s> to compile your champion

(Work in progress)

Corewar

./corewar [optional flags] <your_champ.cor> to have your champ go beat other people up

Test script

./apustaja.sh and follow the VERY INTUITIVE instructions

Note

As most other projects in Hive, Corewar is restricted to only a handful of libc functions. For this project, the followings are used:

◦ open
◦ close
◦ read
◦ write
◦ malloc
◦ free
◦ exit

Everything else is written by yours truly (❁´◡`❁)

About

Core War is a 1984 programming game created by D. G. Jones and A. K. Dewdney in which two or more battle programs (called "warriors") compete for control of a virtual computer. These battle programs are written in an abstract assembly language called Redcode.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •