Jump to content
Sign in to follow this  
madflame991

Coin

Recommended Posts

madflame991

Hi! I'm back!

Here's what I've been cooking in the last month

This is the official description:

"Coin is a freeware assembly-like scripting language designed for educational purposes. The main feature of Coin is its configurable interpreter which acts more like an emulator. With the help of the interpreter the user can specify how many clock cycles does it take for every instruction to be executed. The user can also specify how many registers and how much memory is available and how large the stack is. This level of customization is ideal for algorithmic problems. The challenge the programmer is faced is to conceive an efficient algorithm for a specific strange machine (e.g. one without arithmetic instructions, one with only 4 registers)."

Just take a moment and think of the possibilities.

I know there are some assembly enthusiasts here (btw, thx trancexx for that asm request from last summer)

"Provide an efficient algorithm for problem X when running on:

+ machines which lack basic operations (e.g. inc, dec, add, sub)

+ machines which have no more than 2 registers, no RAM and a stack"

Some language specifications:

+ registers are autoinitilialised by the interpreter (borrowed this idea from dear AutoIt)

+ there are no gotos or labels! I think this is the only assembly like language without gotos; obviously gotos are replaced by if/while statements

+ there are plenty of useful instructions like: min, max, fread (FileRead with 3 parameters reads n values from the input file and stores them in memory beginning with the desired address), swapr (SwapRegister does something like $tmp = $a, $a = $b, $b = $tmp), mcopy (MemoryCopy... you know), rand

+ both =,<> and ==,!= are supported

+ do leave blank spaces between values and relations (e.g. if a < b ); if a=b is a big nono

You will find a complete documentation in the archives

Sourcecode and binaries are released on Sourceforge http://sourceforge.net/projects/commandinterpre/

Compile the interpreter first...

Suggestions, bug reports, problem proposals, any kind of feedback are welcomed

Posted Image

Edited by madflame991

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×