4

Does anyone know for sure why MS BASICs on the 6502 compared only the page number when deciding where to look for line numbers on branches? IIRC, it would only "start looking from here" if the target was at least a page higher.

This seems odd, as it means you cannot THEN back to your own line and get the quick lookup. This is common for small loops, which would seem like a good target for this code. Any short forward branch will likely fail as well.

I guess you save one compare, but as the line lookup is going to do pretty much exactly that 2-byte compare on every line, it seems that there's really no downside (it's like adding one line to the code).

So am I missing something obvious here?

Omar and Lorraine
  • 38,883
  • 14
  • 134
  • 274
Maury Markowitz
  • 19,803
  • 1
  • 47
  • 138

0 Answers0