mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-01-07 00:29:34 +00:00
Add neg
This commit is contained in:
parent
5ad6b0733c
commit
5e3baa70fb
@ -721,6 +721,16 @@ def natv_rem(expr)
|
||||
return new_int(num[0], num[1])
|
||||
end
|
||||
|
||||
def natv_neg(expr)
|
||||
var num[2]
|
||||
|
||||
num[0], num[1] = eval_num(expr)
|
||||
load32(@num)
|
||||
neg32
|
||||
store32(@num)
|
||||
return new_int(num[0], num[1])
|
||||
end
|
||||
|
||||
def natv_gt(expr)
|
||||
var num[2]
|
||||
|
||||
@ -780,6 +790,7 @@ def install_defaults#0
|
||||
new_sym("*")=>natv = @natv_mul)
|
||||
new_sym("/")=>natv = @natv_div)
|
||||
new_sym("REM")=>natv = @natv_rem)
|
||||
new_sym("NEG")=>natv = @natv_neg)
|
||||
new_sym(">")=>natv = @natv_gt)
|
||||
new_sym("<")=>natv = @natv_lt)
|
||||
new_sym("PRINT")=>natv = @natv_print)
|
||||
|
Loading…
Reference in New Issue
Block a user