home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!gdt!bsmail!ccsw
- From: ccsw@bristol.ac.uk (EthaStorm)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: including 68000 code in C
- Message-ID: <1992Aug26.100614.10949@bristol.ac.uk>
- Date: 26 Aug 92 10:06:14 GMT
- References: <1992Aug25.023906.8962@ccu.umanitoba.ca>
- Organization: University of Bristol, England
- Lines: 38
-
- In article <1992Aug25.023906.8962@ccu.umanitoba.ca> umfehr06@ccu.umanitoba.ca (John Fehr) writes:
- >Is there any way to simply insert 68000 code in your C programs? Say I want to
- >put some in a for loop or something.
- > John
- >
-
- Hiya John.
-
- I'm none too hot on C coding, but this might work (prepares himself to be
- flamed to HEL!!)
-
- In your assembler code, you would have something like
-
- XDEF Loop20
-
- Loop20:
- move.l #20,d0
- .............
- .............
-
- END
-
- In your C source, you'd have something like (this is the bit I'm not too sure
- about)
-
- extern void Loop20();
-
- Then, when you link your code together you'd do (if you were using BLink)
-
- blink C-Code.o Asm-Code.o to myprog
-
- I think this should work, but as I said I am NOT 'au-fait' with C code or it's
- compilers!!!
-
-
- Hope this helps,
-
- Steff *8)
-