Download The SELF 4.1 Programmer`s Reference Manual
Transcript
5 Virtual Machine Reference 5.1 Startup options The following command-line options are recognised by the Virtual Machine: -f filename Reads filename (which should contain SELF source) immediately after startup (after reading the snapshot) and evaluates the contents. Useful for setting options, installing personal shortcuts, etc. -h Prints a message describing the options -p Suppresses execution of the expression snapshotAction postRead after reading a snapshot. Useful if something in the startup sequence causes the system to break. -s snapshot Reads initial world from snapshot. A snapshot begins with the line exec Self -s $0 $@ which causes the Virtual Machine to begin execution with the snapshot. -w Don’t print warnings about object code These options are provided for use by SELF VM implementors: -F Discards any machine code saved in the snapshot. If the code in a snapshot is for some reason corrupted, but the objects are not, this option can be used to recover the snapshot. -l logfile Writes a log of events generated by the spy to logfile. -r Disables real timer interrupts -t Disables all timers Other command-line options are ignored by the Virtual Machine but are available at SELF level via the primitive _CommandLine. 5.2 System-triggered messages Certain events cause the system to automatically send a message to the lobby. After reading a snapshot the expression snapshotAction postRead is evaluated. This allows the SELF world to reinitialize itself—for example, to reopen windows. 62