home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / sys / mac / programm / 22026 < prev    next >
Encoding:
Internet Message Format  |  1993-01-24  |  1.5 KB

  1. Path: sparky!uunet!usc!news.service.uci.edu!orion.oac.uci.edu!eapg070
  2. From: eapg070@orion.oac.uci.edu (Caroll Elke Pohl)
  3. Subject: help calling assembly from C
  4. Nntp-Posting-Host: orion.oac.uci.edu
  5. Message-ID: <2B6198C1.22487@news.service.uci.edu>
  6. Summary: how?
  7. Newsgroups: comp.sys.mac.programmer
  8. Organization: University of California, Irvine
  9. Keywords: assembly,C
  10. Lines: 31
  11. Date: 23 Jan 93 19:13:05 GMT
  12. Distribution: usa
  13.  
  14. greetings mac programmers!
  15.  
  16. i wonder if someone out there can assist me with a small problem.
  17. i'm using MPW (3.2) and want to call an assembly language subroutine
  18. i wrote from a C program _however_ i want to pass the parameters in
  19. A0 and A1 instead of using the stack (much like certain memory
  20. manager traps). how can i get the C compiler to recognize this fact?
  21.  
  22. on a related matter, can anyone recommend a good book on writing
  23. assembly programs on the mac.
  24. a perfect book would include:
  25. 1) writing MC68000 code in general
  26. 2) using mac traps, pascal and C stack frames and the like
  27. 3) using the MPW assembler. things like:
  28.    a) special syntax
  29.    b) all the assembler directives and keywords
  30.    c) how to do more complicated things like segmenting
  31.         and external routines.
  32.  
  33. any recommendations would be much appreciated.
  34. please e-mail.
  35.  
  36. -caroll
  37.  
  38. *********************************************
  39.                       ) """ (
  40.                        (Q Q)
  41.    Don't spook        (  |  )
  42.     the horse!         \ A /
  43.                        (___)
  44. *********************************************
  45.