home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / amiga / programm / 19249 < prev    next >
Encoding:
Text File  |  1993-01-27  |  1.4 KB  |  33 lines

  1. Newsgroups: comp.sys.amiga.programmer
  2. Path: sparky!uunet!ukma!gatech!ncar!news.miami.edu!cybernet!pineal.math.fau.edu!spc
  3. From: spc@pineal.math.fau.edu (Sean 'Captain Napalm' Conner)
  4. Subject: Re: 680x0 register usage on Amiga?
  5. Message-ID: <1993Jan28.022243.28629@cybernet.cse.fau.edu>
  6. Sender: news@cybernet.cse.fau.edu
  7. Organization: Florida Atlantic University, but who cares?
  8. References: <1993Jan27.214002.23569@fcom.cc.utah.edu>
  9. Date: Thu, 28 Jan 1993 02:22:43 GMT
  10. Lines: 21
  11.  
  12. In article <1993Jan27.214002.23569@fcom.cc.utah.edu> val@news.ccutah.edu (Val Kartchner) writes:
  13. >
  14. >I usually program the Amiga in C.  When I want to get the maximum speed in
  15. >a core routine, I go to assembly language.  However, I'm not sure which
  16. >CPU registers are allocated and which are free for me to use when programming.
  17. >Here is the list as I understand it:
  18. >
  19.   You list is basically correct, only D0 is ALWAYS used as a return value
  20. (integer, pointer, float) (with the possible exception of a double, which
  21. may be returned in D0 and D1 (but check your compiler documentation)).
  22.  
  23.   Basically, A0,A1,D0, and D1 are scratch registers.  Any value to be
  24. returned will come back in D0.  All others sould be the same on exit as on
  25. entry.
  26.  
  27.   I know that all the libraries on the Amiga (except where noted) follow
  28. this convention.
  29.  
  30.   -spc (And you would think they would make it more visible than they do
  31.     the RKM's 8-)
  32.  
  33.