Jump to content
IGNORED

Level 1, Level 2 and Level 3 I/O


dhe

Recommended Posts

I see these terms in a goodly number of messages that go by.

 

I look them up, and six months later they are gone again.

 

This time I doc'ed 'em for me, hope others find this information useful.

 

 

From: E/A PHM3055 - PG 301

Level 3 - File Level I/O. 

>00    Open 

>01    Close

>02    Read

>03    Write

>04    Restore/Rewind

>05    Load

>06    Save

>07    Delete

>08    Scratch Record

>09    Status

 

From: Tech Drive

Low Level I/O

Level 1 routines — the lowest level — allow direct sector read/write and disk formatting.

>10 Read/Write Individual Sector

>11 Format Disk

 

Level 2 routines - introduce the concept of a "file"; provide for file renaming and protection modification; allow file access by logical sector; and enable the programmer to control the number of disk buffers available.

>12 Modify File Protection

>13 Rename File

>14 Transfer Direct Input File

>15 Transfer Direct Output File

>16 Buffer Allocation

 

  • Like 3
  • Thanks 2
Link to comment
Share on other sites

This is true for the standard operating system in the TI 99/4A.

If you instead use the p-system, you have a similar arrangement.

 

The highest level file access involves declaing a file type (file of), where the type often is a record. Thus you define the data content of each record in the file. The filetype text is predefined and somewhat similar to DISPLAY 80 in the standard system. A bit more advanced, though.

You then use some Pascal keywords to acces the file, where all access is based on handling one record in the tile at a time, or a line of characters, if it's a text file.

The commands rewrite, restore and close are used to create/open and close a file.

Readln and writeln to read and write with text files.

Put, get and seek to handle files with custom definitions.

 

The next level maintains the file concept, but no longer cares about the content of the file. Thus any file definition will work in the same way.

The commands blockread and blockwrite are used to read/write one or more blocks in the file. A block in the p-system is 512 bytes. With these commands you can for example copy a file without knowing anything about the structure of the data in the file.

 

The lowest level allows direct access. Here you can send or receive characters on a serial interface, or read and write disk blocks anywhere on a disk, including accessing directories or other stuff outside the file's areas.

The commands unitclear, unitstatus, unitread and unitwrite are used for this access.

 

The advantage over the standard system is that in the p-system, all levels are accessible from Pascal level.

 

  • 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...