-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a better way of keeping track of file-handles
We used to assume that the address of the FCB entry which was used for opening a file would be used for later read/write operations, so we could cache our file-handles keyed on that address. I've just noticed that multi-file projects in turbo-pascal jump around with their FCB addresses. So on open/make file requests we store the original FCB address in FCB.AL[0,1] - which will be stable across operations, even if the FCB is in a different address. I guess we could use file-no instead, but for the moment this seems simple. If N files are opened from the same FCB address we'll be in trouble, but we'll cross that bridge later. This closes #127.
- Loading branch information
Showing
1 changed file
with
36 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters