Topic : The GFA-Basic Compendium
Author : GFA Systemtechnik GmbH
Version : GFABasic.HYP v2.98 (12/31/2023)
Subject : Documentation/Programming
Nodes : 899
Index Size : 28056
HCP-Version : 3
Compiled on : Atari
@charset : atarist
@lang :
@default : Document not found
@help : Help
@options : +g -i -s +z
@width : 75
@hostname : STRNGSRV
@hostname : CAB
@hostname : HIGHWIRE
@hostname : THING
View Ref-FileSTE?
TT?
These commands allow one to detect which hardware your programs are
running on.
The function STE? returns the following:
0 = Stereo 8-bit playback not available
2 = Stereo 8-bit playback available
Correct use would be stereo_dma!=STE? which generates a TRUE/FALSE result.
It actually interogates bit #1 of the _SND cookie and shouldn't be used
to detect an STE machine.
The function TT? returns the following:
0 = 68000 (normal ST)
1 = 68030 or 68020
3 = 68881 or 68882 fitted
This funtion won't correctly detect an 68000 with an FPU add-on. If a
68000 is detected the FPU cookie isn't checked. Thus a value of 2 is
impossible.
These functions can use an FPU: SIN, COS, TAN, EXP, LOG, and LOG10
Example:
PRINT STE? !Prints 2 if ran on an Atari STe
PRINT TT? !Prints 3 if ran on an Atari TT030
Memo: These functions should not be used to determine what hardware an
application might be running on, instead look in the system cookie jar.
The cookie jar contains much more detailed information about the
hardware.
The STE? function doesn't seem to work as the documentation states.
Original documentation states this:
The function STE? returns -1 for STE (or TT), otherwise 0.
The TT? function doesn't seem to work as the documentation states.
Original documentation states this:
The function TT? returns -1 for 68020 or 68030 processor, otherwise 0.
The TT? function when compiled uses self modifying code and thus is
rather unstable if used on a cpu (68040/060) with the caches enabled.
If enabled it uses a faster 'float to integer' -> BFFFO.
These functions SIN, COS, TAN, EXP, LOG, and LOG10 by default do not use
the FPU even if present. The function TT? must be called at least once
to activate the faster math functions. It cannot be disabled once
activated. Example:
CLS
t=TIMER
FOR x=1 TO 65000
y=LOG(x)
NEXT x
PRINT "time: ";(TIMER-t)/200
~TT? !activate the faster math functions
t=TIMER
FOR x=1 TO 65000
y=LOG(x)
NEXT x
PRINT "time: ";(TIMER-t)/200
The Cookie Jar+