My submission for Ludum Dare 36.

Here is the LD link!

As of 8/31/2016 this game is now called Coder and it changed it's syntax to look more like assembler.The new Documentation will be present shortly.Legacy build is still avaliable but with no documentation.

The code is separated by spaces or commas.

JMP example: mov a,5 jmp 10 mov c,a hello there:) mov b,a

  • mov - 0
  • a - 1
  • 5 - 2
  • jmp - 3
  • 10 - 4
  • ...

The above code will execute the first mov,jump over the second mov and invalid "hello there:)" to the third mov and then finish executing

Instruction list:

  • add x,y - Add Y(number) to X(register)
  • and x,y - Logical AND, X & Y are registers, the result is stored in X
  • clc - Set compare flag to false
  • cls - Set sign flag to false
  • cmp x,y - Compare X(register) and Y(number or register), raises compare flag if set
  • dec X - Decrement X(register) by one
  • div X,Y - Divide X(register) by Y(number) and store the result in X
  • hlt - Stop code execution
  • idiv X,Y - Divide X and Y which are both registers,the result is stored in X
  • imul X,Y - Multiply X and Y which are both registers,and store the result in the X register
  • inc X - Increment X register by one
  • int X - Calls the interrupt X
  • jc X - Jump to X separation if compare flag is true
  • jnc X - Jump to X if compare flag is false
  • js X - Jump to X if sign flag is true
  • jns X - Jump to X if sign flag is false
  • jz X,Y - Jump to Y if X register is zero
  • jnz X,Y - Jump to Y if X register isn't zero
  • jmp X - Jump to X
  • mov X,Y - Copy Y's value(register or number) to X(register)
  • mul X,Y - Multiply X(register) by Y(number) and store the result in X
  • neg X - Switch the sign of X's value(register)
  • nop - Do nothing
  • or X,Y - Logical OR,X & Y are registers,the result is stored in X
  • pop X - Remove last value from stack and store it in X
  • push X - Add X's(register) value to stack
  • shl X,Y - Shift X's(register) bytes by Y(number) to the left
  • shr X,Y - Shift X's(register) bytes by Y(number) to the right
  • stc - Set compare flag to true
  • sts - Set sign flag to true
  • sub X,Y - Subtract Y(number or register) from X(register) and if the result is negative set the sign flag to true
  • xor X,Y - Logical XOR,X & Y are both registers

Interrupts look for value stored in A.
Interrupt list:

  • 10
    • 1 - Write a character whose code is located in B,X times.X is stored in C register.
    • 2 - Set border color via RGB values.R is located in B,G in C and B in D register.
    • 3 - Set background color via RGB values.R is located in B,G in C and B in D register.

More information

Published100 days ago
StatusReleased
PlatformsHTML5
AuthorZvonimir Rudinski
GenreSimulation
Tags16-bit, 8-bit, Ludum Dare 36, sourcecode
Player countSingleplayer

Download

Download NowName your own price

Click download now to get access to the following files:

Legacy.zip 5 MB

Community

StickyPrograms
by Zvonimir Rudinski · 1 post
97d
StickyIssues
by Zvonimir Rudinski · 1 post
97d
View all posts