"POSIX'like words"

posix
This file exports a set of system words for
a posixish OS environment. So should do
any alternative wordset you might create for your OS.
Tektronix CTE %derived_by: guidod % %version: bln_mpt1!5.22 % GNU LGPL
EXTENSIONS # ifdef DEFINED_ignore_line
* #! ( "..." -- )

ignores the rest of the line,
defining `#!' is used to support forth scripts
executed by the unix kernel

posix ordinary primitive

# endif
* CLOCK ( --- ticks )

return clock()

posix ordinary primitive

* GETTIMEOFDAY ( -- double-time )

returns SVR/BSD gettimeofday(2).
Never defined on 16-bit systems, hence
TIMEDATE is more portable.

posix ordinary primitive

* NTOHL ( l -- l' )

if current host-encoding is bigendian, this is a NOOP
otherwise byteswap the lower 32-bit bits of the topofstack.
see L@ and L! (being usually just @ and ! )
(on some platforms, the upper bits are erased, on others not)

posix ordinary primitive

EXTENSIONS HTONL

no special info, see general notes

posix ordinary primitive

* NTOHS ( w -- w' )

if current host-encoding is bigendian, this is a NOOP
otherwise byteswap the lower 16-bit bits of the topofstack.
see W@ and W!
(on some platforms, the upper bits are erased, on others not)

posix ordinary primitive

EXTENSIONS HTONS

no special info, see general notes

posix ordinary primitive

ENVIRONMENT
* ENVIRONMENT CLK_TCK ( -- HZ )

the system's scheduler heartbeat clock (a.k.a. jiffies a.k.a. HZ)
for every function that expects time-values in ticks.

posix ordinary primitive