diff options
Diffstat (limited to 'lib/bc.lua')
-rw-r--r-- | lib/bc.lua | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -70,8 +70,9 @@ local function bcline(func, pc, prefix) | |||
70 | local ma, mb, mc = band(m, 7), band(m, 15*8), band(m, 15*128) | 70 | local ma, mb, mc = band(m, 7), band(m, 15*8), band(m, 15*128) |
71 | local a = band(shr(ins, 8), 0xff) | 71 | local a = band(shr(ins, 8), 0xff) |
72 | local oidx = 6*band(ins, 0xff) | 72 | local oidx = 6*band(ins, 0xff) |
73 | local op = sub(bcnames, oidx+1, oidx+6) | ||
73 | local s = format("%04d %s %-6s %3s ", | 74 | local s = format("%04d %s %-6s %3s ", |
74 | pc, prefix or " ", sub(bcnames, oidx+1, oidx+6), ma == 0 and "" or a) | 75 | pc, prefix or " ", op, ma == 0 and "" or a) |
75 | local d = shr(ins, 16) | 76 | local d = shr(ins, 16) |
76 | if mc == 13*128 then -- BCMjump | 77 | if mc == 13*128 then -- BCMjump |
77 | return format("%s=> %04d\n", s, pc+d-0x7fff) | 78 | return format("%s=> %04d\n", s, pc+d-0x7fff) |
@@ -87,6 +88,7 @@ local function bcline(func, pc, prefix) | |||
87 | kc = format(#kc > 40 and '"%.40s"~' or '"%s"', gsub(kc, "%c", ctlsub)) | 88 | kc = format(#kc > 40 and '"%.40s"~' or '"%s"', gsub(kc, "%c", ctlsub)) |
88 | elseif mc == 9*128 then -- BCMnum | 89 | elseif mc == 9*128 then -- BCMnum |
89 | kc = funck(func, d) | 90 | kc = funck(func, d) |
91 | if op == "TSETM " then kc = kc - 2^52 end | ||
90 | elseif mc == 12*128 then -- BCMfunc | 92 | elseif mc == 12*128 then -- BCMfunc |
91 | local fi = funcinfo(funck(func, -d-1)) | 93 | local fi = funcinfo(funck(func, -d-1)) |
92 | if fi.ffid then | 94 | if fi.ffid then |