User`s manual
This program asks for record numbers when retrieving records. It won't let
you retrieve from beyond the end of the file, and if you try to write beyond the
end it forces you to write on the next higher record.
A more advanced version than this would keep track of the items by
"keys", to index the records. For example, you would probably want to search
for a record by name, or print out labels by zip code. For this you would need a
separate list of keys and record numbers, probably stored in sequential files.
When working with a new relative file that will soon be very large, it will
save much time to create a record at the projected end of the file. In other
words, if you expect the file to be 1000 records long, create a record# 1000 as
soon as the file is created. This will force the DOS to create all intermediate
records, makinglater use of those records much faster.
EXAMPLEOF CREATING LARGE FILE:
OPEN 1,8, IS: OPEN 2, 8, 2, "REL,L,"+ CHR$(60)
PRINT# I, "P" CHR$(2) CHR$(O)CHR$(4) CHR$(I)
PRINT# 2, "END"
CLOSE 2: CLOSE I
8. PROGRAMMING THE DISK CONTROLLER
The expert programmer can actually design routines that reside and
operate on the disk controller. DOS routines can be added that come from the
diskette. Routines can be added much the same way as the DOS Support
Program is "wedged" into your memory.
BLOCK.EXECUTE
This command will load a block from the diskette containing a machine
language routine, and begin executing it at location 0 in the buffer until aRTS
(ReTurn from Subroutine) command is encountered.
FORMAT FOR BLOCK-EXECUTE:
PRINT# file#, "BLOCK-EXECUTE:" channel, drive, track, block
or abbreviated as
PRINT# file#, "BLOCK-EXECUTE:" channel, drive, track, block
MEMORY.READ
There is 16K of ROM in the disk drive as well as 2K of RAM.You can get
direct access to these, or to the buffers that the DOS has set up in the RAM, by
using the MEMORY commands. MEMORY-READ allows you to select which
byte to read, through the error channel.
37