Shellin' out a framework

0.1-prestable
Adam Frisby 2007-05-03 04:13:43 +00:00
parent e63e6f0d8a
commit ea63400741
2 changed files with 43 additions and 4 deletions

View File

@ -6,7 +6,7 @@ namespace libLSL
{
enum lslVarType
enum lslVarType : byte
{
VARTYPE_VOID = 0,
VARTYPE_INTEGER = 1,
@ -18,7 +18,7 @@ namespace libLSL
VARTYPE_LIST = 7
}
enum lslEventType
enum lslEventType : byte
{
EVENT_STATE_ENTRY = 0,
EVENT_STATE_EXIT = 1,
@ -55,7 +55,7 @@ namespace libLSL
EVENT_HTTP_RESPONSE = 32
}
enum lslOpcodes
enum lslOpcodes : byte
{
// No Operation
OP_NOOP = 0x00,
@ -319,7 +319,7 @@ namespace libLSL
class lslCodeChunk
{
lslCodeChunkHeader header;
byte[] bytecode;
lslByteCode bytecode;
public void readFromBytes(byte[] data)
{

View File

@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace libLSL
{
class lslByteCode
{
byte[] bytecode;
public void executeStep()
{
byte ins = nextInstruction();
lslOpcodes code = (lslOpcodes)ins;
switch (code)
{
case lslOpcodes.OP_NOOP:
break;
case lslOpcodes.OP_POP:
popBytes(4);
break;
default:
break;
}
}
byte nextInstruction()
{
return 0;
}
void popBytes(int num)
{
}
}
}