The boot record (sector 1) contains information about the DOS.SYS file. When DOS.SYS is opened for output, FMS will write all of FMS out to the disk as part of the open process. It will also modify sector zero to indicate that a DOS. SYS file exists and to indicate where on the disk it Is. If DOS. SYS is ever Deleted or Renamed (to something not DOS.SYS), then the boot record must be modified to indicate that a DOS.SYS file does not exist. If a file is ever renamed to DOS.SYS, then the boot record is modified to point to the new DOS. SYS file.
The WRTDOS routine ($120A) is used to write a new DOS.SYS file to disk and to update the boot record to indicate that a DOS. SYS file exists.
1) The sector number which is contained n the FCB sector number link field, FCRLSN, is used as the first sector of the DOS.SYS file. This sector number is placed in the boot record area in page seven along with the other necessary information.WD0
2) Sectors one, two, and three are written from the memory area from $700 through $87F.
3) The FMS is written to the DOS. SYS via the WD0 routine.
4) Exit is via GREAT.
The WD0 routine ($1267) is used to write the FMS to the DOS.SYS file.
1) The address contained in DFLADR is moved to the zero page buffer pointer, ZBUFP.DELDOS
2) The FMS is copied from its area in memory to the file sector buffer in 125 byte chunks.
3) The buffers are written to disk by the WRTNXS routine.
4) The process continues until the entire FMS area has been written.
5) The caller is returned to via the RTS instruction.
The DELDOS routine ($1219) is used to modify the boot record to indicate that DOS. SYS does not exist.
1) The DFSFLG is set to zero to indicate that DOS. SYS does not exist.
2) The area from $700 to $87F is written to sectors one, two, and three.
3) The caller is returned to via the RTS instruction.
Return to Table of Contents | Previous Chapter | Next Chapter