gtpc2m85 | C/C++ Language Support User's Guide |
This function does the following:
- Converts a 4-byte file address to an 8-byte file address in 4x4 format
- Converts an 8-byte file address in 4x4 format to a 4-byte file
address.
- Note:
- 4x4 format is an 8-byte file address with a high-order 4-byte indicator (that
contains zeros) and a low-order 4 bytes that contains a 4-byte FARF3, FARF4,
or FARF5 address.
Format
#include <tpfio.h>
int tpf_fa4x4c(TPF_FACONV action, unsigned long *fa4,
TPF_FA8 *fa8);
- action
- One of the following action types:
- FACONV_4TO8
- Converts a 4-byte file address to an 8-byte file address in 4x4
format.
- FACONV_8TO4
- Converts an 8-byte file address in 4x4 format to a 4-byte file
address.
- fa4
- A pointer to a 4-byte file address. This parameter is the input if
the action is FACONV_4TO8. This parameter is the output if the action
is FACONV_8TO4.
- fa8
- A pointer to an 8-byte file address in 4x4 format. This parameter
is the input if the action is FACONV_8TO4. This parameter is the output
if the action is FACONV_4TO8.
Normal Return
A nonzero value.
Error Return
An integer value of zero. This can occur if FACONV_8TO4 is specified
and the input 8-byte file address is not in 4x4 format, or if the specified
action is not valid.
Programming Considerations
None.
Examples
The following example converts a 4-byte file address to an 8-byte file
address and converts an 8-byte file address to a 4-byte file address.
#include <tpfio.h>
·
·
·
unsigned long fa4;
TPF_FA8 fa8;
·
·
·
tpf_fa4x4c(FACONV_4TO8, &fa4, &fa8); /* convert 4-byte fa to 8-byte */
·
·
·
tpf_fa4x4c(FACONV_8TO4, &fa4, &fa8); /* convert 8-byte fa to 4-byte */
Related Information
None.