about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--subx/Readme.md2
-rw-r--r--subx/opcodes66
2 files changed, 68 insertions, 0 deletions
diff --git a/subx/Readme.md b/subx/Readme.md
index d68cc331..4a444b0a 100644
--- a/subx/Readme.md
+++ b/subx/Readme.md
@@ -1 +1,3 @@
 Bytecode interpreter for a subset of the 32-bit x86 ISA.
+
+I'm currently building this over at https://github.com/tekknolagi/stackx/tree/ak
diff --git a/subx/opcodes b/subx/opcodes
new file mode 100644
index 00000000..8d9ca2f6
--- /dev/null
+++ b/subx/opcodes
@@ -0,0 +1,66 @@
+idle
+  90/nop/xchg-eax-eax
+copy
+  mov r/m32 r32: 89
+  mov r32 r/m32: 8b
+  mov r/m32 imm32: c7
+  memcpy
+  $copy_and_increment_refcounts destination, source, [type descriptor]
+
+add
+subtract
+multiply
+divide
+divide-with-remainder
+square-root
+shift-right
+shift-left
+not
+flip-bits
+or
+or-bits
+and
+and-bits
+xor-bits
+equal
+not-equal
+lesser-than
+lesser-or-equal
+greater-than
+greater-or-equal
+round
+truncate
+max
+min
+random
+jump
+jump-if
+jump-unless
+call (dynamic)
+return
+next-ingredient
+ingredient
+rewind-ingredients
+character-to-code
+new _, _
+length
+index
+put-index
+new _
+get
+put
+maybe-convert
+trace
+to-text
+deep-copy
+hash
+wait-for-reset-then-set
+reset
+get-location
+wait-for-routine
+switch
+current-routine-is-blocked
+current-routine-is-unblocked
+wait-for-routine-to-block
+restart
+limit-time