Return the current position for a file handle. If successful CF will be clear and the position will be returned. On error, the CF will be set, DX will be 0 and AX will be the error code. Also, the IO_ERROR value will be updated.
This function may also be used with the Text Writer when writing to a memory buffer to determine the current position in the buffer. The Text Writer must be assigned to the same output requested by FilePos or an error will be returned. Sequential character writing devices (like wdCONSOLE) always return 0 as their position.
Examples:
FilePos dx:ax, bx ; get 32-bit file position as register pair. FilePos [di], bx ; store 32-bit file position at [DS:DI] FilePos dx:ax, wdMEMORY ; return position in Text Writer buffer.