]> gitweb.factorcode.org Git - factor.git/blob - core/system/system-docs.factor
Remove Windows CE from core/ basis/ and build-support/
[factor.git] / core / system / system-docs.factor
1 USING: generic help.markup help.syntax kernel math memory
2 namespaces sequences kernel.private strings classes.singleton ;
3 IN: system
4
5 ABOUT: "system"
6
7 ARTICLE: "system" "System interface"
8 { $subsections
9     "cpu"
10     "os"
11 }
12 "Getting the path to the Factor VM and image:"
13 { $subsections
14     vm
15     image
16 }
17 "Getting a monotonically increasing nanosecond count:"
18 { $subsections nano-count }
19 "Exiting the Factor VM:"
20 { $subsections exit } ;
21
22 ARTICLE: "cpu" "Processor detection"
23 "Processor detection:"
24 { $subsections cpu }
25 "Supported processors:"
26 { $subsections
27     x86.32
28     x86.64
29     ppc
30     arm
31 }
32 "Processor families:"
33 { $subsections x86 } ;
34
35 ARTICLE: "os" "Operating system detection"
36 "Operating system detection:"
37 { $subsections os }
38 "Supported operating systems:"
39 { $subsections
40     freebsd
41     linux
42     macosx
43     openbsd
44     netbsd
45     solaris
46     windows
47 }
48 "Operating system families:"
49 { $subsections
50     bsd
51     unix
52     windows
53 } ;
54
55
56 HELP: cpu
57 { $values { "class" singleton-class } }
58 { $description
59     "Outputs a singleton class with the name of the current CPU architecture."
60 } ;
61
62 HELP: os
63 { $values { "class" singleton-class } }
64 { $description
65     "Outputs a singleton class with the name of the current operating system family."
66 } ;
67
68 HELP: embedded?
69 { $values { "?" "a boolean" } }
70 { $description "Tests if this Factor instance is embedded in another application." } ;
71
72 HELP: exit ( n -- )
73 { $values { "n" "an integer exit code" } }
74 { $description "Exits the Factor process." } ;
75
76 HELP: nano-count ( -- ns )
77 { $values { "ns" integer } }
78 { $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." }
79 { $notes "This is a low-level word. The " { $vocab-link "tools.time" } " vocabulary defines words to time code execution time." } ;
80
81 HELP: image
82 { $values { "path" "a pathname string" } }
83 { $description "Outputs the pathname of the currently running Factor image." } ;
84
85 HELP: vm
86 { $values { "path" "a pathname string" } }
87 { $description "Outputs the pathname of the currently running Factor VM." } ;