Jump to content
Mr. Green Gaming

What are you working on?


Clavus

Recommended Posts

  • 3 weeks later...
  • 2 weeks later...

An experimental, minimal VM:

	qxInt program[] = { 

//Initialize the counter
QX_CONST, 0,
QX_CONST, 1,
QX_SET,

//Get current value
QX_CONST, 0,
QX_CONST, 0,
QX_GET,

//Increment value and store
QX_CONST, 1,
QX_ADD,
QX_SET,

//Print the value
QX_CONST, 0,
QX_GET,
QX_PRINT,

//Jump back to get current value
QX_CONST, 1,
QX_CONST, 4,
QX_JIF
};
qxDo( program );

This program infinitely increments a counter and prints each value to the console :)

I plan on using the VM as backend for some experimental programming language later.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...