Guardian Procedure Calls Reference Manual
WRITE[X] Procedures
Summary
Syntax for C Programmers
Syntax for TAL Programmers
Parameters
Condition Code Settings
Considerations
Disk File Considerations
Interprocess Communication Considerations
Considerations for WRITEX Only
Errors for WRITE[X]
Errors for WRITEX Only
Example
Related Programming Manuals
Summary
The WRITE[X] procedures write data from an array in the application program to an open file (see
Considerations (page 1492)).
The WRITE procedure is intended for use with 16-bit addresses, while the WRITEX procedure is
intended for use with 32-bit extended addresses. The data buffer for WRITEX can be either in the
caller's stack segment or any extended data segment.
NOTE: The WRITE[X] procedures perform the same operation as the FILE_WRITE64_ Procedure
(page 524), which is recommended for new code.
Key differences in FILE_WRITE64_ are:
• The pointer and tag parameters are 64 bits wide.
• The write-count parameter is 32 bits wide.
• The procedure returns an error code value rather than a condition code, simplifying
error-handling code.
Syntax for C Programmers
#include <cextdecs(WRITE)>
_cc_status WRITE ( short filenum
,short _near *buffer
,unsigned short write-count
,[ unsigned short _near *count-written ]
,[ __int32_t tag ] );
#include <cextdecs(WRITEX)>
_cc_status WRITEX ( short filenum
,const char _far *buffer
,unsigned short write-count
,[ unsigned short _far *count-written ]
,[ __int32_t tag ] );
1490 Guardian Procedure Calls (W-Z)