<html>
<body>
There are billions ways, but the best C way is probably<br><br>
#define IntVar<x-tab> </x-tab>u.intvar<br>
#define CharVar<x-tab> </x-tab>u.charvar<br><br>
union {<br>
int intvar;<br>
char charvar;<br>
} u;<br><br>
and you can use the define's to hide union references.<br><br>
****<br>
Or you can define your variables in an asm file:<br><br>
extern int intvar;<br>
extern char charvar;<br><br>
in a .s file:<br><br>
_intvar::<br>
_charvar::<br>
<x-tab> </x-tab>.blkb
2<br>
<x-tab> </x-tab>.area
idata(rom)<br>
<x-tab> </x-tab>.word
1234<br><br>
At 02:35 AM 3/14/2008, Bengt Ragnemalm wrote:<br>
<blockquote type=cite class=cite cite=""><font size=2>Is it possible to
set two variables with different data types to point to the same adress?
This is just a “hack” so nasty tricks are ok.<br>
</font></blockquote>
<x-sigsep><p></x-sigsep>
// richard (This email is for mailing lists. To reach me directly, please
use richard at imagecraft.com)</body>
</html>