Git Product home page Git Product logo

corewar's Introduction

Greetings, traveller! 🧌

I'm just a passionate iOS Developer

revy

git ios apple xcode swift 42 c github gitlab jira

gloomikon

linkedin instangram telegram

corewar's People

Contributors

gloomikon avatar msaliuta avatar ozhadaie avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

rogxo

corewar's Issues

Corewar VM

./corewar ./resources/champs/examples/bee_gees.cor ./resources/champs/examples/fluttershy.cor ./resources/champs/examples/bigzork.cor ./resources/champs/examples/zork.cor

[1] 8371 segmentation fault ./corewar ./resources/champs/examples/bee_gees.cor

corevar translator

.name       "💀"
.comment    "This# city needs #;me"

live    %5,3

Our: Unexpected token "," SEPARATOR at [4:11]
Standart: Invalid parameter 1 type indirect for instruction live

corewar translator

.name       "Batman"
.comment    "This city needs me"

live    %53asdasd45

Our: Unexpected token "asdasd45" INSTRUCTION at [4:12]
Standard: Syntax error at token [TOKEN][004:012] INSTRUCTION "asdasd45"

corewar translator

    .name "'"
    .comment "123"

Our: Writing output program to ../test.cor
Standart: Syntax error at token [TOKEN][003:001] END "(null)"

Corewar VM leaks

./corewar ./resources/champs/examples/bee_gees.cor
Process 8524: 1 leak for 64 total leaked bytes.

1 (64 bytes) ROOT LEAK: 0x7fe04be7dfc0 [64]

Corewar asm

.name "112112234567876543213456786543213456786543245678654356765435678654356786543245678654345678765435678685434567876543245678765435678976543"						
.comment ""

live %0
ld %01127635136785127635128735217835712835821, r2
zjmp %-1912312312321312321321312312321312#!;.3123

Standart: Champion name too long (Max length 128)
Our: Writing output program to test.cor

corewar translator

    .name "'"
    .comment "123"

Our: Writing output program to ../test.cor
Standart: Syntax error at token [TOKEN][003:001] END "(null)"

Error type

In case of the following code:

.name "Batman"
.comment "Hello WORKD!!!"
label:

(no \n in the end)
Is there an error, if yes, what kind of?

corewar translator

#.name       "3!;:"
.name "";1       "........"
.comment    "!'"
.comment ""

zalupa:

Our: Writing output program to ../test.cor
Standart: Syntax error at token [TOKEN][004:001] COMMAND_COMMENT ".comment"

corevar translator

.name       "Batman"
.comment    "This city needs me"

live    %53123456789009876545

Diff: Binary files test.cor and ./resources/vm_champs/test.cor differ.

corewar translator

.name "zalupa"
.comment ""

Our: Writing output program to s.s.s.cor
Standart: Syntax error at token [TOKEN][004:001] END "(null)"

Corewar asm

.name "1121122345678765432134567865432134567865435435678654356786543245678654345678765435678685434567876543245678765435678976543"						
.comment "112112234567876543213456786543213456786543245678654356765435678654356786543245678654345678765435678685434567876543245678765435678976543
112112234567876543213456786543213456786543245678654356765435678654356786543245678654345678765435678685434567876543245678765435678976543
112112234567876543213456786543213456786543245678654356765435678654356786543245678654345678765435678685434567876543245678765435678976543
112112234567876543213456786543213456786543245678654356765435678654356786543245678654345678765435678685434567876543245678765435678976543
112112234567876543213456786543213456786543245678654356765435678654356786543245678654345678765435678685434567876543245678765435678976543
112112234567876543213456786543213456786543245678654356765435678654356786543245678654345678765435678685434567876543245678765435678976543
112112234567876543213456786543213456786543245678654356765435678654356786543245678654345678765435678685434567876543245678765435678976543
112112234567876543213456786543213456786543245678654356765435678654356786543245678654345678765435678685434567876543245678765435678976543
112112234567876543213456786543213456786543245678654356765435678654356786543245678654345678765435678685434567876543245678765435678976543
112112234567876543213456786543213456786543245678654356765435678654356786543245678654345678765435678685434567876543245678765435678976543
112112234567876543213456786543213456786543245678654356765435678654356786543245678654345678765435678685434567876543245678765435678976543
112112234567876543213456786543213456786543245678654356765435678654356786543245678654345678765435678685434567876543245678765435678976543
112112234567876543213456786543213456786543245678654356765435678654356786543245678654345678765435678685434567876543245678765435678976543
112112234567876543213456786543213456786543245678654356765435678654356786543245678654345678765435678685434567876543245678765435678976543
112112234567876543213456786543213456786543245678654356765435678654356786543245678654345678765435678685434567876543245678765435678976543
112112234567876543213456786543213456786543245678654356765435678654356786543245678654345678765435678685434567876543245678765435678976543
112112234567876543213456786543213456786543245678654356765435678654356786543245678654345678765435678685434567876543245678765435678976543
112112234567876543213456786543213456786543245678654356765435678654356786543245678654345678765435678685434567876543245678765435678976543
112112234567876543213456786543213456786543245678654356765435678654356786543245678654345678765435678685434567876543245678765435678976543
112112234567876543213456786543213456786543245678654356765435678654356786543245678654345678765435678685434567876543245678765435678976543
112112234567876543213456786543213456786543245678654356765435678654356786543245678654345678765435678685434567876543245678765435678976543
112112234567876543213456786543213456786543245678654356765435678654356786543245678654345678765435678685434567876543245678765435678976543"

live %0
ld %01127635136785127635128735217835712835821, r2
zjmp %-1912312312321312321321312312321312#!;.3123

Standart: Champion comment too long (Max length 2048);
Our: Writing output program to test.cor
asm(3523,0x7fff8c0c6380) malloc: *** error for object 0x7fa3d1003200: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
[1] 3523 abort ./asm test.s

Error type

What is an error message for unknown instruction?

memory allocation

define MEM_SIZE (4*102488888888) in op.h

Result: [1] 1361 segmentation fault ./asm test.s

LOOP

.name "Batman"
.comment "comment"


ld %:tr, r11
tr:
 ld %3, r11
 

corewar translator

.name       "....;#...."
.comment    ";"

        :liv1e

Our: Writing output program to ../test.cor
Standart: Syntax error at token [TOKEN][004:009] INDIRECT_LABEL ":liv1e"

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.