On May 11, 4:41 am, Borenard <meuld...@[EMAIL PROTECTED]
> wrote:
> Hi,
> I'd like to know what the arguments of the system call SYS_read are,
> in PPC assembly, to read in some typed characters from the terminal.
> r0=3 to call sys_read
> r3=1 for stdin
> Where does the pointer go that indicates where the typed string is
> stored?
> For sys_write this is r4 and r5, but I don't seem to get chars back
> if
> I use r4 and r5 with sys_read.
> Regards,
> Borenard
To add on, if you're getting a good return value in 3, but your buffer
(ie what you passed in 4) is not being appropriately written to, then /
headscratch...
Can only suggest:
1. Kernel source digging
2. Have a look at at the c stardard library source perhaps.
3. Hmm... Your buffer is not in your code (.text = read only) section
is it?
4. Trial and error (try the other registers, I'd start 4-10)
I don't have an OSX ppc at the moment so am not in position to try.
Tell me how you get on. Be real interested to find out what you
discover.
Robert Spykerman


|