mirror of https://github.com/g012/l65.git
Fixed JR instruction.
This commit is contained in:
parent
8f5e37dd82
commit
fa59803eeb
|
@ -127,7 +127,7 @@ set(L7801_HEADERS
|
||||||
${L65_HEADERS}
|
${L65_HEADERS}
|
||||||
)
|
)
|
||||||
|
|
||||||
set(L7801_FILES ${L65_SOURCE_DIR}/scv.l7801)
|
set(L7801_FILES ${L65_SOURCE_DIR}/scv.l65)
|
||||||
|
|
||||||
set(L7801_SCRIPTS
|
set(L7801_SCRIPTS
|
||||||
${L65_SOURCE_DIR}/asm.lua
|
${L65_SOURCE_DIR}/asm.lua
|
||||||
|
|
4
l7801.c
4
l7801.c
|
@ -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_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[] = {
|
static struct script { const char *name; int t; const char *data; size_t sz; } embedded[] = {
|
||||||
SRC_LUA(dkjson),
|
SRC_LUA(dkjson),
|
||||||
SRC_LUA(l65cfg),
|
SRC_LUA(l65cfg),
|
||||||
SRC_LUA(re),
|
SRC_LUA(re),
|
||||||
SRC_L7801(scv),
|
SRC_L65(scv),
|
||||||
};
|
};
|
||||||
#undef SRC_LUA
|
#undef SRC_LUA
|
||||||
#undef SRC_L7801
|
#undef SRC_L7801
|
||||||
|
|
|
@ -245,7 +245,7 @@ M.jr = function(label)
|
||||||
if x < -32 or x > 0x32 then error("branch target out of range for " .. l .. ": " .. x)
|
if x < -32 or x > 0x32 then error("branch target out of range for " .. l .. ": " .. x)
|
||||||
elseif x >= 0 then
|
elseif x >= 0 then
|
||||||
x = 0xc0 + x
|
x = 0xc0 + x
|
||||||
return
|
return x
|
||||||
else
|
else
|
||||||
return x & 0xff
|
return x & 0xff
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue