Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vbrazhnik/corewar
School 42 project // Implementation of programming game “Core War” [Champions + Assembler + Disassembler + Virtual Machine + Visualizer]
https://github.com/vbrazhnik/corewar
42 42projects 42school assembler born2code c corewar corewars disassembler gui ncurses unitfactory virtual-machine visualization visualizer
Last synced: 3 months ago
JSON representation
School 42 project // Implementation of programming game “Core War” [Champions + Assembler + Disassembler + Virtual Machine + Visualizer]
- Host: GitHub
- URL: https://github.com/vbrazhnik/corewar
- Owner: VBrazhnik
- Created: 2018-10-23T11:06:03.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-03T06:47:30.000Z (about 6 years ago)
- Last Synced: 2024-10-12T20:41:49.486Z (3 months ago)
- Topics: 42, 42projects, 42school, assembler, born2code, c, corewar, corewars, disassembler, gui, ncurses, unitfactory, virtual-machine, visualization, visualizer
- Language: C
- Homepage:
- Size: 4.86 MB
- Stars: 89
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Corewar
Corewar is a School 42 project. The purpose of this project is an implementation of the programming game **“Core War”**.
![Corewar](/wiki_resources/corewar.svg)
[corewar.en.pdf](/corewar.en.pdf) is the task file.
Task resources is placed at [the `task_resources` folder](/task_resources/).
## Wiki
This project has an 8-page guide. The guide was written **in Russian**.
You can read it [at the wiki-pages](../../wiki/).
## Project Structure
This project consists of five parts:
* Champion
* Assembler
* Disassembler (Bonus)
* Virtual Machine
* Visualizer (Bonus)Project has three developed champions: `amedvedi.s`, `wasp.s`, `kalle.s`. They are located at [the `champions` directory](/champions/).
Assembler + Disassembler are modules of the program `asm`.
Virtual Machine + Visualizer are modules of the program `corewar`.
## How to clone?
This repository includes submodule. So if you want to clone it, you can use the following command:
```
git clone --recurse-submodules
```## Installation
Clone repository and then go into the created directory and run the following command:
```
make
```## Usage
### `asm`
```
Usage: ./asm (champion.s|champion.cor)
champion.s — from assemble to bytecode
champion.cor — from bytecode to assemble
```### `corewar`
```
Usage: ./corewar [-a (-dump|-d) (-shed|-s) -l ] [-v] [-n ] <...>
-a : Print output from "aff" (Default is off)
-dump : Dump memory (32 octets per line) after cycles and exit
-d : Dump memory (64 octets per line) after cycles and exit
-show : Run cycles, dump memory (32 octets per line), pause and repeat
-s : Run cycles, dump memory (64 octets per line), pause and repeat
-l : Log levels
1 : Show lives
2 : Show cycles
4 : Show operations
8 : Show deaths
16 : Show PC movements
-v : Run visualizer
-n : Set of the next player
```## Visualizer
The best visualizer performance is with **iTerm2**.
![Visualizer](/wiki_resources/visualizer.png)