mirror of
https://github.com/notwa/mm
synced 2025-02-05 13:23:23 -08:00
fix some broken lips features
This commit is contained in:
parent
b5198842ad
commit
330cbf1485
2 changed files with 4 additions and 3 deletions
|
@ -85,7 +85,8 @@ function Dumper:add_directive(fn, line, name, a, b)
|
||||||
self:add_bytes(line, b1, b0)
|
self:add_bytes(line, b1, b0)
|
||||||
elseif name == 'WORD' then
|
elseif name == 'WORD' then
|
||||||
if type(a) == 'string' then
|
if type(a) == 'string' then
|
||||||
local t = {line=line, kind='label', name=a}
|
t.kind = 'label'
|
||||||
|
t.name = a
|
||||||
insert(self.commands, t)
|
insert(self.commands, t)
|
||||||
self:advance(4)
|
self:advance(4)
|
||||||
else
|
else
|
||||||
|
@ -270,7 +271,7 @@ function Dumper:dump()
|
||||||
self.pos = self.pos + t.skip
|
self.pos = self.pos + t.skip
|
||||||
end
|
end
|
||||||
elseif t.kind == 'label' then
|
elseif t.kind == 'label' then
|
||||||
local val = self:desym{'LABELSYM', t.name}
|
local val = self:desym{tt='LABELSYM', tok=t.name}
|
||||||
val = (val % 0x80000000) + 0x80000000
|
val = (val % 0x80000000) + 0x80000000
|
||||||
local b0 = bitrange(val, 0, 7)
|
local b0 = bitrange(val, 0, 7)
|
||||||
local b1 = bitrange(val, 8, 15)
|
local b1 = bitrange(val, 8, 15)
|
||||||
|
|
|
@ -29,7 +29,7 @@ function Parser:directive()
|
||||||
if self:is_EOL() and name == 'ALIGN' then
|
if self:is_EOL() and name == 'ALIGN' then
|
||||||
add(name, 0)
|
add(name, 0)
|
||||||
else
|
else
|
||||||
local size = self:number()
|
local size = self:number().tok
|
||||||
if self:is_EOL() then
|
if self:is_EOL() then
|
||||||
add(name, size)
|
add(name, size)
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue