Giter VIP home page Giter VIP logo

synacor-challendge's Introduction

== Synacor Challenge == In this challenge, your job is to use this architecture spec to create a virtual machine capable of running the included binary. Along the way, you will find codes; submit these to the challenge website to track your progress. Good luck!

== architecture ==

  • three storage regions
    • memory with 15-bit address space storing 16-bit values
    • eight registers
    • an unbounded stack which holds individual 16-bit values
  • all numbers are unsigned integers 0..32767 (15-bit)
  • all math is modulo 32768; 32758 + 15 => 5

== binary format ==

  • each number is stored as a 16-bit little-endian pair (low byte, high byte)
  • numbers 0..32767 mean a literal value
  • numbers 32768..32775 instead mean registers 0..7
  • numbers 32776..65535 are invalid
  • programs are loaded into memory starting at address 0
  • address 0 is the first 16-bit value, address 1 is the second 16-bit value, etc

== execution ==

  • After an operation is executed, the next instruction to read is immediately after the last argument of the current operation. If a jump was performed, the next operation is instead the exact destination of the jump.
  • Encountering a register as an operation argument should be taken as reading from the register or setting into the register as appropriate.

== hints ==

  • Start with operations 0, 19, and 21.
  • The program "9,32768,32769,4,19,32768" occupies six memory addresses and should:
    • Store into register 0 the sum of 4 and the value contained in register 1.
    • Output to the terminal the character with the ascii code contained in register 0.

synacor-challendge's People

Watchers

James Cloos avatar Sergey Ra avatar

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.