mirror of
https://github.com/g012/l65.git
synced 2024-12-31 14:30:53 +00:00
Fixed JR instruction.
This commit is contained in:
parent
8f5e37dd82
commit
fa59803eeb
@ -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
|
||||
|
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_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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user