Giter Site home page Giter Site logo

corewar's Introduction

Anurag's GitHub stats

corewar's People

Contributors

letamanoir avatar louonezime avatar martinfillon avatar n0v46027 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

corewar's Issues

redcode header handling

  • 128 bits for the name
  • \t before .name and .comment
  • 2048 bits for the comment
  • print a structure direct
  • bytecode has no \0
  • 4 bytes at start of .cor (1 int) -- the bytecode
  • all .cor files will start 0xe183f3
  • apres les 4 bytes, le name= 2048 + 1 bits
  • approx size 4 bytes (1 int) - -the bytecode
  • apres les 4 bytes, le comment = 512 bytes

error handling

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • body error handling
  • header error handling

File a Pull Request.

zjmp

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • link to octet
  • takes 1 parameter (must be an index)
  • jumps to this index if the carry is worth 1
  • otherwise does nothing but consumes the same time
  • error handling

zjmp %23 puts, if carry equals 1, PC + 23 % IDX_MOD into the PC.

File a Pull Request.

zjmp (vm)

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • yo

File a Pull Request.

sub

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • link to octet
  • similar to add but performing a subtraction.
  • error handling

File a Pull Request.

lldi

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • link to octet
  • similar to ldi without the % IDX_MOD
  • error handling

This operation modifies the carry.

File a Pull Request.

and

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • link to octet
  • takes 3 parameters
  • performs a binary AND
  • between the first two parameters and stores the result into the third one (which must be a register)
  • error handling

This operation modifies the carry.
and r2, %0,r3 puts r2 & 0 into r3.

File a Pull Request.

sub (vm)

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • yo

File a Pull Request.

-dump (nbr_cycles)

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • -dump arg parse

File a Pull Request.

add

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • link to octet
  • takes 3 registers as parameters
  • adds the content of the first two and puts the sum into the third one, third must be a register
  • error handling

This operation modifies the carry.
add r2,r3,r5 adds the content of r2 and r3 and puts the result into r5

File a Pull Request.

fork

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • link to octet
  • takes 1 parameter (must be an index)
  • creates a new program that inherits different states from the parent.
  • error handling

This program is executed at the address PC + first parameter % IDX_MOD.

File a Pull Request.

sti

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • link to octet
  • takes 3 parameters (first one must be a register, other two can be indexes or registers)
  • error handling

sti r2,%4,%5 copies the content of r2 into the address PC + (4+5)% IDX_MOD.

File a Pull Request.

fork (vm)

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • yo

File a Pull Request.

lldi (vm)

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • yo

File a Pull Request.

st

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • link to octet
  • takes 2 parameters
  • stores the first parameter's value into the second
  • error handling

first param value is a register and second (whether a register or number)

st r4,34 stores the content of r4 at the address PC + 34 % IDX_MOD.
st r3,r8 copies the content of r3 into r8

File a Pull Request.

parsing of champion's body

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • parameter parse
  • all instructions

File a Pull Request.

vm parsing

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • #36
  • -n (prog_number)
  • -a (load_address)

File a Pull Request.

header parse

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • .name
  • .comment
  • magic number
  • #12

File a Pull Request.

aff

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • link to octet
  • takes 1 parameter (must be a register)
  • displays on the standard output the character whose ASCII code is the content of the register (base 10)
  • error handling

A 256 modulo is applied to this ASCII code.
aff r3 displays โ€™*โ€™ if r3 contains 42.

File a Pull Request.

xor

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • link to octet
  • similar to and but performing a binary XOR (exclusive OR)
  • error handling

File a Pull Request.

program size

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • get program size to pass into header structure

File a Pull Request.

or

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • link to octet
  • similar to and but performing a binary OR
  • error handling

File a Pull Request.

xor (vm)

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • yo

File a Pull Request.

body parse

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

File a Pull Request.

ld (vm)

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • yo

File a Pull Request.

live

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • link to octet
  • takes 1 parameter (4 bytes)
  • indicates that the player is alive
  • error handling

File a Pull Request.

add (vm)

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • yo

File a Pull Request.

st (vm)

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • yo

File a Pull Request.

or (vm)

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • yo

File a Pull Request.

lfork

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • link to octet
  • similar to fork without the % IDX_MOD
  • error handling

File a Pull Request.

ld

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • link to octet
  • takes 2 parameters
  • loads the values of the first parameter into the second parameter
  • error handling

which must be a register (not the PC). This operation modifies the carry.
ld 34,r3 loads the REG_SIZE bytes starting at the address PC + 34 % IDX_MOD into r3

File a Pull Request.

lld

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • link to octet
  • similar to ld, without the %IDX_MOD
  • error handling

This operation modifies the carry.

File a Pull Request.

ldi

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • link to octet
  • takes 3 parameters (first two must be indexes, third must be a register)
  • error handling

This operation modifies the carry.

ldi 3,%4,r1 reads IND_SIZ bytes from the address PC + 3 % IDX_MOD, adds 4 to this value.
The sum is named S. REG_SIZE bytes are read from the address PC + S % IDX_MOD and copied into r1.

File a Pull Request.

live (vm)

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • yo

File a Pull Request.

sti (vm)

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • yo

File a Pull Request.

and (vm)

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • yo

File a Pull Request.

manage comments "#"

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • yi

File a Pull Request.

lfork (vm)

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • yo

File a Pull Request.

convert to big endian

The virtual machine is BIG ENDIAN (like the Sun and unlike the i386). This changes the
order of storage, and thus perhaps the way you should transcribe your information

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • make function that returns BIG ENDIAN
  • apply conversion

The virtual machine is BIG ENDIAN (like the Sun and unlike the i386). This changes the
order of storage, and thus perhaps the way you should transcribe your information

File a Pull Request.

header memory set issues

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • fix input of name
  • fix input of comment

File a Pull Request.

lld (vm)

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • yo

File a Pull Request.

ldi (vm)

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • yo

File a Pull Request.

aff (vm)

Please follow the general troubleshooting steps first:

  • Coding style
  • No conflicts?

Features:

  • yo

File a Pull Request.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.