|
@@ -137,6 +137,7 @@ class Turmit(object):
|
137
|
137
|
if new_sz < 2:
|
138
|
138
|
new_sz = 2
|
139
|
139
|
stksz = len(self._stack)
|
|
140
|
+ new_sz %= 0xFFF
|
140
|
141
|
if new_sz > stksz:
|
141
|
142
|
self._stack += [ 0 for _ in range(new_sz - stksz) ]
|
142
|
143
|
elif new_sz < stksz:
|
|
@@ -217,6 +218,15 @@ class Turmit(object):
|
217
|
218
|
'''
|
218
|
219
|
return a | b
|
219
|
220
|
|
|
221
|
+ @RpnOp
|
|
222
|
+ def bin_xor(self, a, b):
|
|
223
|
+ ''' @brief Binary xor
|
|
224
|
+ @param a int : value
|
|
225
|
+ @param b int : value
|
|
226
|
+ @return a ^ b
|
|
227
|
+ '''
|
|
228
|
+ return a ^ b
|
|
229
|
+
|
220
|
230
|
@RpnOp
|
221
|
231
|
def pop(self, a):
|
222
|
232
|
''' @brief Pops a, head of the stack
|