factor/core/system/system-docs.factor

82 lines
2.0 KiB
Factor
Raw Normal View History

USING: classes.singleton help.markup help.syntax kernel math ;
2007-09-20 18:09:08 -04:00
IN: system
2008-04-02 20:23:26 -04:00
ABOUT: "system"
ARTICLE: "system" "System interface"
{ $subsections
"cpu"
"os"
}
2007-09-20 18:09:08 -04:00
"Getting the path to the Factor VM and image:"
{ $subsections
vm
image
}
"Getting a monotonically increasing nanosecond count:"
{ $subsections nano-count }
2007-09-20 18:09:08 -04:00
"Exiting the Factor VM:"
{ $subsections exit } ;
2007-09-20 18:09:08 -04:00
ARTICLE: "cpu" "Processor detection"
2008-04-02 20:23:26 -04:00
"Processor detection:"
{ $subsections cpu }
2008-04-02 20:23:26 -04:00
"Supported processors:"
{ $subsections
x86.32
x86.64
ppc
arm
}
2008-04-02 20:23:26 -04:00
"Processor families:"
{ $subsections x86 } ;
2008-04-02 20:23:26 -04:00
ARTICLE: "os" "Operating system detection"
2008-04-02 20:23:26 -04:00
"Operating system detection:"
{ $subsections os }
2008-04-02 20:23:26 -04:00
"Supported operating systems:"
{ $subsections
linux
macosx
windows
}
2008-04-02 20:23:26 -04:00
"Operating system families:"
{ $subsections
unix
windows
} ;
2008-04-02 20:23:26 -04:00
2007-09-20 18:09:08 -04:00
HELP: cpu
2008-04-02 20:23:26 -04:00
{ $values { "class" singleton-class } }
2007-09-20 18:09:08 -04:00
{ $description
2008-04-02 20:23:26 -04:00
"Outputs a singleton class with the name of the current CPU architecture."
2007-09-20 18:09:08 -04:00
} ;
HELP: os
2008-04-02 20:23:26 -04:00
{ $values { "class" singleton-class } }
2007-09-20 18:09:08 -04:00
{ $description
2008-04-02 20:23:26 -04:00
"Outputs a singleton class with the name of the current operating system family."
2007-09-20 18:09:08 -04:00
} ;
HELP: embedded?
{ $values { "?" boolean } }
2007-09-20 18:09:08 -04:00
{ $description "Tests if this Factor instance is embedded in another application." } ;
HELP: exit
2007-09-20 18:09:08 -04:00
{ $values { "n" "an integer exit code" } }
{ $description "Exits the Factor process." } ;
HELP: nano-count
{ $values { "ns" integer } }
{ $description "Outputs a monotonically increasing count of nanoseconds elapsed since an arbitrary starting time. The difference of two calls to this word allows timing. This word is unaffected by system clock changes." }
{ $notes "This is a low-level word. The " { $vocab-link "tools.time" } " vocabulary defines words to time code execution time." } ;
2007-09-20 18:09:08 -04:00
HELP: image
{ $values { "path" "a pathname string" } }
{ $description "Outputs the pathname of the currently running Factor image." } ;
HELP: vm
{ $values { "path" "a pathname string" } }
{ $description "Outputs the pathname of the currently running Factor VM." } ;