TIP: Click on subject to list as thread! ANSI
echo: cis.os9.68000.osk
to: all
from: Bob van der Poel 76510,2203
date: 1992-08-31 23:40:58
subject: #Combining C and asm

#: 16358 S12/OS9/68000 (OSK)
    31-Aug-92  23:40:58
Sb: #Combining C and asm
Fm: Bob van der Poel 76510,2203
To: all

Is there any way to share C-language #defines with assembler routines? What I
want to do is something like this... First off, in a C file I define something:

 #define FOO 12345

Now, in a #asm section I want to use the contant FOO like this:

 #asm
 asmfunc:
  move.l #FOO,d0
  ....
 #endasm

Of course, what happens now is that cpp stops working when it hits #asm
sections and FOO is assembled as an external reference which never gets
resolved. Anyone with some brilliant thoughts?

There are 2 Replies.

SOURCE: compuserve via textfiles.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.