1
0
Fork 0
mirror of https://github.com/notwa/lips synced 2024-11-14 09:19:02 -08:00

fix and deprecate options.offset

This commit is contained in:
Connor Olding 2016-04-21 12:56:13 -07:00
parent 1266dfd18f
commit 515a5f7635

View file

@ -45,6 +45,17 @@ function lips.assemble(fn_or_asm, writer, options)
options = options or {}
local function main()
if options.offset then
if options.origin or options.base then
error('offset and origin/base options are mutually exclusive')
end
io.stderr:write('Warning: options.offset is deprecated.\n')
options.origin = options.offset
options.base = 0
else
options.base = options.base or 0x80000000
end
local fn = nil
local asm
if fn_or_asm:find('[\r\n]') then
@ -63,8 +74,6 @@ function lips.assemble(fn_or_asm, writer, options)
end
end
options.base = options.base or 0x80000000
if options.unsafe then
return main()
else