Floating Point Directives

Note that DC . S, DC . D and DC . X are really floating point directives but they are documented above with their integer cousins.

label FEQU.x constant

This directive will set the value and type of the given label to be a floating point constant of the given value. The constant may be specified in hexadecimal or decimal as described previously under expressions; alternatively you may use a previously defined floating point constant.

The label is compulsory and must not be a local label. Note that the size (. x) is compulsory and should be one of

.s

single precision

.D

double precision

.X

extended precision

.P

packed decimal

.W

word

.L

long

ten fequ.x two fequ.s million fequ.x nemillion fequ.x

10.0

: 40000000 1E6

-million

For example:

ten fequ.x two fequ.s million fequ.x nemillion fequ.x

10.0

: 40000000 1E6

-million

This directive allows you to set the floating point co-processor identifier and the rounding and precision of the assembler's internal floating point calculations. The valid options are:

ID=<id> This sets the co-processor identifier. By default, this is 1 as used on the Atari TT and as recommended by Motorola. However for systems with more than one FPU you will need to set this.

ROUND=<type>

This is used to set the rounding method used by internal floating point operations. <type> should be one of:

N

round to the nearest

Z

round towards zero

P

round towards + infinity

M

round towards - infinity

These correspond to the RND portion of the FPCR mode control byte. The default value is N.

This is used to set the precision used by internal floating point operations. <type> should be one of:

X extended precision

S single precision

D double precision

These correspond to the PR EC portion of the FPCR mode control byte. The default value is X.

For example:

fopt fopt fopt

ID=2 set the co-processor ID

ROUND=Z round towards 0

PREC=S single precision

0 0

Post a comment

  • Receive news updates via email from this site