User:Zarutian/Smallcaps
From Erights
(Difference between revisions)
m |
|||
| Line 34: | Line 34: | ||
0x16 OP_WHOLE_NUM [],[] => OP_WHOLE_NUM(wholeNum) => [wholeNum],[] | 0x16 OP_WHOLE_NUM [],[] => OP_WHOLE_NUM(wholeNum) => [wholeNum],[] | ||
| + | 0x17 OP_NEG_INT [],[] => OP_NEG_INT(wholeNum) => [-wholeNum],[] | ||
| + | 0x18 OP_FLOAT64 [],[] => OP_FLOAT64(float64) => [float64],[] | ||
| + | 0x19 OP_CHAR [],[] => OP_CHAR(chr) => [chr],[] | ||
| + | 0x1A OP_STRING [],[] => OP_STRING(str) => [str],[] | ||
| + | 0x1B OP_TWINE [],[] => OP_TWINE(twine) => [twine],[] | ||
| + | 0x1C OP_TRUE [],[] => OP_TRUE => [true],[] | ||
| + | 0x1D OP_FALSE [],[] => OP_FALSE => [false],[] | ||
| + | 0x1E OP_NULL [],[] => OP_NULL => [null],[] | ||
| + | 0x1F OP_SCOPE [],[] => OP_SCOPE => [scope],[] | ||
Revision as of 17:50, 30 January 2010
Notes of what I have cleaned from the incomplete spefication and implementation of Smallcaps.
Smallcaps is a bytecode based format of executable code.
The opcodes are:
Hex Memnomic Effects/Description
0x01 OP_DUP [x],[] => OP_DUP => [x, x],[]
0x02 OP_POP [x],[] => OP_POP => [],[]
0x03 OP_SWAP [x, y],[] => OP_SWAP => [y, x],[]
0x04 OP_ROT [x, y, z],[] => OP_ROT => [y, z, x],[]
0x05 OP_RETURN [x],[] => OP_RETURN
0x08 OP_JUMP [],[] => OP_JUMP(label) => [],[]
label := ?Waterken Wholenum?
0x09 OP_BRANCH [ootEjector, flag],[] => OP_BRANCH => [],[]
0x0A OP_CALL_ONLY [recip, args...],[] => OP_CALL_ONLY(verb, arity) => [],[]
0x0B OP_CALL [recip, args...],[] => OP_CALL(verb, arity) => [result],[]
verb := ?Waterken UTF8 string?
arity := ?Waterken Wholenum?
0x0E OP_EJECTOR_ONLY [],[] => OP_EJECTOR_ONLY(label) => [ejector],[handler]
when ejector is invoked: [...],[...] => ejector(_) => [],[]
0x0F OP_EJECTOR [],[] => OP_EJECTOR(label) => [ejector],[handler]
when ejector is invoked: [...],[...] => ejector(result) => [result],[]
0x10 OP_TRY [],[] => OP_TRY(label) => [],[handler]
when handler is invoked: [...],[...] => handler(arg) => [arg],[]
when handler is dropped: [...],[...] => handler.drop(_) => [...],[...]
0x11 OP_UNWIND [],[] => OP_UNWIND(label) => [],[handler]
when handler is invoked: [...],[...] => handler(arg) => [rethrower(arg)],[]
when handler is dropped: [...],[...] => handler.drop(pc) => [returner(pc)],[]
0x12 OP_END_HANDLER [],[handler] => OP_END_HANDLER => [],[]
0x16 OP_WHOLE_NUM [],[] => OP_WHOLE_NUM(wholeNum) => [wholeNum],[]
0x17 OP_NEG_INT [],[] => OP_NEG_INT(wholeNum) => [-wholeNum],[]
0x18 OP_FLOAT64 [],[] => OP_FLOAT64(float64) => [float64],[]
0x19 OP_CHAR [],[] => OP_CHAR(chr) => [chr],[]
0x1A OP_STRING [],[] => OP_STRING(str) => [str],[]
0x1B OP_TWINE [],[] => OP_TWINE(twine) => [twine],[]
0x1C OP_TRUE [],[] => OP_TRUE => [true],[]
0x1D OP_FALSE [],[] => OP_FALSE => [false],[]
0x1E OP_NULL [],[] => OP_NULL => [null],[]
0x1F OP_SCOPE [],[] => OP_SCOPE => [scope],[]

