Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TASM 2.x / MASM 6.x Assembly Language - <b>function 23h (35) get file size, using fcbs</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Function 23h (35)        Get File Size, Using FCBs

    Returns the number of records in a file.

       On entry:      AH         23h
                      DS:DX      Pointer to an unopened FCB

       Returns:       AL         00h      If matching file found
                                 FFh      If no matching file found

  --------------------------------------------------------------------------

    This function reports the size of a file as a number of records
    (rounded up). The number of records is returned in the random-record
    field (offset 21h) of the FCB.

       Notes:         Before calling, you must set the record-size field
                      (offset 0Eh) in the FCB. To determine the size of
                      the file in bytes, set the record-size field to 1.

                      To determine a file's size using the new-style
                      handle functions, use LSEEK (function 42h) to seek
                      to the end of the file.

See Also: 42h

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson