TIP: Click on subject to list as thread! ANSI
echo: cis.os9.68000.osk
to: Bob van der Poel 76510,2203 (X)
from: Bob Santy 76417,714
date: 1992-09-01 06:48:19
subject: #16358-#Combining C and asm

#: 16361 S12/OS9/68000 (OSK)
    01-Sep-92  06:48:19
Sb: #16358-#Combining C and asm
Fm: Bob Santy 76417,714
To: Bob van der Poel 76510,2203 (X)

Bob:

Sorry if you think this is a kludge, but it works!  Try a coding style like
this:

 #asm
 FOO set 12345
 #endasm

 extern int FOO; /* if C source will need the definition */

 cfunction()
 {
     int x = FOO;

 #asm
  move.l #FOO,d0
 #endasm

     printf( "%d\n", x );
 }

The example shows a definition (once in assembler) that can be seen by asm AND
C.  Granted it isn't terribly clean.  Hope this helps.

Bob

There is 1 Reply.

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™.