Enhancement to BTF - B3 Writing binary data.

From: Michael McNamara (mac@surefirev.com)
Date: Tue Apr 07 1998 - 10:22:44 PDT


Adam Krolnik writes:
>
>
> Good morning:
>
>
> Just so this doesn't get lost, I would like to propose a method to
> write binary data out to a file. By binary data, I mean writing the
> actual value of the data to the file instead of the value converted
> to an ASCII representation.
>
> Propose two methods:
>
> 1. Add a new format specification (section 13.1.1.2) '%x' that
> represents "Write in binary value (which may not have an ASCII
> representation.)"
X-Lines: 30
Content-Type: text/plain; charset="us-ascii"
Content-Length: 786
X-Status: $$$$
X-UID: 0000000369
Status: RO

        Note that %x is already taken (and is a synonym for %h)

        Perhaps %i ? ( justification: when one uses ftp to transfer in binary mode,
it says:
ftp> bin
200 Type set to I.
)
>
> 2. Add a new file I/O task $fwritex. This task writes its arguments
> binary value to the specified file. [ Note, $fdisplay is not
> considered since the usefulness of a newline character within
> binary data is considered out of place.]

        Perhaps $fwritei, as %x is already in use, and we suggect %i
above.

>
> Maybe both should be included to be consistent with the other tasks
> and format specifications.
>
>

        Note that the spec for reading binary values only reads in the
0/1 value, and not x and or z values.
        
        Is this ok?

        If so, then should $fwrite("%x",32'x); transfer 0?

        -mac



This archive was generated by hypermail 2.1.4 : Mon Jul 08 2002 - 12:52:47 PDT and
sponsored by Boyd Technology, Inc.