User`s guide

read
Working with Negative Values
Writing a negative value causes the data written to be saturated
because
char is unsigned on the process or. Hence, a 0 (a NU LL) is
written instead. A wa rning resultsaswell,asthisexampleshows.
cc = ticcs;
ff = createobj(cc,'g_char'); % Where g_char is in the code.
write(ff,-100);
Warning: Underflow: Saturation was required to fit the data into
an addressable unit.
When you try to read the data you w rote, the character being read is
0 (NU LL) so there seems to be nothing returned by the
read function.
You can demonstrate this by the following code, after w riting a negative
valueasshowninthepreviousexample.
readnumeric(x)
ans =
0
read(x) % Reads the NULL character
ans = % Apparently nothing is returned.
double(read(x)) % Read the numeric equivalent of NULL.
ans = % Again, appears not to return a value.
mem = read(cc,address,'datatype',count) reads data from memory
on the process or referred to by
cc and dened by t he address,and
datatype in pu t argum ents. The data block b eing read begins a t the
memory location dened by
address. count determines the number of
values to be read. When you omit the
timeout optio n , timeout defaults
to the value specied by the
timeout property in cc.
mem = read(cc,address,'datatype') reads the memory location
dened by the
address input argument from the pro cessor memory
referred to by
cc. The data block being read begins at the memory
location dened by
address. When you omit the count option, count
7-117