Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Mac Programmer Help > Re: What are th...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 5 Topic 3736 of 3882
Post > Topic >>

Re: What are the arguments of SYS_read in PPC assembly?

by Robert Spykerman <robert.spykerman@[EMAIL PROTECTED] > May 10, 2008 at 05:37 PM

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
 




 5 Posts in Topic:
What are the arguments of SYS_read in PPC assembly?
Borenard <meuldijk@[EM  2008-05-10 11:41:36 
Re: What are the arguments of SYS_read in PPC assembly?
Robert Spykerman <robe  2008-05-10 16:38:41 
Re: What are the arguments of SYS_read in PPC assembly?
Robert Spykerman <robe  2008-05-10 17:37:59 
Re: What are the arguments of SYS_read in PPC assembly?
Robert Spykerman <robe  2008-05-10 18:02:06 
Re: What are the arguments of SYS_read in PPC assembly?
Borenard <meuldijk@[EM  2008-05-14 06:31:25 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 11:00:27 CST 2008.