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

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

Bob & Kev: Thanks for the help. I'd not thought of using a variable...of course
this will work. But, unfortunately, it's not the best for my application. I
have a table of about 200 contants. Copying the all to variables would take a
fair amount of memory, plus it'd probably slow things down a bit. (Which brings
up a sore point with C...if you have a long list of order contants you have to
#define each of them...#define ONE 1;#define TWO 2;etc. A shortcut for that
would be nice. I wonder, maybe enum would help?)

On the other hand...if I take a hint from Kevin's reply... I only need a few of
the 200 or so constants in my asm stuff. So I guess I could just do this:

 

 #define FOO 12345

 

 int fooint=FOO;
 #asm
 foofunc:
  move.l fooint(a6),d0
  ...
 #endasm

This way I'd just have to have duplicates for the 2 or 3 constants I _really_
need to play assember with. Thanks to all.

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