Advertisement
NovaYoshi

dumb 255 byte encoding

Apr 10th, 2015
293
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.17 KB | None | 0 0
  1. byte 1- total bytes of command, not including this one
  2. byte 2- command id
  3.  
  4. 00 xx positive const 8
  5. 01 xx negative const 8
  6. 02 xxyy positive const 16
  7. 03 xxyy negative const 16
  8. 04 xxyyzzww const 32
  9. 05 xxyy variable read
  10. 06 ff nn .. CALL FUNCTION ff with nn parameters, listed after
  11. 07 original value
  12. 08 __ __ add
  13. 09 __ __ sub
  14. 0a __ __ multiply
  15. 0b __ __ divide
  16. 0c __ __ modulo
  17. 0d __ __ bit and
  18. 0e __ __ bit or
  19. 0f __ __ bit xor
  20. 10 CC __ __ ternary
  21. 11 __ __ min
  22. 12 __ __ max
  23. 13 __ negate
  24. 14 __ *ptr
  25. 15 __ __ *(ptr+index)
  26. 16 __ __ shift left
  27. 17 __ __ shift right
  28. 18 CC convert condition to 1 if true and 0 if false
  29. 19 CC convert condition to -1 if true and 0 if false
  30. 1a xxyy __ array value
  31. 1b xxyy __ array reference
  32. 1c __ bit not
  33. 1d __ __ indirect set
  34. 1e __ increment
  35. 1f __ decrement
  36. 20 __ *(--ptr)
  37. 21 __ *(++ptr)
  38. 22 __ *(ptr--)
  39. 23 __ *(ptr++)
  40. 24 __ __ A+=B
  41. 25 __ __ A-=B
  42. 26 loop index
  43. 27
  44. 28
  45. 29
  46. 2a
  47. 2b
  48. 2c
  49. 2d
  50. 2e
  51. 2f
  52. 3x x as positive 4-bit number
  53. 4x x as negative 4-bit number
  54. 5x function/call argument x (value), for reference, just use 3x
  55. 6x function/call argument x as reference
  56.  
  57. ff end of list?
  58.  
  59. 00 nop
  60. 01 ? iftrue prefix
  61. 02 ?: ternary prefix
  62. 03 :? reverse ternary prefix
  63.  
  64. 04 reserved
  65. 05 reserved
  66. 06 reserved
  67. 07 reserved
  68.  
  69. 08 set [Dst] [Src]
  70. 0a set? [Cnd] [Dst] [Src]
  71. 0b set?: [Cnd] [Dst] [Src] [Src]
  72. 0c set:? [Cnd] [Dst] [Dst] [Src]
  73.  
  74. 0c swap [Dst] [Src]
  75. 0d swap? [Cnd] [Dst] [Src]
  76. 0e swap?: [Cnd] [Dst] [Src] [Src]
  77. 0f swap:? [Cnd] [Dst] [Dst] [Src]
  78.  
  79. 10 math [Dst] [Src]
  80. 11 math? [Cnd] [Dst] [Src]
  81. 12 math?: [Cnd] [Dst] [Src] [Src]
  82. 13 math:? [Cnd] [Dst] [Dst] [Src]
  83.  
  84. 14 rmath [Siz] [Dst] [Equ]
  85. 15 rmath? [Cnd] [Siz] [Dst] [Equ]
  86. 16
  87. 17
  88.  
  89. 18 goto [Loc]
  90. 19 goto? [Cnd] [Loc]
  91. 1a goto?: [Cnd] [Loc] [Loc]
  92. 1b call [Loc]
  93.  
  94. 1c call? [Cnd] [Loc]
  95. 1d call?: [Cnd] [Loc] [Loc]
  96. 1e return
  97. 1f return? [Cnd]
  98.  
  99. 20 fret [Val]
  100. 21 fret? [Cnd] [Val]
  101. 22 fret?: [Cnd] [Val] [Val]
  102. 23 InitLocal Dest/Num ...
  103.  
  104. 24 acall [Loc] Num ...
  105. 25 acall? [Cnd] [Loc] Num ...
  106. 26 atail [Loc] Num ...
  107. 27 atail? [Cnd] [Loc] Num ...
  108.  
  109. 28 aret
  110. 29 aret? [Cnd]
  111. 2a
  112. 2b
  113.  
  114. 2c memset [Dst] [Siz] [Val]
  115. 2d memset? [Cnd] [Dst] [Siz] [Val]
  116. 2e memcpy [Dst] [Siz] [Src]
  117. 2f memcpy? [Cnd] [Dst] [Siz] [Src]
  118.  
  119. 30
  120. 31
  121. 32
  122. 33
  123.  
  124. 34
  125. 35
  126. 36
  127. 37
  128.  
  129. 3c
  130. 3d
  131. 3e
  132. 3f
  133.  
  134. 40 --- used defined stuff follows ---
  135. 41
  136. 42
  137. 43
  138.  
  139. 44
  140. 45
  141. 46
  142. 47
  143. 48
  144. 49
  145. 4a
  146. 4b
  147. 4c
  148. 4d
  149. 4e
  150. 4f
  151.  
  152.  
  153. ------------------ conditions -------------------
  154. 00 cmp [value] [operator] [value]
  155. 01 not [bool]
  156. 02 and [bool] [bool]
  157. 03 or [bool] [bool]
  158. 04 xor [bool] [bool]
  159. 05 nand [bool] [bool]
  160. 06 nor [bool] [bool]
  161. 07 nxor [bool] [bool]
  162. 08 true
  163. 09 false
  164. 0a random
  165. 0b nonzero [value]
  166. 0c function [loc] num ...
  167. 0d memcmp [A] [B] [Size]
  168. 0e strcmp [A] [B]
  169. 0f strcasecmp [A] [B]
  170. 10 == [value] [value]
  171. 11 != [value] [value]
  172. 12 > [value] [value]
  173. 13 >= [value] [value]
  174. 14 < [value] [value]
  175. 15 <= [value] [value]
  176. 16 and3
  177. 17 and4
  178. 18 and5
  179. 19 or3
  180. 1a or4
  181. 1b or5
  182. 1c
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement