home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / sys / amiga / programm / 11631 < prev    next >
Encoding:
Internet Message Format  |  1992-07-25  |  1.1 KB

  1. Path: sparky!uunet!decwrl!contessa!mwm
  2. From: mwm@contessa.palo-alto.ca.us (Mike Meyer)
  3. Subject: Re: Registers from C
  4. Newsgroups: comp.sys.amiga.programmer
  5. Distribution: usa
  6. References: <14q2h5INNoee@darkstar.UCSC.EDU>
  7. X-NewsSoftware: Amiga Yarn 2.0, 1992/06/25 01:41:36
  8. Keywords: 
  9. Summary: 
  10. Message-ID: <mwm.1b4h@contessa.palo-alto.ca.us>
  11. Date: 25 Jul 92 04:51:17 PST
  12. Organization: Missionaria Phonibalonica
  13. Lines: 19
  14.  
  15. In <14q2h5INNoee@darkstar.UCSC.EDU>, torp@cats.ucsc.edu (Judith Lynn Nakamura) wrote:
  16. > To quote the 2.0 RKM:Includes & Autodocs page 647 NP_Arguments entry:
  17. >     "cstring of arguments - passed with str in a0, length in d0."
  18. > Ok.  So, assuming the function is CreateNewProc()-ing correctly, how
  19. > do I pull these arguments out of the registers from C.  I realize this
  20. > is a probably a very simple thing to do, but I would really appreciate
  21. > help from anyone with some experience.
  22.  
  23. Depends on your C compiler. With SAS, you can do:
  24.  
  25. __asm myfunc(register __a0 string, register __d0 length)
  26.  
  27. and the compiler will assign those registers to the variables. You can
  28. also use getreg(), but that's almost certainly slower.
  29.  
  30.     <mike
  31.