| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | USING: generic help.markup help.syntax kernel math memory | 
					
						
							| 
									
										
										
										
											2008-04-02 20:23:26 -04:00
										 |  |  | namespaces sequences kernel.private strings classes.singleton ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | IN: system | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-04-02 20:23:26 -04:00
										 |  |  | ABOUT: "system" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ARTICLE: "system" "System interface" | 
					
						
							|  |  |  | { $subsection "cpu" } | 
					
						
							|  |  |  | { $subsection "os" } | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | "Getting the path to the Factor VM and image:" | 
					
						
							|  |  |  | { $subsection vm } | 
					
						
							|  |  |  | { $subsection image } | 
					
						
							| 
									
										
										
										
											2007-11-16 21:07:18 -05:00
										 |  |  | "Getting the current time:" | 
					
						
							| 
									
										
										
										
											2008-11-19 02:50:05 -05:00
										 |  |  | { $subsection micros } | 
					
						
							| 
									
										
										
										
											2008-11-24 01:51:46 -05:00
										 |  |  | { $subsection millis } | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | "Exiting the Factor VM:" | 
					
						
							| 
									
										
										
										
											2008-09-02 23:50:25 -04:00
										 |  |  | { $subsection exit } ;
 | 
					
						
							| 
									
										
										
										
											2007-09-20 18:09:08 -04:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-04-09 01:32:18 -04:00
										 |  |  | ARTICLE: "cpu" "Processor detection" | 
					
						
							| 
									
										
										
										
											2008-04-02 20:23:26 -04:00
										 |  |  | "Processor detection:" | 
					
						
							|  |  |  | { $subsection cpu } | 
					
						
							|  |  |  | "Supported processors:" | 
					
						
							|  |  |  | { $subsection x86.32 } | 
					
						
							|  |  |  | { $subsection x86.64 } | 
					
						
							|  |  |  | { $subsection ppc } | 
					
						
							|  |  |  | { $subsection arm } | 
					
						
							|  |  |  | "Processor families:" | 
					
						
							|  |  |  | { $subsection x86 } ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-04-09 01:32:18 -04:00
										 |  |  | ARTICLE: "os" "Operating system detection" | 
					
						
							| 
									
										
										
										
											2008-04-02 20:23:26 -04:00
										 |  |  | "Operating system detection:" | 
					
						
							|  |  |  | { $subsection os } | 
					
						
							|  |  |  | "Supported operating systems:" | 
					
						
							|  |  |  | { $subsection freebsd } | 
					
						
							|  |  |  | { $subsection linux } | 
					
						
							|  |  |  | { $subsection macosx } | 
					
						
							|  |  |  | { $subsection openbsd } | 
					
						
							|  |  |  | { $subsection netbsd } | 
					
						
							|  |  |  | { $subsection solaris } | 
					
						
							|  |  |  | { $subsection wince } | 
					
						
							|  |  |  | { $subsection winnt } | 
					
						
							|  |  |  | "Operating system families:" | 
					
						
							|  |  |  | { $subsection bsd } | 
					
						
							|  |  |  | { $subsection unix } | 
					
						
							|  |  |  | { $subsection windows } ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											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 { "?" "a boolean" } } | 
					
						
							|  |  |  | { $description "Tests if this Factor instance is embedded in another application." } ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | HELP: exit ( n -- )
 | 
					
						
							|  |  |  | { $values { "n" "an integer exit code" } } | 
					
						
							|  |  |  | { $description "Exits the Factor process." } ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-11-19 02:50:05 -05:00
										 |  |  | HELP: micros ( -- us )
 | 
					
						
							|  |  |  | { $values { "us" integer } } | 
					
						
							|  |  |  | { $description "Outputs the number of microseconds ellapsed since midnight January 1, 1970." } | 
					
						
							|  |  |  | { $notes "This is a low-level word. The " { $vocab-link "calendar" } " vocabulary provides features for date/time arithmetic and formatting." } ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | HELP: millis ( -- ms )
 | 
					
						
							| 
									
										
										
										
											2008-11-24 01:51:46 -05:00
										 |  |  | { $values { "ms" integer } } | 
					
						
							| 
									
										
										
										
											2007-11-16 21:07:18 -05:00
										 |  |  | { $description "Outputs the number of milliseconds ellapsed since midnight January 1, 1970." } | 
					
						
							|  |  |  | { $notes "This is a low-level word. The " { $vocab-link "calendar" } " vocabulary provides features for date/time arithmetic and formatting." } ;
 | 
					
						
							| 
									
										
										
										
											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." } ;
 |