User`s guide
 BDOS FUNCTION 99: TRUNCATE FILE
 Entry Parameters:
 Registers C: 63H
 DE: FCB Address
 Returned Value:
 Registers A: Directory Code
 H: Extended or Physical Error
 The Truncate File function sets the last record of a file to the random record
 number contained in the referenced FCB. The calling program passes the address of
 the FCB in register pair DE, with byte 0 of the FCB specifying the drive, bytes 1
 through 11 specifying the filename and filetype, and bytes 33 through 35, rO, rl, and
 r2, specifying the last record number of the file. The last record number is a 24 bit
 value, stored with the least significant byte first, rO, the middle byte next, rl, and the
 high byte last, r2. This value can range from 0 to 262,143, which corresponds to a
 maximum value of 3 in byte r2.
 If the file specified by the referenced FCB is password protected, the correct pass-
 word must be placed in the first eight bytes of the current DMA buffer, or have been
 previously established as the default password (see Function 106).
 Function 99 requires that the file specified by the FCB not be open, particularly if
 the file has been written to. In addition, any activated FCBs naming the file are not
 valid after Function 99 is called. Close your file before calling Function 99, and then
 reopen it after the call to continue processing on the file.
3-76
BDOS Function Calls  CP/M 3 Programmers Guide










