Jump to content
IGNORED

Level-2 I/O does not work if file is opened with Level-3


Kchula-Rrit

Recommended Posts

In my ramblings with Level-2 and Level-3 I/O I found that, if a file is opened for Level-3 I/O, a Level-2 I/O call appears to fail.

 

In a test program I open a DF128 file and read the contents.  At EOF I close the file.

 

The test program uses a copy of Tom Bentley's "TCIO" library that I disassembled and modified.  I added two functions, 'tstat' and 'tstats'  'Tstat' uses the Level-3 STATUS (Op-code 9) command to get information about the test file.  'Tstats' uses the Level-2 Get-File-Info (0x14) command to get information.  I was going to merge the two so I can get info to load a PAB for Level-3 access.

 

Before and after each Level-3 TCIO call I use 'tstat' and 'tstats' to see how the information changes as the program performs the various library calls:

  1. Use 'tstat' to get file status (Level-3 Op-code 9).  Print results and info.
  2. Use 'tstats' to get file information (Level-2 Op-code 0x14)  Print results and info.
  3. Do a Level-3 operation.
  4. Get file status (Level-3 Op-code 9).  Print results and info. [Repeat Step 1.]
  5. Get file status (Level-2 Op-code 0x14).  Print results and info. [Repeat Step 2.]

 

I found that Level-2 'Get File Info' command appears to fail with Error Code 7 (file error) if the file is opened for Level-3 access.  After closing the file the Level-2 commands once again work.

 

My merged file-info function will have to skip calling the Level-2 call if the file is open, but I do not see that being a problem.

 

Also, I hate to say that my copy of Thierry Nouspikel's TI99-Pages has the 0x14 command returning the record-count at Result-pointer+8 as a byte value.  Fred Kaal says this is a word value, and my experiments seem to indicate the record-count is a word.  Both sites have been immensely useful for my experiments.

 

K-R.

 

  • Like 2
Link to comment
Share on other sites

6 hours ago, Kchula-Rrit said:

Also, I hate to say that my copy of Thierry Nouspikel's TI99-Pages has the 0x14 command returning the record-count at Result-pointer+8 as a byte value.  Fred Kaal says this is a word value, and my experiments seem to indicate the record-count is a word.

 

Yeah—the TI document, GPL Interface Specifications for the 99/4 Disk Peripheral, indeed, has it as a word. As you say, Thierry’s site is a wealth of information for our TI-99/4A, but does have errors here and there. Others and I have pointed them out over the years. Most (all?) of my discoveries could be characterized as my tripping over them. ? 

 

Thierry has it wrong for subprogram >015, as well.

 

He makes a similar error with every instance of the transfer block’s error-return location, >8350 (probably a copy/paste error), which is a byte, not a word as he indicates.

 

...lee

  • Like 1
Link to comment
Share on other sites

On 7/4/2020 at 6:29 AM, Lee Stewart said:

 

Yeah—the TI document, GPL Interface Specifications for the 99/4 Disk Peripheral, indeed, has it as a word. As you say, Thierry’s site is a wealth of information for our TI-99/4A, but does have errors here and there. Others and I have pointed them out over the years. Most (all?) of my discoveries could be characterized as my tripping over them. ? 

 

...

 

...lee

Good to know I'm not the only one that 'trips' over these things...

 

The GPL Interface Spec is probably the one document I haven't read until I'm bleary-eyed.  I figured, I'm doing assembly, not GPL, so I never thought to look at it.

 

K-R.

 

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...