Hi Daniel/Lundin,
Thanks for the replys.
Let me clarify a bit:
Daniel - In the file that includes the calling of the bits, I included what
you suggested:
#include "sound.h"
time_TimeSTR _Time_Sound;
With the header file (sound.h) as follows, the compiler is giving me an error
that says I need a ; at the end of time_TimeSTR _Time_Sound; (which is already there).
The header file (sound.h) is:
#pragma DATA_SEG __SHORT_SEG MY_ZEROPAGE // force it to be on zero page
#ifndef time_SOUND_HEADER
#define time_SOUND_HEADER
typedef union {
byte Byte;
struct {
byte NC1 :1;
byte NC2 :1;
byte time1Sound :1;
byte time2Sound :1;
byte time3Sound :1;
byte time4Sound :1;
byte time5Sound :1;
byte time6Sound :1;
} Bits;
} time_SoundSTR;
extern time_SoundSTR _time_Sound;
#define time_Sound _time_Sound.Byte
#define NC1 _time_Sound.Bits.NC1
#define NC2 _time_Sound.Bits.NC2
#define time1Sound _time_Sound.Bits.time1Sound
#define time2Sound _time_Sound.Bits.time2Sound
#define time3Sound _time_Sound.Bits.time3Sound
#define time4Sound _time_Sound.Bits.time4Sound
#define time5Sound _time_Sound.Bits.time5Sound
#define time6Sound _time_Sound.Bits.time6Sound
#endif
Lundin:
Are you suggesting that I change the sound.h file to the
following?
pragma DATA_SEG __SHORT_SEG MY_ZEROPAGE // force next to be on zero page
typedef unsigned char time_Sound;
#define timeSound1 0x04
#define timesound2 0x08
#define timesound3 0x10
#define timesound4 0x20
#define timesound5 0x40
#define timesound6 0x80
timeSound |= timeSound1;
Thanks,
Tim