GithubHelp home page GithubHelp logo

bricksvm's People

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

bricksvm's Issues

Write video device

Create a simple video device

Each program have its own video space or screen(as you want)

Instruction:
put_pixel(x, y, value)
read_pixel(x, y)
write_char(x, y, value)

Writing simple audio device

Write a simple audio device that play audio from memory address

load_sound(channel, memAddr, size)
load_music(channel, memAddr, size)
play_music(channel)
play_sound(channel)
pause_sound(channel)
pause_music(channel)
stop_music(channel)
stop_sound(channel)
unload_sound(channel)
unload_music(channel)

Write parser for virtual machine language

Create a parser for the language of the virtual machine.

Syntax is :

For instruction :
instruction(param1, param2, ..., paramN)

For parameter:

Two type of parameter: Value and instruction
like : instruction(instruction1(param), Int8:42, 42)

For value:

Type_specifier:value
if no type specifier is available deduce them like (42.1 -> Double, 42 -> Int32)

We can have label that you need to translate into index(index are absolute not relative)
Example:

toto:
instruction_1(param1)

bla:
jump("toto") // Transformed to jump(0)

Writing SimpleMemory device

Write a simple memory device.

Instruction required:

mem_read(adress, sizeToRead)
mem_write(adress, value)
mem_get_size()

The memory should be divided into multiple part to avoid collision between programs

Each program have its own memory zone.

Write Simple CPU device

Write simple cpu

CPU must have 16 register for each program and 16 floating point register for each program

Instruction:
scpu_reg_read(index) // Return 64 bit integer value
scpu_fpreg_read(index) // Return a double value
scpu_reg_write(index, value)
scpu_fpreg_write(index, value)
scpu_add(value1, value2)
scpu_sub(value1, value2)
scpu_mul(value1, value2)
scpu_mod(value1, value2)
scpu_or(value1, value2)
scpu_xor(value1, value2)
scpu_and(value1, value2)
scpu_leftshift(value1, value2)
scpu_rightshift(value1, value2)

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.