forked from mtcontrib/pdisc
remove jif instruction and add optional jump condition to jmp
M standardbefehlssatz.lua
This commit is contained in:
parent
4b5455dcc6
commit
5d9ca414fe
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user