Options are in PowerD introduced by keyword 'OPT' or 'GOPT', it can be
defined everywhere outside PROCedures.
OPT defines local source options. If You define this in a module and use
this module, all of the options will be used only in the module, not in
source where do You use the module via MODULE
keyword. Some of option keywords are always global since as local
they are nonsensefull, all of these are signed with
*. If GOPT used, all options
will be known as global and will be used everywhere.
If You use keywords like HEAD or NOHEAD, always the last one will be used.
and You can use your own OPTions.
- HEAD/K* (default: 'startup.o')
Sets startup #?.o file, this file should be located in 'd:lib' directory or it's name
must begin with '*' charecter and full path of custom startup object file.
This automaticaly switches NOHEAD swtich off.
(example: OPT HEAD='*hd2:myheads/best.o')
- NOHEAD/S* (default: head is enabled)
This switch disables adding linkable startup head.
If You use this You must open all libraries and set all variables.
- LINK/K* (default: no linkable file)
This allows You to define linking files in source code. By this way Yu can define all
object (#?.o) and link-library (#?.lib) files. This keyword can be used more times, so
You can define more linkable files.
This automaticaly sets OBJECT output name to default.
(example: OPT LINK='*hd1:lib/math040.lib',LINK='amiga.lib')
- OBJECT/K/S* (default: '<progname>.o')
This sets output object file name. If You define only 'name.o' it will be located in
current directory, if You define it with path (eg: 'hd0:objects/prog.o') it will
locate output file in directory given with path.
- NOSTD/S* (default: reads powerd.m module)
This switch disables reading of 'dmodules:lib/powerd.m' module. It means: if You
enable this switch, You won't be able to use functions located in this module. I think
removing this is only needed if You have another set of default functions for PowerD.
- DEST/K* (default: '<progname>' without extension '.d')
This is the same as OBJECT/K keyword, it only allows You to set executable name after
- PRIVATE/S (default: only public data allowed)
This enables using of private data in the source.
- DPRE/S, CPRE/S, APRE/S, EPRE/S (default: DPRE enabled)
These keywords sets precedence of signs/operators, default is DPRE.
See Equations for more information.
- NOSOURCES/S (default: writing of source with errors enabled)
This switch allows You to switch off writing of source code with errors.
- AMIGAE/S (default: disabled)
This switch raises compatibility with AmigaE programming language:
- object names and object item names are changed to lower case
- EPRE switch is switched on
- HANDLE keyword in PROC definition for exceptions allowed (it will be skipped)
- EXCEPT DO changed to EXCEPTDO
- EXIT keyword changed TO EXITIF
- OSVERSION/N (default: 0)
This sets minimal os version required, it is currently quite useless.
- CPU=MACHINE/K (default: mc68020+mc68881)
This setups the assembler code generator. Known processors:
MC68000, MC68010 - these are known, but unsupported
MC68020, MC68030, MC68EC040, MC68LC040, MC68EC060, MC68LC060
- these will generate code without fpu instructions, see NOFPU
MC68040, MC68060 - these will generate code with fpu instructions
MC68881, MC68882 - these have to be used only with one of the above ones.
PowerD will recognize also sth like: 68030 or 030 as MC68030, lc060 as MC68LC060 etc.
You can also use combinations like 020+881, or mc68ec040+882 etc.
Pay attention that You enter sensesfull combination and 68000/68010 aren't supported!
Currently there are no differencies between 020 and 030, 040 and 060 in code generator,
these will be added in future.
- NOFPU/S (default: fpu is enabled)
This switch allows You to use floating point computations without a mathematical
coprocessor (FPU). This converts fpu instructions to non-fpu instructions and use
mathieeedoubbas.library and mathieeedoubtrans.library. I added this only to be able to
compile and try sources also on Amigas without fpu, the generated code is very slow,
so use it only if there is no another way.
Always the better way to use NOFPU is to use a module instead of the NOFPU keyword in
the source. See NOFPU to get more information about it.
PowerD non-fpu instruction converter is not done, so use it with care!!!!!
- MODULE/K/S (default: no binary module)
This option causes binary module production. If MODULE keyword is alone, then PowerD
will generate module called '<modname>.b'. If MODULE='xxx.b' is used, then PowerD will
generate module called 'xxx.b'.
If You want use this option, then insert it to the first line of your source, or
before all PowerD keywords, else the generated module will contain all constants, etc.
from all used MODULEs.
If You want to create your own binary module, see: binary module
- OPTIMIZE/N (default: 0)
This set bits needed for optimizations:
- bit 0 - remove useless
movem+movem to nothing (two inverse movems)
move+tst to move
bra x+bra y to bra x (bra y is unreachable)
- bit 1 - muls/divs optimizations
mul to lsl
div to lsr
- bit 2 - reduce instruction sizes
movem to move
move to moveq
move to pea
movea #0 to suba
move #0 to clr
add/sub to addq/subq
add/sub to lea
add/sub #0 to nothing
cmp #0 to tst
- bit 3 - remove twiced strings
this simply removes all the same strings.
If only OPTIMIZE (without number) used, optimizations will be set to -1.
All optimizations will be enabled by -1 ($ffff.ffff) value.
- NOEXE/S (default: try to generate executable)
This is useful, if You want to compile one or more functions to #?.o (object) file,
it is ofcourse possible without this, but an linker error appear. In this way no.
- EXEICON/S (default: icon creation disabled)
This tries to copy default executable icon from 'd:icons/def_exe.info'
to be icon of Your <proggy>.info, if an icon is found, it won't
be replaced, if 'd:icons/def_exe.info' doesn't exist, no message will
appear. This keyword is used in WB, so please
use it instead of the EXEICON option if You don't know exactly what will
This compiles source without a head to #?.o file and link this #?.o file with algos.o
and amiga.lib files into the 'calc' executable.
This will generate the object file into 'hd2:objects/proggy.o' and then it will be
everything linked into 'hd2:proggy'