system/src/newlib/_syscalls.c
/* fh, is a valid internal file handle.
 ptr, is a null terminated string.
 len, is the length in bytes to read.
 Returns the number of bytes *not* written. */
fh, is a valid internal file handle.
ptr, is a null terminated string.
len, is the length in bytes to read.
Returns the number of bytes *not* written.
fh is a valid internal file handle . ptr is a null terminated string . len is the length in bytes to read . Returns the number of bytes * not * written .
int
_swiread (int fh, char* ptr, int len)
{
  int block[3];
  block[0] = fh;
  block[1] = (int) ptr;
  block[2] = len;
  return checkerror (call_host (SEMIHOSTING_SYS_READ, block));
}
int _swiread ( int fh , char * ptr , int len ) { int block [ 3 ] ; block [ 0 ] = fh ; block [ 1 ] = ( int ) ptr ; block [ 2 ] = len ; return checkerror ( call_host ( SEMIHOSTING_SYS_READ , block ) ) ; }
fh, is a valid internal file handle.
fh is a valid internal file handle .