Chapter Five

FMS
ENTRY

The Device Vector Table for FMS is located at DFMSDH ($7CB). The address of this table is placed in the Device Handler Table by the FMS Initialization routine. When CIO needs to call an FMS function (Figure 1, control path 2), it will locate the address of the function via the table at DFMSDH. This table is the standard Atari Device Handler Vector Table. The six entries are for:

Open
Close
Get Byte
Put Byte
Status
Device Dependent (XIO) Commands
Each of the six FMS entry points starts with a subroutine call to the FMS SETUP routine. SETUP ($1164) prepares FMS parameters to deal with the particular task to he performed.

SETUP
 
Address —$1164  
 
Entry Registers —  
A = Possible ‘Put Data' data byte.
  X = IOCB number times 16.
Y = Don't Care.
Exit Registers —    
A = Unknown.
X = IOCB number times 16.
Y = Sector Buffer Index

Functions:

1) Initialize ERRNO to $9F. This value will be used in the FMS exit routines to form a FMS error number in the event of error.
2) Save the X Register in CURFCB. This value will be used as an index to the proper IOCB and the proper FCB for the current operation.
3) Save the value of the stack register as it was upon entry to FMS. This value will be used in the FMS exit routine.
4) Set up drive information values from the drive number contained in the zero page IOCB field ICDNOZ.
5) Allocate a sector buffer to the FCB if one is not already allocated.

Return to Table of Contents | Previous Chapter | Next Chapter