Yeah, that's what's confusing me. Loading an 8194-byte file as a headered 8192-byte file ought to be the same as loading an 8192-byte file as an unheadered 8192-byte file, so I can only assume something else was going on too, like if you were mistakenly loading the 8192-byte file as a headered 8190-byte file; that'd be well under the overflow. The fact that the
sa value works differently between OPEN and LOAD caught me off guard too.
I checked the emulator's hostfs code, and the bank will increment after something is loaded to $BFFF, regardless of whether there's another byte after that or not. I wasn't able to confirm whether this happens in the Kernal ROM too or not (crawling through the source code is painful on a phone
), but I'd say it's always best to reset the RAM bank before attempting to read any of the loaded data, just to be safe in general.