The Corewar Epitech project is about champion fighting simulation.
Pseudo-assembly programs are run in a virtual machine, and the goal is to call last the special instruction live.
A champion program is a pseudo-assembly program, with the following syntax:
# This is a comment
.name "<champion name>"
.comment "<champion description>"
label: # This is a label
live r1 # This is an instruction
ld %42, r2 # Load the direct value 42 into the register r2
ld 42, r3 # Load the indirect value at address 42 into the register r3
zjmp %:label # Jump to the labelYou can then compile your champion program with the asm program:
asm/asm champion.s
ls -l champion.corYou can then use it with the corewar program:
corewar/corewar champion.cor champion.cor champion2.cor