Ah, I see the bug, and it's related to a pointer left behind during banking. I just have to track it down now.
Observe the screen shot. I've run the VM several times with this one redcode program that's just long enough to have part of it on one side of a bank, and part on the next bank, for about ten epochs, as it slowly crawls across the boundary. It's a great test case actually.
The most interesting suspects died at locations 4500, 6009, and 7500. I've seen a number of these die on location 6000.
As you might be able to tell, I have 1500 cells per bank.
VERY suspicious. The process dies on the border, probably because it's reaching ACROSS that border to the other end of the code. It jumps back and forth, you see, copying itself forward.
So, something is getting hosed.
I can "dissassemble" core memory, and find out which instructions are at those exact addresses (1513, 3010, 4500, 6009, and 7500):
1513 1513 is an invalid address.... actually I think I see the problem. There is supposed to be valid code at 1513. But instead, the program copy routine "skipped" seven memory locations when copying its program... from 1512 thru 1518.
And actually, it looks like the MOST RECENT copy was written to location 1522+. So why is control jumping to 1513?
3010 3010 is super invalid... but looking backwards slightly, I see that location 2996-2999 is only a fragment of the full program, which is then missing 6 instructions, and then has the final 2 instructions at 3000-3001, but the data appears wrong in 3002-3003.
And so on.
With the 4500 and 7500 entries, the data simply *ends* right at those points, as if there was something stopping the MOV operation.
So I suspect the MOV operation is relying on a pointer, when it shouldn't.
![2980-3029.png](//www.commanderx16.com/forum/applications/core/interface/js/spacer.png)