/sys/lib/acid/port: mind upper bounds of fnbound

Fnbound's upper bound is exclusive.
This commit is contained in:
Jacob Moody 2023-08-08 04:17:28 +00:00
parent 4567ed7178
commit 41d1a883e5

View file

@ -517,7 +517,7 @@ defn asm(addr)
loop 1,_asmlines do {
print(fmt(addr, 'a'), " ", fmt(addr, 'A'));
print("\t", @addr++, "\n");
if bound != {} && addr > bound[1] then {
if bound != {} && addr >= bound[1] then {
lasmaddr = addr;
return {};
}
@ -627,7 +627,7 @@ defn next()
if pc >= bound[0] && pc < bound[1] then
return {};
while (pc < bound[0] || pc > bound[1]) && sp >= *SP do {
while (pc < bound[0] || pc >= bound[1]) && sp >= *SP do {
step();
pc = *PC;
}