

Xlisp v2.1d  QL_PORT
====================

The DATASPACE is 34936

Breaks/Interupts :
==================

ctl-shift-esc activates a simple menu:

          toplevel : goto toplevel
          break    : interupts prog execution and enters a break-read-eval-
                     -print-loop, (continue) resumes execution
          toggle break mode : toggles *breakenable*
                    won't enter breakloop on error/break
          toggle baktrace   : toggles *tracenable* , usefull to
                    interupt long baktrace list's.

A separate job is checking for interupts, that means that
when xlisp is in line editing mode, the interupt is evaluated 
only after '\n' is entered.



Baiscs :
========

Note that the ql backq 'Ÿ' has another value as in ASCII, 
lisp programs must be converted( '`' -> 'Ÿ').
Typicaly xlisp complains about ill' char #\` at load
time.
BTW: altkey ',',chr$(159) is very usefull for german ql's.

The file suffix for load is '.lsp' , '_lsp' should be
recognized. Xlisp tries '.lsp' first, then '_lsp'. For image
save/restore '.wks' should be used. (currently switched off)
Datadefault is searched for all file operations.

command & breakloop redirection to different windows still needs
some hacking.
To open a console win use
          (open 'con_ :direction :io :overwrite)

Some complicated programs, especialy CL require backquot.lsp
to be loaded, unfortunately there may be no error if it isn't -
just a bad result.

The *.lsp programs suplied here may come from different versions
of the xlisp distribution.

See gblocks.lsp for some application of graphic functions

I have added stepper autoload in init.lsp. To step execution
of (func arg1 ... ) just type (step (func arg1 ... )) ,
'h' for help.



QL system functions:
====================

The funcs take a stream  as an optional first argument.
It is possible to redirect any of them, but currently the
grafic cursor position is stored on the property list of
the file symbol. That means you have a different graphic cursor
if you use another symbol, even if the symbol is bound to
the same stream. This affects only MOVE,MOVEREL,DRAW,DRAWREL.

[ ] denotes optional prameters.

All numeric args should be fixnums (truncate number), I will
change this soon. All fns return QDOS errnum.

(wmode  [fp] [arg])   ; specify  screen paint mode ,  arg can be
          :OR         :
          :XOR        :
          not suplied : default mode

(cls    [fp] [arg])   ; like SB, arg can be  :SCR-TOP , :SCR-BOT
          :SCR-CLN (cursor-line) or :SCR-RLN right of cursor

(scroll [fp] dist [direction] [screen-part] ) ; direction may be :HORIZ or
          :VERT, screen-part as above, it does not complain
          about impossible combinations.
          Default is vertical full screen scroll.

(goto-xy  [fp] x y)
(setgpos  [fp] x y gx gy)       ; sd_igcur(...)
(scale    [fp] x y z)
(wdef     [fp] b_color b_width  wx wy  at_x at_y) ;calls sd_wdef directly
(color    [fp] ink)
(paper    [fp] pa)

(circle   [fp]  x y r2/r1 r phi)   ; note the arg's order is different
(arc      [fp]  x y  xe ye  phi)   ; from SBasic
; all five par's needed to do anything useful.

(move,draw etc.) ; with fp, else like in original docs

(get-key  [fp] [timeout] [curs] [buf])
; [curs]      :  { :CURSOR-ON | :CURSOR-OFF }
; [buf]       :  :USE-BUFFER  try to evaluate buffer contents, not
                     yet perfect and absolutely useles, it is
                     disabled in qlstuff_c.

; returns integer : +ve char-code
:                   -ve QDOS errnr


The (random) function as defined in glstuff_c gives pretty
poor results.



The pipe-open stuff works when popen() would work (perhaps c68V3 ?).
See qlstuff_c for description, you will need to remove a few #if 0
in qlstuff_c and os*_h to compile this.
SYSTEM works perfectly.

POPEN :
 * (code stolen from xlfio.c:xopen())
 *
 * syntax: (popen <command line> :direction <direction>)
 *		    <command line> is a string to be sent to the subshell (sh).
 *		    <direction> is either :input (to read from the pipe) or
 *				 :output (to write to the pipe).
 *				 (:input is the default)
 *
 * Popen returns a stream, or NIL if files or processes couldn't be created.
 * The	success  of  the  command  execution  can be checked by examining the
 * return value of pclose.
 *
 * Added to XLISP by Niels Mayer



Compiling :
===========

 cc -oxlisp -bufp250K  *_c *_s setjmp_o divs_o -lm

should do the job. Use -DV3 flag when compiling with c68v >= 3.05,
this turns off a few float hacks in qlstuff_c and adds a _conread
one.
Needs bugfix for longjmp() and .lrem.

I have turned off a few options in xlisp.h to keep the 
executable under 200K, most of them can be switched on 
immediately:

You may enable this in xlisp_h :

PATHNAMES           :   similar to pth device, use 
setenv "XLPATH=ram1_;ram1_lisp_;hdk1_lisp_" , affects file
load and image save/restore
SAVERESTORE         :   enable image save/restore
RANDOM              :   there may be some problems with this
READTABLECASE
HASHFCNS
RATIOS              :   this is useles without bignums






Richard Zidlicky
Babenbergerring 69
96049 Bamberg
Germany
Tel 0951/55175

rdzidlic@cip.informatik.uni-erlangen.de        # Internet


