Giter VIP home page Giter VIP logo

foo-dcpu16's Introduction

foo-dcpu16 is a DCPU16 compiler and emulator. DCPU16 is the specification for 
the computer systems emulated in the multiplayer game "0x10c" 
(http://0x10c.com/).

foo-dcpu16 can compile assembler code and save it to a file. It conforms to 
0xSCA standards (https://github.com/0x10cStandardsCommittee/0x10c-Standards).

It has a black and white console emulator with some keyboard input. The 
console emulator can load code from assembly code or a compiled file.

It also has a test harness which will allow targeted manipulation of the 
chip and data.

The compiler does some optimization for space and speed.





== Compiling ==

java -cp DCPU.jar Assembler source.asm compiled.x




== Running the Console ==

java -cp DCPU.jar DCPU16Screen source.asm

OR

java -cp DCPU.jar DCPU16Screen compiled.x




== Running the Test Harness ==

java -cp DCPU.jar Harness

Then follow the on-screen menus.




== Examples ==

See the screen work:

java -cp DCPU.jar DCPU16Screen examples/TestScreen.asm

Notch's test code:

java -cp DCPU.jar DCPU16Screen examples/Test1.asm

foo-dcpu16's People

Contributors

dankuck avatar

Stargazers

 avatar

Watchers

 avatar  avatar

foo-dcpu16's Issues

Warn on if..macro

When a macro call produces several lines and is followed by an IF*, we really should show a warning.

Unless it's too hard.

Macro scope

Macros need to work in their own scope while also accepting labels from outer scopes.

Might be nice for reps to do the same, but they have some 0xSCA rules about labels.

Example macro that needs scope written by Notch (yeah, people use this):

; Reading characters from the keyboard
; by Markus Persson

macro nextkey(target) {

push(i)
set i,[keypointer]
add i,0x9000
set target,[i]
ife target,0
    jmp end 
set [i],0
add [keypointer], 1
and [keypointer], 0xf

:end
pop(i)
}

:keypointer
dat 0

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.