{"assets":[],"author_link":"author\/helco\/","author_name":"Helco","cat":"Uncategorized","categories":["Uncategorized"],"comments":[],"epoch":1344685440,"event":"","likes":4,"metadata":{"p_key":"77028","p_author":"Helco","p_authorkey":"0","p_urlkey":"285522","p_title":"ExecutionCode experimental script language \u2013 not a \u201cI\u2019m in\u201d-Post","p_cat":"Uncategorized","p_event":"LD24","p_time":"1344685440","p_likes":"4","p_comments":"0","p_status":"WAYBACK","us_key":null,"us_name":null,"us_username":null,"event_start":"1345766400","event_key":"12","event_name":"LD24"},"source_url":"2012\/08\/11\/executioncode-experimental-script-language-not-a-im-in-post\/","text":"<p>Hi, I like to introduce to you a new script language: ExecutionCode<br\/>\nI didn\u2019t inted to create a language for games, but of course it can be used for games. It\u2019s inspired by normal assembly, but cutted down to just one parameter. Also there are huge changes to some other things. But look at your own at a small application (it counts to 10):<\/p>\n<blockquote><p><code>\/\/All commentars are done c-style<br\/>\n\/*so of course these multiline commentars<br\/>\nare supported!*\/<\/code><\/p>\n<p>\/*<br\/>\nprograms are not splitted up in functions, okay basically they are,<br\/>\nbut I call them modules and all the functions imported from C++ have their own name <img alt=\":)\" class=\"wp-smiley\" src=\"http:\/\/ludumdare.com\/compo\/wp-includes\/images\/smilies\/icon_smile.gif\"\/><br\/>\n*\/<\/p>\n<p>\/\/a command is splitted up in group name and function name<br\/>\nmain {<br\/>\n\/\/those square brackets indicate variables<br\/>\nsystem.alloc [counter]<br\/>\nsystem.alloc [isNowEnd]<br\/>\n\/\/first I push a raw numeric value (here 1) on the param stack<br\/>\nsystem.push 1<br\/>\n\/*then the system.set command pops that value from the param stack and copies it to the given<br\/>\nvariable.<br\/>\nIf you put something on the stack, the value! is on the stack so if a command wants to change<br\/>\na variable it has to require it as param*\/<br\/>\nsystem.set [counter]<\/p>\n<p>\/\/this is a jump mark, because you have to implement your loops on your own<br\/>\nLoopStart:<br\/>\n\/\/first I print the variable to the world<br\/>\nconsole.println [counter]<\/p>\n<p>\/*a mathematical operation is done by pushing the two values on the stack and give the<br\/>\ntarget to the command<br\/>\n*\/<br\/>\nsystem.push [counter]<br\/>\nsystem.push 1<br\/>\nmath.add [counter]<\/p>\n<p>\/\/and now I want to if [counter] came to 10 so I use the logical.lesser command<br\/>\nsystem.push [counter]<br\/>\n\/\/these brackets indicate a ressource<br\/>\nsystem.push<br\/>\nlogical.equal [isNowEnd] \/\/so if counter==11 then isNowEnd=1<\/p>\n<p>\/\/and if isNowEnd==1<br\/>\nsystem.skip [isNowEnd]<br\/>\nsystem.jump \u201cLoopStart\u201d<\/p>\n<p>\/\/don\u2019t forget to free the variables<br\/>\nsystem.free [counter]<br\/>\nsystem.free [isNowEnd]<br\/>\n}<\/p>\n<p>\/\/a ressource can be like variables a number or a string<br\/>\n\/\/and here is another feature: if you put a \u2018#\u2019 in front of a number you can type hexadecimal<br\/>\n\/\/decimal, this is 11<br\/>\nressource #b<\/p><\/blockquote>\n<p>The code might look irritating, if so, delete the commentars and try to understand just the actual code.<br\/>\nThe compiler\/interpreter application is done in the meaning that this code can compiled in bytecode and this bytecode can be executed by the virtual machine in the same application, but it isn\u2019t enough finished (particularly the error handling procedures), so it won\u2019t be released now, but I hope I\u2019ll get this done before next LudumDare. I\u2019ll also write a full reference of this lanuage, the bytecode, the virtual machine and the compiler.<br\/>\nIf you have any questions about it just ask me.<\/p>\n<p>Helco<\/p>\n<p>Tags: <a href=\"http:\/\/ludumdare.com\/compo\/tag\/bytecode\/\" rel=\"tag\">bytecode<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/c\/\" rel=\"tag\">C++<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/compiler\/\" rel=\"tag\">compiler<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/executioncode\/\" rel=\"tag\">ExecutionCode<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/helco\/\" rel=\"tag\">Helco<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/script-language\/\" rel=\"tag\">script language<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/scripting\/\" rel=\"tag\">scripting<\/a>, <a href=\"http:\/\/ludumdare.com\/compo\/tag\/virtual-machine\/\" rel=\"tag\">Virtual Machine<\/a><\/p>","time":"August 11th, 2012 11:44 am","title":"ExecutionCode experimental script language \u2013 not a \u201cI\u2019m in\u201d-Post"}