SYSTEM FUNCTIONS



LOAD A SOURCE FILE

(load <fname> &key :verbose :print)

An implicit ERRSET exists in this function so that if error occurs during loading, and *breakenable* is NIL, then the error message will be printed and NIL will be returned. The OS environmental variable XLPATH is used as a search path for files in this function. If the filename does not contain path separators ('/' for UNIX, and either '/' or '\' for MS-DOS) and XLPATH is defined, then each pathname in XLPATH is tried in turn until a matching file is found. If no file is found, then one last attempt is made in the current directory. The pathnames are separated by either a space or semicolon, and a trailing path separator character is optional.


RESTORE WORKSPACE FROM A FILE

(
restore <fname>)

The OS environmental variable XLPATH is used as a search path for files in this function. See the note under function "load", above. The standard system streams are restored to the defaults as of when XLISP-PLUS was started. Files streams are restored in the same mode they were created, if possible, and are positioned where they were at the time of the save. If the files have been altered or moved since the time of the save, the restore will not be completely successful. Memory allocation will not be the same as the current settings of ALLOC are used. Execution proceeds at the top-level read-eval-print loop. The state of the transcript logging is not affected by this function.


SAVE WORKSPACE TO A FILE

(
save <fname>)

You cannot save from within a load. Not all of the state may be saved -- see "restore", above. By saving a workspace with the name "xlisp", that workspace will be loaded automatically when you invoke XLISP-PLUS.


SAVE FUNCTION TO A FILE

(
savefun <fcn>)

defined in init.lsp


CREATE A FILE WITH A TRANSCRIPT OF A SESSION

(
dribble [<fname>])


FORCE GARBAGE COLLECTION

(
gc)


EXPAND MEMORY BY ADDING SEGMENTS

(expand [<num>])


CHANGE SEGMENT SIZE

(alloc <num> [<num2>])


SHOW MEMORY ALLOCATION STATISTICS

(room)

Statistics (which are sent to *STANDARD-OUTPUT*) include:

When dynamic array allocation is compiled, the following additional statistics are printed:


MEASURE EXECUTION TIME

(
time <expr>)

fsubr.


GET ELAPSED CLOCK TIME

(
get-internal-real-time)

GET ELAPSED EXECUTION TIME

(get-internal-run-time)


FORCE EXPRESSION TO DESIGNATED TYPE

(coerce <expr> <type>)

Sequences can be coerced into other sequences, single character strings or symbols with single character printnames can be coerced into characters, fixnums can be coerced into characters or flonums. Ratios can be coerced into flonums. Flonums and ratios can be coerced into complex (so can fixnums, but they turn back into fixnums).


RETURNS THE TYPE OF THE EXPRESSION

(type-of <expr>)

It is recommended that typep be used instead, as it is more general. In the original XLISP, the value NIL was returned for NIL.


PEEK AT A LOCATION IN MEMORY

(
peek <addrs>)


POKE A VALUE INTO MEMORY

(
poke <addrs> <value>)


GET THE ADDRESS OF AN XLISP NODE

(
address-of <expr>)


READ A KEYSTROKE FROM CONSOLE

(
get-key)

OS dependent.


EXECUTE A SYSTEM COMMAND

(
system <command>)

OS dependent -- not always available.


SET SYSTEM STACK WARNING POINT

(
set-stack-mark <size>)

OS dependent -- not always available. The system will perform a continuable error when the amount of remaining system stack passes below this setting. The trap is reset at the top-level. This function is useful for debugging runaway recursive functions.


DEFAULT TOP LEVEL LOOP

(
top-level-loop)

Runs the XLISP top level read-eval-print loop, described earlier. Never returns.


FLUSH INPUT BUFFERS

(
reset-system)

Used by user-implemented top level loops to flush the input buffer


EXIT XLISP

(
exit)


CREATE A GENERIC TYPED COPY OF THE EXPRESSION

(
generic <expr>)

Note: added function, Tom Almy's creation for debugging xlisp.


(
eval-when <condition> <body> ...)

Macro defined in common.lsp, and provided to assist in porting Common Lisp applications to XLISP-PLUS.

The following graphic and display functions represent an extension by Tom Almy:


CLEAR DISPLAY

(
cls)

Clear the display and position cursor at upper left corner.


CLEAR TO END OF LINE

(cleol)

Clears current line to end.


GET OR SET CURSOR POSITION

(
goto-xy [<column> <row>])

Cursor is repositioned if optional arguments are specified. Coordinates are clipped to actual size of display.


SET DRAWING COLOR

(
color <value>)


ABSOLUTE MOVE

(
move <x1> <y1> [<x2> <y2> ...])

RELATIVE MOVE

(moverel <x1> <y2> [<x2> <y2> ...])

For moverel, all coordinates are relative to the preceeding point.


ABSOLUTE DRAW

(
draw [<x1> <y1> ...])

RELATIVE DRAW

(drawrel [<x1> <y1> ...])

For drawrel, all coordinates are relative to the preceeding point.


SET DISPLAY MODE

(mode
<ax> [<bx> <width> <height>)

Standard modes require only <ax> argument. Extended modes are "Super-VGA" or "Super-EGA" and are display card specific. Not all XLISP versions support all modes.


XLISP-PLUS - Version 2.1g - Tom Almy tom.almy@tek.com - 18 JUL 94
Generated with
WebMaker