back : deutsch =


The extended EX-Command

[back]


TK2-Special-Jobs

Those "special jobs" will be executed as procedures of the calling S.Basic job. Regardless of whether such a "job" was called by EX, EW or, ET, it would halt the calling job until termination, resulting to just a call to some external resident procedure, on demand. They are quite useless and shouldn't be relied upon, as that facility sooner or later will certainly be removed from T6.

According to the TK2 "manual" and to what the code itself revealed:


Registers on entry are:

        D4    1, if an input PIPE exists, else 0
                  D5    1, if an output PIPE exists, w. channel-ID on stack, else 0
                  D6    own Job-ID
                  D7    no. of all PIESs and filenames pased when calling the job

                  A0    entry addres of a routine to fetch a filename parameter
                  A1    ptr to the parameter string
                  A3(a6) beginning of parameter name-table
                  A4     own (data-)stackpointer
                  A5(a6) end of name-table
                  A6    S.Basic reference address, must never be changed
                  A7    S.Basic stackptr, must never be changed.
              

Routine per { JSR (A0) }:

IN:
                  (A3,A6) 2st parameter descriptor
          OUT:
                  D0 & SR error code, or 0 & A1 valid, or > 0 & A0 valid.
                  D1-D3   smashed
                  A0      channel ID, if parameter with leading "#"
                  (A1,A6) pointer to the found name

                  - no other registers modified -
                  

Another utility routine can be found { JSR 2(A0) }, OPENing a channel according to a filename:

IN:
                  D3      OPEN mode
                  D6      own Job-ID
                  (A1,A6) ptr to file or device name - NOT in the S.Basic buffer area
          OUT:
                  D0 & SR error code
                  A0      channel ID (if successful)
                  (A1,A6) ptr to name, might be extended by the TK2 devicename default
                  
                  - no other registers modified -

[back]


XTcc-Field

"XTcc" is an extension to the file end, bearing a text flag and the dataspace value, the useage of which has emerged from some C68 programs, somehow, and proved very valuable when copying files to or from non-QDOS file systems.

Aufbau:

         ..programm..
                   dc.l 'XTcc',dataspace
                   end             block at e.o.f.!

[back]


"bp_fname" bug in MINERVA 1.97

This vector could lead to address errors, etc, if the item on top of the return address on stack was not another valid return address. - No risk after a check whether any parameters are present:

fname    moveq #-15,d0   prepare err.bp
                   move.l $58(a6),a1 safe address
                   cmp.l a5,a3
                   bcc.s noname    ? no parameters
                   move.l 328,a2   vector bp_fname
                   jsr $4000(a2)
                   subq.l #8,a3    A3 "bias"
          noname   addq.l #8,a3    adjust (consistently)
                   tst.l d0        restore flags
                   ..program..


  

Alternatively with some special error handling:

fname    pea drop_error(pc)
                   move.l $58(a6),a1
                   move.l 328,a2   vector bp_fname
                   jsr $4000(a2)   >
                   addq.l #4,a7    drop protective error exit
                   bne.s error_exit ?
                   ..program..
          error_exit
                   ..error handling..
          drop_error
                  ..no parameters error..

[back]


BGET

         e$ = FILL$(100)
                   DIM a$(100) : a$=e$
                   DIM b$(9,9,100) : b$(3,3)=e$
                   DIM c$(1,200) : c$(0)=e$
                   k$ = a$&e$
                   BGET #chan, e$,a$,k$(81 TO 180),b$(3,3,1 TO),c$(0,100 TO)

all fetching 100 bytes of data from the input stream to (the specified slice of) the strings.
Any sort of strings should be initiated to at least the expected length.
DIM'd strings can only be used with the range specified.
Any string may be sliced.

[back]


MB - Start a Minerva S.Basic-Job

Modified from the assembler source as supplied with the MINERVA ROM.

MB [parameter$]

Start with a small window, #0 and #1, up to six of which will appear non-overlapping on screen.


Optional parameter string:

[back]


TRACE

S.Basic programs tracing facility, by J.Oakley, as supplied with the MINERVA distribution.

Display

start with the current Line Numbers, each line.
semicola and the lines' statement numbers.
dot "." for an executed S.Basic Token.
locals or parameters are symbolized by a "~" tilde, each.
"=" equal sign for an assignment to a variable.
"f=" if the value was returned by a function.

[back]


HISTORY

Die "HISTORY" von Hochwürden, St.Tebby, ist ein einfacher String-Stack, einzurichten in Job- rsp. Kanal-bezogen oder global zugänglicher Form. Sie wurde NICHT nach T6 übernommen.

[back]


Command Line History

Unchanged HISTORY 1v27 code, as supplied by Boris Jakubith, which proved reliably working with any known QDOS style systems, and SMSQ-s. Complete documentation in the T6 archive.

Short reference:

T6 specific:

<channel>s can be specified by "#number" for S.Basic or, "number" for QDOS channel numbers.

<cursor up> and <cursor down>, rsp, can be used to browse the history lines, which then can be editted and (re-)used as the command input, i.e. <ENTER>ed.

[back]


PARVAL

Reading S.Basic-Variables, specified by their names in a strings - as known from the "ARCHIVE" interpreter, or, by index of a PROC/FU parameter list.

For instance, if the names exist "CMD1", "CMD2", "CMD3", the following program sequence can be used to fetching their contents into an array:

        DIM V$(3,300)
                        FOR r = 1 TO 3 : v$(f) = PARVAL('CMD'&f) 

An example to programmable fetching the variable values of a PROC/FU parameter list:

        DEFine PROCedure TEST ( x,y,z )
                        LOCal a,b,c,l,r
                        l = 0
                        FOR r = 1 TO PARM%(x,y,z)
                         e$ = PARVAL(#r)
                         a  = LEN(e$) : IF a > l : l=a
                        END FOR r
                        p = f-1
                        DIM p$(p,l+1)
                        FOR r = 0 TO p: p$(r-1) = PARVAL(#r-1)

The above sequence will store p:=number of passed and set varables and, their values in the appropriately DIM-ed array p$.

PARM%( parameterlist ) is a function from "stm" of IO2 do determining the number of set variables in a parameter list. Alternatively, the return value of e$="-7" can be used to detecting whether an item is set.

[back]


DIR WDIR WSTAT

Displaying filenames by their data-type:

[back]


(count)