Target CPU

Questions and discussion about the ZBasic IDE.
Post Reply
twesthoff
Posts: 247
Joined: 17 March 2006, 6:45 AM
Location: Fredericksburg, VA

Target CPU

Post by twesthoff »

How in the IDE do you specify which ZX chip you are compiling for? (ZX-24, ZX-40, ZX-44)
dkinzer
Site Admin
Posts: 3120
Joined: 03 September 2005, 13:53 PM
Location: Portland, OR

Post by dkinzer »

This can be done either using a compiler option (on the command line or at the top of your project file) or by using an option directive in the first file that is compiled (the first one in the project file), usually the one containing Main().

To use the compiler option, place a line like the following in your project file before any of the files to be compiled:

Code: Select all

--target-CPU=ZX44
To use the option directive, place a line like the following in the first file listed in your project file:

Code: Select all

Option TargetCPU ZX44
The full set of compiler options and option directives is described in their respective sections of the Language Reference Manual.
- Don Kinzer
Post Reply