|
|
| Author |
Message |
spamiam
Joined: 13 Nov 2005
Posts: 665
|
|
Posted: 24 October 2006, 20:06 PM Post subject: identifying the target CPU? |
|
|
I want to try to use compiler pre-processor commands for conditional compilation. Namely identifying different pins on different CPU platforms.
I use option targetcpu ....
But I also want to be able to say
#If TargetCPU = ZX44
some commands
#else
other commands
#endif
I looked for something like register.TargetCPU, but that does not exist.
I can not use the #If.... as written above. It needs to be a numerical value on the right of the equals....
So, what do I do?
-Tony |
|
| Back to top |
|
 |
dkinzer Site Admin
Joined: 03 Sep 2005
Posts: 2499
Location: Portland, OR
|
|
Posted: 24 October 2006, 20:16 PM Post subject: Re: identifying the target CPU? |
|
|
| spamiam wrote: | I also want to be able to say
| Code: | #if TargetCPU = ZX44
some commands
#else
other commands
#endif |
|
Use Option.TargetCPU.
| Code: | #if Option.TargetCPU = "ZX44"
some commands
#else
other commands
#endif |
Last edited by dkinzer on 24 October 2006, 20:27 PM; edited 1 time in total |
|
| Back to top |
|
 |
stevech
Joined: 23 Feb 2006
Posts: 657
|
|
Posted: 24 October 2006, 20:17 PM Post subject: |
|
|
I've used
#if option.TargetCPU = "ZX24a" |
|
| Back to top |
|
 |
spamiam
Joined: 13 Nov 2005
Posts: 665
|
|
Posted: 24 October 2006, 22:39 PM Post subject: |
|
|
| AHHH, perfect! Thanks. |
|
| Back to top |
|
 |
|