|
Post by stiggity on Jul 3, 2022 21:56:47 GMT
I use channel 15 for all of my dos reads. I've run into a snag... and its haunting me over and over. If I attempt to simply "close15" which _was_ open.. i get the error "illegal device number"? I can loop, forx=1to14:closex:next , and even if 1-4 aren't open, there all closed. the moment I perform a "close15" i get an error. I dont know whats causing this? Yes, 15 is a heavily used channel, and a good portion of the program utilizes it strenuously..
_Thanks!
|
|
|
Post by gsteemso on Jul 26, 2022 1:37:00 GMT
The only thing I can think of is, when you tell BASIC to CLOSE {file-number}, it uses {file-number} for an internal table lookup to get the unit # (bus address), drive # (usually 0), etc.
Therefore, if it's suddenly whining about the device number (bus address) being wrong, there may be something corrupting the Kernal's "Logical File Number" table in RAM, where all this stuff is recorded.
That, or something is mucking around with whatever Kernal routine is called upon to sanity-check those bus addresses.
As one remote possibility: are you doing anything that might affect the MMU bank configuration? Remember that the "shortcut" configuration addresses at $ff0x (I think? it's been a while) are always present even when I/O space, and thus the actual MMU registers, are not.
|
|
|
Post by Zippy Zapp on Aug 2, 2022 18:54:22 GMT
What does your OPEN statement look like?
As stated above you open with file number, device and channel. So if I am formatting a disk:
OPEN 1,8,15 PRINT #1, "N0:DISKNAME,ID" CLOSE 1
Of course, this can be shortened. You have to CLOSE the same file number you OPEN. Most of the examples you see all use 15 as file and 15 as channel. I think that can be confusing for some so I usually don't use the same number for file as channel. OPEN 1,8,15,"N0:DISKNAME,ID":CLOSE1
|
|
|
Post by stiggity on Aug 3, 2022 2:25:03 GMT
Zap: thank you for clearing that up. I posted in the BASIC programming area, due to it being a BASIC issue.. or so i thought it was. Everything Zen!
|
|