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