home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / amiga / programm / 12697 < prev    next >
Encoding:
Text File  |  1992-08-26  |  1.2 KB  |  49 lines

  1. Path: sparky!uunet!mcsun!uknet!gdt!bsmail!ccsw
  2. From: ccsw@bristol.ac.uk (EthaStorm)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: including 68000 code in C
  5. Message-ID: <1992Aug26.100614.10949@bristol.ac.uk>
  6. Date: 26 Aug 92 10:06:14 GMT
  7. References: <1992Aug25.023906.8962@ccu.umanitoba.ca>
  8. Organization: University of Bristol, England
  9. Lines: 38
  10.  
  11. In article <1992Aug25.023906.8962@ccu.umanitoba.ca> umfehr06@ccu.umanitoba.ca (John Fehr) writes:
  12. >Is there any way to simply insert 68000 code in your C programs?  Say I want to
  13. >put some in a for loop or something.
  14. >    John
  15. >
  16.  
  17. Hiya John.
  18.  
  19.    I'm none too hot on C coding, but this might work (prepares himself to be
  20. flamed to HEL!!)
  21.  
  22. In your assembler code, you would have something like
  23.  
  24.          XDEF Loop20
  25.  
  26. Loop20:
  27.      move.l #20,d0
  28.      .............
  29.      .............
  30.  
  31.        END
  32.  
  33. In your C source, you'd have something like (this is the bit I'm not too sure 
  34. about)
  35.  
  36.     extern void Loop20();
  37.  
  38. Then, when you link your code together you'd do (if you were using BLink)
  39.  
  40.     blink  C-Code.o Asm-Code.o to myprog
  41.  
  42. I think this should work, but as I said I am NOT 'au-fait' with C code or it's
  43. compilers!!!
  44.  
  45.  
  46.   Hope this helps,
  47.  
  48.     Steff  *8)
  49.