PATCH : H8300 Simulator File I/O Implementation
Tue Dec 31 02:57:00 GMT 2002
> Based on some suggestions from Kazu Hirata, I have made some
> changes. The patch to binutils has already been applied so I am
> not attaching the same. The file newlib_patch.txt contains the
> changes required in newlib/libc/sys/h8300hms/syscalls.c and
> newlib/libc/sys/h8300hms/Makefile.in. the file
> simulator_patch.txt contains the changes required in
Thank you for the updates. It would be nice if you could include a
one-line comment describing a prototype in each .S file like
; int _close (int file);
For one thing, doing so is sort of a convention for assembly functions
to be called by C. Another reason is that H8 port uses registers for
argument passing, making it difficult to see exactly how many
arguments are being passed. This may be good for you, too, as _lseek
requires two zero extensions, and you might want to remind yourself
which arguments are of int.
One nit picking: Do you still need the following in syscalls.c?
+ #include "sys/syscall.h"
Meanwhile, I'll try your patches.
More information about the Newlib