@BWRITE[handle,offset,filehandle,fileoffset,length] : Write from a binary buffer to a file.


handle - a binary handle from @BALLOC


offset - the byte offset in the buffer (decimal or hex)


filehandle - a file handle opened for writing (from @FILEOPEN)


fileoffset - the write offset (from the current file position) (decimal or hex)


length - the number of bytes to write (decimal or hex)


@BWRITE returns the number of bytes written




set fhandle=%@fileopen[filename,w]

set bhandle=%@balloc[128]

set value=%@bwrite[%bhandle,0,%fhandle,0,32]