Stealthware
articleArticlesbreaking_newsNewstagTagscontact_supportContacts
Articles / EasyDCPU

Like a lot of people i have been very interested in Notch’s new game 0x10c, and especially in the DCPU-16 computer that will be at the heart of it.

So for the last week or so i have been taking a break from Minecraft modding (and most other things) to create EasyDCPU.

What it is

EasyDCPU, currently available as version 0.3 Alpha. Is a small program that takes C# code and compiles it into assembly code compatible with the DCPU-16 spec.

The reason for creating this is simple. Programming in assembly code is slow and tedious.
Like a lot of programmers I have played with assembly code several times and find it impressive what its possible to achive with just a few instructions. However I would never consider it for larger projects and much prefer coding in a high level language.

There are also a significant number of people who may be interested in creating their own programs for DCPU but would be put off by the assembly code. Now they have a choice.

Currently EasyDCPU is a very simple program with a text editor to enter code and another box to read the assembly output. It is capable of converting most simple c# statements, such as: If, Else If, Else, For and While. It supports variables, basic methods as well as many arithmetic and comparison operators.

Screenshot

What it will be

Future versions will provide a better code editor and most likely a built in emulator.

In future it will support most C# language features such as objects and arrays. It will also provide easy access to advanced functions via built in libraries. These will provide features similar to the Math and Console classes in the .Net Framework.

It may also add support for other languages, such as Java which for many basic features only has slight differences to C#.

What it is not

It is not a port of the .Net Framework or Mono Class library to DCPU-16. Whilst it would be nice to have access to all those ready to use libraries even the smallest subset of Mono would be many times larger than the memory available.

It is also not going to provide a runtime environment with type checking, garbage collection and other features. Some optimisations may be made when compiling the code but it will be compiled into assembly or binary ready to run on the DCPU-16 rather than interpreted code as C# is normally.

Download and More Info

You download the first version form the link below.

EasyDCPU 0.3 Alpha.zip 69KB
ChangeLog

There is a Wiki available at the link below, which i have stated populating with useful information.

wiki.easydcpu.com

Please feel free to contribute to the wiki and post comments or questions below.

You can also visit what will become the main website, easydcpu.com, currently contains most of what is on this page.

I will be posting new versions every few days over the next week or so. So check back for updates.

Happy Coding!

Written by Martin Green (Fearitude). First published on Tue Apr 24 2012