Fixed JR instruction.

This commit is contained in:
mooz 2018-11-19 23:15:46 +01:00
parent 8f5e37dd82
commit fa59803eeb
4 changed files with 4 additions and 4 deletions

View File

@ -127,7 +127,7 @@ set(L7801_HEADERS
${L65_HEADERS}
)
set(L7801_FILES ${L65_SOURCE_DIR}/scv.l7801)
set(L7801_FILES ${L65_SOURCE_DIR}/scv.l65)
set(L7801_SCRIPTS
${L65_SOURCE_DIR}/asm.lua

View File

@ -140,12 +140,12 @@ static int luaopen_l7801(lua_State *L)
}
#define SRC_LUA(name) { #name, 0, script_ ## name ## _lua, sizeof(script_ ## name ## _lua) }
#define SRC_L7801(name) { #name, 1, script_ ## name ## _l7801, sizeof(script_ ## name ## _l7801) }
#define SRC_L65(name) { #name, 1, script_ ## name ## _l65, sizeof(script_ ## name ## _l65) }
static struct script { const char *name; int t; const char *data; size_t sz; } embedded[] = {
SRC_LUA(dkjson),
SRC_LUA(l65cfg),
SRC_LUA(re),
SRC_L7801(scv),
SRC_L65(scv),
};
#undef SRC_LUA
#undef SRC_L7801

View File

View File

@ -245,7 +245,7 @@ M.jr = function(label)
if x < -32 or x > 0x32 then error("branch target out of range for " .. l .. ": " .. x)
elseif x >= 0 then
x = 0xc0 + x
return
return x
else
return x & 0xff
end