remove jif instruction and add optional jump condition to jmp

M  standardbefehlssatz.lua
This commit is contained in:
HybridDog 2016-12-29 22:48:40 +01:00
parent 4b5455dcc6
commit 5d9ca414fe
1 changed files with 6 additions and 14 deletions

View File

@ -100,7 +100,12 @@ s = {
end,
jmp = function(params, faden)
if #params ~= 1 then
local pcnt = #params
if pcnt == 2 then
if not params[2] then
return true
end
elseif pcnt ~= 1 then
return false, WNOA
end
local p = params[1]
@ -119,19 +124,6 @@ s = {
return true
end,
jif = function(params, faden)
if #params ~= 2 then
return false, WNOA
end
if params[1] then
local jmpd,msg = s.jmp({params[2]}, faden)
if not jmpd then
return false, SE .. msg
end
end
return true
end,
call = function(params, faden)
if #params ~= 1 then
return false, WNOA