Introduction to QDOS

Simon Goodwin has advised as to the origins of this document: "... in fact I know where this came from (having seen the original and several intermediate versions!). It was written by Rainer Kowallik of Berlin, to accompany the Amiga Qdos emulator - hence the dozens of references to the Amiga in the text."

  1. What is QDOS ?

    QDOS is an Operating system designed for small 68000 computers, which provides multitasking, a virtual device interface for grafics, an easy to program device driver interface, and last, but not least a highly sophisticated structured and expandable resident command language interpreter called "SuperBASIC". Since it was first implemented on a computer with only 128K RAM and 48K ROM this operating system and its supporting Software and compilers are small and very efficient, mostly programmed directly in native 68000 machinecode. This makes QDOS the ultimate operating system for all small computers like for example the Amiga 500 and single board controller computers, which can use a real time operating system and the whole support software for their applications. QDOS was written by Tony Tebby, who has my deep respect for this.

  2. Why is QDOS ?

    You may now say, why bothering with QDOS when I have Amiga DOS, which provides multitasking too, and can use all the fuzzy features of the Amiga without any effort ?

    Okay, you are a real horsetrader. Take for example the pretty serial interface, isn't it nice ? It looks really good, and the preferences can be set to any value, but this does not mean, that these values have anything to do with what is happening in the head of the Amiga. So the handshake lines have a really unsatisfactory live, allways ignored by the software. Or what's about getting rid of a task which has become superfluos, try throwing it in the nice Trashcan of your Workbench. But don't tell it to the Guru, he may get angry ! Enough ? Oh no, There is another bill concerning the rundimentary command line interpreter, and this unbelievable stupid Amiga BASIC. ...I stop here, because I get headache when I think about it. But I can tell you, what are the real advantages:

    1. You can easily intervent in every software and datafiles, since QDOS is small and surveyly. QDOS is (at least on the QL) a higly reliable operating system, which is hardly crashed
    2. Software devellopment using Superbasic and a compiler is an easy interactive process.
      For small problems this is by far the fastest solution
    3. You have a very nice operating system for develloping realtime applications for single board computers for measurement and control
    4. QDOS is (directliy behind MS-DOS) one of the mostly emulated Operating systems. It is implemented for example on the Atari ST, now on the Amiga, and on a series of dedicated computers: the Sinclair QL, the OPD, the Thor, and the Futura.
  3. Introduction to SuperBASIC

    QDOS special keys
    freezes the screen (Hold Screen on normal Terminals)
    Break for BASIC programms, Leaves EXEC_W programs
    <7> (N)MI BASIC Warmstart
    QDOS 200K cold start

    1. general structure

      Superbasic programs consists of lines, which start with a positive non zero integer, and contain one or more statements, which are separated by ":". Identifiers are separated by any non zero number of spaces. Identifiers can consist of letters, numbers and the underliner. The length of names is only restricted by the amount of typing work, you want to spend. Names are not case sensitive. Integer Functions and variables are identified by a trailing %", String functions and Variables have a trailing "$". String constants can be enclosed in single or double qoute. The ":" has the function of a null statement and can therefore be the only statment on a line. Comments are introduced by a REMark statment, which can be abrieviated by REM.

      DATA items are separated by "," where String type items must be enclosed in single or double qoute. The DATA statement must be the first statement on a line. This line is treated as comment. You can read DATA by a READ var[,var2,...] statement. The DATA pointer can be restored to any linenumber by a RESTORE [n] statement

    2. structured loops

      There are only two types of loops, but they have powerfull extras: The First one is the FOR loop, which looks like follows:

             FOR index=start_expr TO end_expr [STEP expr]
                ....
                [NEXT index]
                ....
                [EXIT index]
                ....
             END FOR index
      

      index must be a floating point variable, the STEP expression can be non integer, default is 1.
      FOR loops are enclosed between FOR ... END FOR index. In a single line FOR loop, the END FOR terminator can be omitted The NEXT keyword jumps back to the FOR statement, whereas the EXIT statement forces a jump behind the END FOR statement.

      The second loop is the REPeat loop:

       
            REPeat loop_name
                ....
                [NEXT loop_name]
                ....
                [EXIT loop_name]
                ....
             END REPeat loop_name
      

      You can only escape from the loop with an EXIT statment. The NEXT statement will restart the loop at REPeat. You normally will test a termination condition at the start (WHILE) or at the end (REPEAT UNTIL) and EXIT.

             Example:
      100    REPeat Read_data
      110      IF EOF(#3) THEN EXIT Read_data
      120      INPUT #3,a$
      130      PRINT a$
      140    END REPeat Read_data
      
    3. IF ... THEN ... ELSE ... END IF

      Single line IF statements do not need to be terminated with END IF. The operators AND,OR,XOR are logical, not bitwise ! For Integer bitwise operators use &&,||,^^.

    4. selecting data (CASE OF, SWITCH ON)

      Select variables must be Floating point type, and no formal parameters are allowed. The format then is:

             SELect ON Sel_var
               =1         : ...
               =3,6,8     : ...
               =10 TO 99  : ...
               =REMAINDER : ...
             END SELect
      
    5. procedures, functions and parameters

      PROCedures and FuNctions can be ordered top down or bottom up or free style. They can be recursive, Parameters can be modified.
      The definition is introduced with

             DEFine PROCedure name[(par1,par2...)]
                or
             DEFine FuNction name[(par1,par2...)]
      

      The formal parameters do not have a type !
      String FuNctions must end with a '$', integer FuNctions with '%'. The next line after the Definition contains the LOCal variable list which is introduced by the keyword LOCal. You should not try to declare more than 9 local variables, since this may confuse the Interpreter. Arrays can be dimensioned at declaration time:

             LOCal var1,var2$,var3(100,10)
      

      FuNctions return theier result using the RETurn statement. The RETurn statement can be used without any argument to escape from a procedure.

             RETurn result
      

      The FuNction and PROCedure is terminated using the END DEFine statement:

             END DEFine name
      

             Example:
      
      100    DEFine FuNction FAK(n)
      110    LOCal m
      120    IF n=0 THEN
      130       m=1
      140    ELSE
      150       m=n-1 : m=n*FAK(m)
      160    END IF
      170    RETurn m
      180    END DEFine FAK
      
    6. !!! string handling and array slicing !!!

      String handling on Superbasic is very different from any other language !

      A string expression can consist of
      String constants enclosed in single quote or double quote
      String variables terminated with '$'
      String slices which consist of the name, and a range: A$(3 TO 6)
      String functions
      and the concanation operator, which is the ampersand: '&'

      Array and string slices need not to specify start and end:
      A( TO 8) will start with the first element
      A(3 TO) will end with the last element.
      this can be wrong for strings, since the number of elements is not allways the length of a string !

      arrays and array slices can be passed to procedures, but slices are considered as expressions, and can therefore not return values from a procedure.
      INSTR is implemented as operator , not as Function ! Example: N= "TEST" INSTR A$ return the position of "TEST" Strings can have a length of up to 32767 characters. Strings can be Dimensioned. If you need an Array of Strings, the last index specifies the length of the string

    7. error processing

      There are different kinds of error processing for SUPERBASIC.
      The official one only works in the pure interpreter mode:

      
             10 WHEN ERROR
             20   PRINT 'sorry, there was an error:',ERNUM,'at ',ERLIN
             30 END WHEN
      

      or for debuging purposes:

      
             10 WHEN a=123
             20   PRINT 'The Value has reached the Limit !'
             30 END WHEN
      

      The WHEN statements must have been executed once, before they become active.
      If You compile programs with the Qliberator, you should use the QERR_ON 'function' , QERR_OFF 'function' procedure, which traps error returns and set a flag which can be read with Q_ERR.

    8. interfacing to assembler

      This is probably one of the biggest advantages of SUPERBASIC over nearly all other BASIC interpreters I know. You can easily add new functions and procedures to the interpreter, which then will behave as if they have ever belonged to it.
      The following VECTORED UTILITIES are designed to assist you:
      BP.INIT$110A1=pointer to definition listinitialize procedures and functions
      CA.GTINT$112A1=pointer to stack , A3/A5=first/last parameterget any number of integer parameters from BASIC to stack
      CA.GTFP$114as aboveget floating point (6 bytes !)
      CA.GTSTR$116as aboveget string
      CA.GTLIN$118as aboveget long integer (4 byte)
      BV.CHRIX$11AD1.L=number of bytesallocate space on arithmetic stack
      BP.LET$120A3=pointer to name table entryreturn parameter value to BASIC

      The error is returned as negative Number in D0 A normal RTS instruction should be used to return to BASIC. A6 should never be changed, since this is used as pointer to the BASIC memory area.
      For more Details have a look at some assembler sources.

    9. command summary (376 functions and procedures)
      *1 = T.Tebby toolkit 2
      *2 = Turbo Toolkit (supplied with TURBO basic compiler)
      *3 = Qliberator toolkit
      *4 = any other toolkit or program

      _R grafic commands refer to the last plotted point as origin. Graphic coordinates refer to a virtual device with non integer coordinates, which can be scaled using SCALE. This makes it possible (in principle) to output graphics on any device with maximum resolution. You should not wonder about the strange factor between X and Y coordinates, this is the monitor X/Y relation, which makes circles round.

      PIXEL coordinates are physical coordinates (X=0..511, Y=0..255)

      With the T.Tebby Toolkit 2 #n is almost synonym with \filename, which will act on the file directly, instead on a channel. Job handling requires the name as string or the ID in the form Number,Tag.

      ABS(F)          returns positive number
      ACOS(F)         returns inverse of cosine
      ACOT(F)         returns inverse of cotangent
      ADATE n         advance date in seconds (+ or -)
      AJOB ID% or NAME$, priority%
                  *1  activates a job
      ALARM h%,m%
                  *1  can not work on the amiga, since sound is not emulated
      ALCHP(n)    *1  allocates space (n bytes) in the common heap area
                      and returns the address of the first byte to use
      ALLOCATION  ?   sometimes I am wondering myself
      ALTKEY Key$,String$
                  *1  if you type the key in key$ together with the 
      	
  4. Introduction to DOS-calls
    1. Supervisor TRAP (#0)
      Enter Supervisormode with TRAP #0
    2. Manager TRAPs (#1)
           system calls [ MOVEQ #??,D0 .... TRAP #1]
           D0=$00 MT.INF     provide current job and system information
              Call parameters            Return parameters
              D1                         D1.L current Job ID
              D2                         D2.L ASCII version
              D3                         D3   preserved
              A0                         A0   pointer to system variables
              A1                         A1   preserved
              A2                         A2   preserved
              A3                         A3   preserved
      
           D0=$01 MT.CJOB    create a job in transient prog. area
              Call parameters            Return parameters
              D1.L owner JOB ID          D1.L Job ID
              D2.L length of code(bytes) D2   preserved
              D3.L length of data space  D3   preserved
              A0                         A0   base of area allocated
              A1   start address or 0    A1   preserved
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : OM,NJ
      
           D0=$02 MT.JINF    Provide information on a job
              Call parameters            Return parameters
              D1.L JOB ID                D1.L next Job in tree
              D2.L Job at top of tree    D2.L owner of Job
              D3                         D3   MSB<0 if suspended, LSB=priority
              A0                         A0   base address of job
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NJ
      
           D0=$03 illegal system trap
      
           D0=$04 MT.RJOB    Remove job from transient prog. area
              Call parameters            Return parameters
              D1.L JOB ID                D1   ?
              D2                         D2   ?
              D3.L Error code            D3   ?
              A0                         A0   ?
              A1                         A1   ?
              A2                         A2   ?
              A3                         A3   ?
              Errors : NJ,NC
      
           D0=$05 MT.FRJOB   force remove job from transient prog. area
              Call parameters            Return parameters
              D1.L JOB ID                D1   ?
              D2                         D2   ?
              D3.L Error code            D3   ?
              A0                         A0   ?
              A1                         A1   ?
              A2                         A2   ?
              A3                         A3   ?
              Errors : NJ
      
           D0=$06 MT.FREE    finds largest contiguous free trans. prog. space
              Call parameters            Return parameters
              D1                         D1.L length of space
              D2                         D2   ?
              D3                         D3   ?
              A0                         A0   ?
              A1                         A1   ?
              A2                         A2   ?
              A3                         A3   ?
      
           D0=$07 MT.TRAPV   sets per job pointer to trap vectors
              Call parameters            Return parameters
              D1.L JOB ID                D1.L Job ID
              D2                         D2   preserved
              D3                         D3   preserved
              A0                         A0   base of job
              A1   pointer to table      A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
      
           D0=$08 MT.SUSJB   suspend job
              Call parameters            Return parameters
              D1.L JOB ID                D1.L Job ID
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0                         A0   base of job control area
              A1   address of flag byte  A1   preserved
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NJ
      
           D0=$09 MT.RELJB   Release job
              Call parameters            Return parameters
              D1.L JOB ID                D1.L Job ID
              D2                         D2   preserved
              D3                         D3   preserved
              A0                         A0   base of job control area
              A1                         A1   preserved
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NJ
      
           D0=$0A MT.ACTIV   activate job
              Call parameters            Return parameters
              D1.L JOB ID                D1.L Job ID
              D2.B priority (0-127)      D2   preserved
              D3.W timeout (-1,0)        D3   preserved
              A0                         A0   base of job control area
              A1                         A1   preserved
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NJ,NC
      
           D0=$0B MT.PRIOR   change a job's priority
              Call parameters            Return parameters
              D1.L JOB ID                D1.L Job ID
              D2.B priority (0-127)      D2   preserved
              D3                         D3   preserved
              A0                         A0   base of job control area
              A1                         A1   preserved
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NJ
      
           D0=$0C MT.ALLOC   allocate an area in a heap
              Call parameters            Return parameters
              D1.L required length       D1.L allocated length
              D2                         D2   ?
              D3                         D3   ?
              A0   pointer to pointer    A0   base of area allocated
                   to free space
              A1                         A1   ?
              A2                         A2   ?
              A3                         A3   ?
              A6   base address          A6   preserved
              Errors : OM
      
           D0=$0D MT.LNKFR   link free space back into heap
              Call parameters            Return parameters
              D1.L length to link in     D1   ?
              D2                         D2   ?
              D3                         D3   ?
              A0   base of new space     A0   ?
              A1   pointer to pointer    A1   ?
                   to free space
              A2                         A2   ?
              A3                         A3   ?
              A6   base address          A6   preserved
      
           D0=$0E MT.ALRES   allocate resident procedure area
              Call parameters            Return parameters
              D1.L no. of bytes required D1   ?
              D2                         D2   ?
              D3                         D3   ?
              A0                         A0   base address of area
              A1                         A1   ?
              A2                         A2   ?
              A3                         A3   ?
              Errors : OM,NC
      
           D0=$0F MT.RERES   release resident procedure area
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   ?
              D3                         D3   ?
              A0                         A0   ?
              A1                         A1   ?
              A2                         A2   ?
              A3                         A3   ?
              Errors : NC
      
           D0=$10 MT.DMODE   Sets or reads the display mode
              Call parameters            Return parameters
              D1.B -1 read mode          D1.B display mode
                   0 : 512*256
                   8 : 256*256
              D2.B -1 read display       D2.B display type
                   0 : monitor
                   1 : TV
              D3                         D3   preserved
              A0                         A0   preserved
              A1                         A1   preserved
              A2                         A2   preserved
              A3                         A3   ?
      
           D0=$11 MT.IPCOM   Sends a command to the IPC
              Call parameters            Return parameters
              D1                         D1.B IPC return parameter
              D2                         D2   preserved
              D3                         D3   preserved
              D5                         D5   ?
              D7                         D7   ?
              A0                         A0   preserved
              A1                         A1   preserved
              A2                         A2   preserved
              A3.L pointer to command    A3   preserved
      
           D0=$12 MT.BAUD    sets the baud rate
              Call parameters            Return parameters
              D1.W baud rate             D1   ?
              D2                         D2   preserved
              D3                         D3   preserved
              A0                         A0   preserved
              A1                         A1   preserved
              A2                         A2   preserved
              A3                         A3   preserved
      
           D0=$13 MT.RCLCK   reads the clock
              Call parameters            Return parameters
              D1                         D1.L time in seconds
              D2                         D2   ?
              D3                         D3   preserved
              A0                         A0   ?
              A1                         A1   preserved
              A2                         A2   preserved
              A3                         A3   preserved
      
           D0=$14 MT.SCLCK   sets the clock
              Call parameters            Return parameters
              D1.L time in seconds       D1.L time in seconds
              D2                         D2   ?
              D3                         D3   ?
              A0                         A0   ?
              A1                         A1   preserved
              A2                         A2   preserved
              A3                         A3   preserved
      
           D0=$15 MT.ACLCK   adjust the clock
              Call parameters            Return parameters
              D1.L adjustment in seconds D1.L time in seconds
              D2                         D2   ?
              D3                         D3   ?
              A0                         A0   ?
              A1                         A1   preserved
              A2                         A2   preserved
              A3                         A3   preserved
      
           D0=$16 MT.ALBAS   allocate Basic programm area
              Call parameters            Return parameters
              D1.L no. of bytes required D1.L number of bytes allocated
              D2                         D2   ?
              D3                         D3   ?
              A0                         A0   ?
              A1                         A1   ?
              A2                         A2   ?
              A3                         A3   ?
              A6   base address          A6   new base address
              A7   USP                   A7   new USP
              Errors : OM
      
           D0=$17 MT.REBAS   release Basic programm area
              Call parameters            Return parameters
              D1.L no. of bytes          D1.L number of bytes released
              D2                         D2   ?
              D3                         D3   ?
              A0                         A0   ?
              A1                         A1   ?
              A2                         A2   ?
              A3                         A3   ?
              A6   base address          A6   new base address
              A7   USP                   A7   new USP
      
           D0=$18 MT.ALCHP   allocate common heap area
              Call parameters            Return parameters
              D1.L no. of bytes required D1.L number of bytes allocated
              D2.L owner job ID          D2   ?
              D3                         D3   ?
              A0                         A0   base address of area
              A1                         A1   ?
              A2                         A2   ?
              A3                         A3   ?
              Errors : OM,NJ
      
           D0=$19 MT.RECHP   release common heap area
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   ?
              D3                         D3   ?
              A0.L base of area to free  A0   ?
              A1                         A1   ?
              A2                         A2   ?
              A3                         A3   ?
      
           D0=$1A MT.LXINT   links in an external interrupt service routine
              Call parameters            Return parameters
              D1                         D1   preserved
              D2                         D2   preserved
              D3                         D3   preserved
              A0.L address of link       A0   preserved
              A1.L entry address         A1   ?
                   A1 -> 4(A0) !
              A2                         A2   preserved
              A3                         A3   preserved
      
           D0=$1B MT.RXINT   remove external interrupt routine from list
              Call parameters            Return parameters
              D1                         D1   preserved
              D2                         D2   preserved
              D3                         D3   preserved
              A0.L address of link       A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
      
           D0=$1C MT.LPOLL   link in 50/60 Hz poll routine
              Call parameters            Return parameters
              D1                         D1   preserved
              D2                         D2   preserved
              D3                         D3   preserved
              A0.L address of link       A0   preserved
              A1.L entry address         A1   ?
                   A1 -> 4(A0) !
              A2                         A2   preserved
              A3                         A3   preserved
      
           D0=$1D MT.RPOLL   remove 50/60 Hz routine from list
              Call parameters            Return parameters
              D1                         D1   preserved
              D2                         D2   preserved
              D3                         D3   preserved
              A0.L address of link       A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
      
           D0=$1E MT.LSCHD   links in a scheduler loop task
              Call parameters            Return parameters
              D1                         D1   preserved
              D2                         D2   preserved
              D3                         D3   preserved
              A0.L address of link       A0   preserved
              A1.L entry address         A1   ?
                   A1 -> 4(A0) !
              A2                         A2   preserved
              A3                         A3   preserved
      
           D0=$1F MT.RSCHD   remove scheduler loop task from list
              Call parameters            Return parameters
              D1                         D1   preserved
              D2                         D2   preserved
              D3                         D3   preserved
              A0.L address of link       A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
      
           D0=$20 MT.LIOD    links in I/O device driver
              Call parameters            Return parameters
              D1                         D1   preserved
              D2                         D2   preserved
              D3                         D3   preserved
              A0.L address of link       A0   preserved
              A1.L entry address         A1   ?
                   A1 -> 4(A0) !
              A2                         A2   preserved
              A3                         A3   preserved
      
           D0=$21 MT.RIOD    remove I/O device driver from list
              Call parameters            Return parameters
              D1                         D1   preserved
              D2                         D2   preserved
              D3                         D3   preserved
              A0.L address of link       A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
      
           D0=$22 MT.LDD     links in directory device driver
              Call parameters            Return parameters
              D1                         D1   preserved
              D2                         D2   preserved
              D3                         D3   preserved
              A0.L address of link       A0   preserved
              A1.L entry address         A1   ?
                   A1 -> 4(A0) !
              A2                         A2   preserved
              A3                         A3   preserved
      
           D0=$23 MT.RDD     remove directory device driver from list
              Call parameters            Return parameters
              D1                         D1   preserved
              D2                         D2   preserved
              D3                         D3   preserved
              A0.L address of link       A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
      
      	
    3. IO allocation TRAPs (#2)
          D0=$01 IO.OPEN    opens a channel for I/O
              Call parameters            Return parameters
              D1.L job ID                D1   job ID
              D2                         D2   preserved
              D3.L code where bit:       D3   preserved
                   0 = old exclusive
                   1 = old shared
                   2 = new exclusive
                   3 = new overwrite
                   4 = open Directory
              A0.L addresss of name      A0.L channel ID
              A1                         A1   preserved
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NO,NJ,OM,NF,EX,IU,BN
      
           D0=$02 IO.CLOSE   closes a channel
              Call parameters            Return parameters
              D1                         D1   preserved
              D2                         D2   preserved
              D3                         D3   preserved
              A0.L channel ID            A0   ?
              A1                         A1   preserved
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NO
      
           D0=$03 IO.FORMT   Format a sectored medium
              Call parameters            Return parameters
              D1                         D1.W good sectors
              D2                         D2.W total sectors
              D3                         D3   preserved
              A0.L pointer to name       A0   ?
              A1                         A1   preserved
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : OM,FF,NF,IU
      
           D0=$02 IO.CLOSE   closes a channel
              Call parameters            Return parameters
              D1.L job ID                D1   ?
              D2                         D2   preserved
              D3                         D3   ?
              A0.L pointer to name       A0   ?
              A1                         A1   ?
              A2                         A2   ?
              A3                         A3   preserved
              Errors : NO,OM,NF,BN
      	
    4. IO utilisation TRAPs (#3)
           TRAP #3  IO calls [ MOVEQ #??,D0 .... TRAP #3 ]
           D0=$00 IO.PEND     Checks for pending input
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO,EF
      
           D0=$01 IO.FBYTE    Fetch a byte
              Call parameters            Return parameters
              D1                         D1.B byte fetched
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO,EF
      
           D0=$02 IO.FLINE    Fetch a line of character terminated by 
              Call parameters            Return parameters
              D1                         D1.W number of bytes fetched
              D2.W length of buffer      D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1.L base of buffer        A1   updated pointer to buffer
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO,EF,BO
      
           D0=$03 IO.FSTRG    Fetches a string of bytes
              Call parameters            Return parameters
              D1                         D1.W number of bytes fetched
              D2.W length of buffer      D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1.L base of buffer        A1   updated pointer to buffer
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO,EF
      
           D0=$04 IO.EDLIN    edits a line of characters
              Call parameters            Return parameters
              D1.L cursor/line length    D1.L cursor/line length
              D2.W length of buffer      D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1.L pointer to EOL        A1   pointer to end of line
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO,BO
      
           D0=$05 IO.SBYTE    sends a byte
              Call parameters            Return parameters
              D1.B byte to be sent       D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO,DF,OR
      
           D0=$06 illegal System call
           D0=$07 IO.SSTRG    sends a string of bytes
              Call parameters            Return parameters
              D1                         D1.W number of bytes sent
              D2.W number of bytes       D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1.L base of buffer        A1   updated pointer to buffer
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO,DF
      
           D0=$08 illegal System call
           D0=$09 IO.EXTOP    invoke additional routines as part of screen driver
           D0=$0A SD.PXENQ    return window size and cursor position (pixel)
              Call parameters            Return parameters
              D1                         D1   preserved
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1.L base of buffer        A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
              0(A1) = X-dimension of window
              2(A1) = Y-dimension of window
              4(A1) = X-position of cursor
              6(A1) = Y-position of cursor
      
           D0=$0B SD.CHENQ    return window size and cursor position (character)
              Call parameters            Return parameters
              D1                         D1   preserved
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1.L base of buffer        A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
              0(A1) = X-dimension of window
              2(A1) = Y-dimension of window
              4(A1) = X-position of cursor
              6(A1) = Y-position of cursor
      
           D0=$0C SD.BORDR    sets the border with and colour
              Call parameters            Return parameters
              D1.B colour                D1   ?
              D2.W width                 D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1.L                       A1   preserved
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
      
           D0=$0D SD.WDEF     redifines a window
              Call parameters            Return parameters
              D1.B border colour         D1   ?
              D2.W border width          D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1.L base of buffer        A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO,OR
              0(A1) = X-dimension of window
              2(A1) = Y-dimension of window
              4(A1) = X-origin
              6(A1) = Y-origin
      
           D0=$0E SD.CURE     enables the cursor
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
      
           D0=$0F SD.CURS     suppress the cursor
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
      
           D0=$10 SD.POS      positionm cursor at row, column (character)
              Call parameters            Return parameters
              D1.W column number         D1   ?
              D2.W row number            D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO,OR
      
           D0=$11 SD.TAB      position cursor at column
              Call parameters            Return parameters
              D1.W column number         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO,OR
      
           D0=$12 SD.NL       new line
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO,OR
      
           D0=$13 SD.PCOL     previus column
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO,OR
      
           D0=$14 SD.NCOL     next column
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO,OR
      
           D0=$15 SD.PROW     previus row
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO,OR
      
           D0=$16 SD.NROW     next row
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO,OR
      
           D0=$17 SD.PIXP     position cursor using pixel coordinates
              Call parameters            Return parameters
              D1.W X-coordinate          D1   ?
              D2.W Y-coordinate          D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO,OR
      
           D0=$18 SD.SCROL    Scroll all of a window
              Call parameters            Return parameters
              D1.W distance to scroll    D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
      
           D0=$19 SD.SCRTP    scroll the top of a window
              Call parameters            Return parameters
              D1.W distance to scroll    D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
      
           D0=$1A SD.SCRBT    scroll the bottom of a window
              Call parameters            Return parameters
              D1.W distance to scroll    D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
      
           D0=$1B SD.PAN      Pans all of a window
              Call parameters            Return parameters
              D1.W distance to pan       D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
      
           D0=$1C illegal system call
           D0=$1D illegal system call
           D0=$1E SD.PANLN    pans cursor line
              Call parameters            Return parameters
              D1.W distance to pan       D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
      
           D0=$1F SD.PANRT    pans right hand end of cursor line
              Call parameters            Return parameters
              D1.W distance to pan       D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
      
           D0=$20 SD.CLEAR    clears all of a window
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
      
           D0=$21 SD.CLRTP    clears the top of a window
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
      
           D0=$22 SD.CLRBT    clears the bottom of a window
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
      
           D0=$23 SD.CLRLN    clears the cursor line
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
      
           D0=$24 SD.CLRRT    clears the right hand end of the cursor line
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
      
           D0=$25 SD.FOUNT    sets or resets the character fount
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1   base of font          A1   ?
              A2   base of second font   A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
              Format of Font:
                 $00      lowest valid character
                 $01      number of valid characters-1
                 $02..$0A 9 bytes of pixels for 1st character
                 $0B..$13 9 bytes of pixels ...
      
           D0=$26 SD.RECOL    recolours a window
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1   ptr to colour list    A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
              The colour list consists of 8 bytes, which contain the new
              colour for each old colour
      
           D0=$27 SD.SETPA    sets Paper colour
              Call parameters            Return parameters
              D1.B colour                D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
      
           D0=$28 SD.SETST    sets Strip colour
              Call parameters            Return parameters
              D1.B colour                D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
      
           D0=$29 SD.SETIN    sets ink colour
              Call parameters            Return parameters
              D1.B colour                D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
      
           D0=$2A SD.SETFL    sets flashing
              Call parameters            Return parameters
              D1.B flash attribute       D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
      
           D0=$2B SD.SETUL    sets Underlining
              Call parameters            Return parameters
              D1.B underline attribute   D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
      
           D0=$2C SD.SETMD    sets character writing or plotting mode
              Call parameters            Return parameters
              D1.W mode                  D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
              modes: -1=XOR , 0=Ink on strip , 1=ink on transparent
      
           D0=$2D SD.SETSZ    set character size and spacing
              Call parameters            Return parameters
              D1.W char width/spacing    D1   ?
              D2.W char height/spacing   D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
              D1 = 0..3 (5 in 6, 5 in 8 , 10 in 12, 10 in 16)
              D2 = 0..1 (9 in 10 , 18 in 20)
      
           D0=$2E SD.FILL     fills a rectangular block within a window
              Call parameters            Return parameters
              D1.B colour                D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1   ptr to block def      A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
              0(A1) = width in pixel
              2(A1) = height in pixel
              4(A1) = X origin (relative to window)
              6(A1) = Y origin
      
           D0=$2F illegal system call
           D0=$30 SD.POINT    plots a point
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1   arithmetic stack ptr  A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
              0(A1) = Y coordinate (6 byte Float)
              6(A1) = X coordinate
      
           D0=$31 SD.LINE     plots a line
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1   arithmetic stack ptr  A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
              0(A1) = Y coordinate end of line (6 byte Float)
              6(A1) = X coordinate EOL
              C(A1) = Y start
              12(A1) = X start
      
           D0=$32 SD.ARC      plots an arc
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1   arithmetic stack ptr  A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
              0(A1) = angle (6 byte Float)
              6(A1) = Y end
              C(A1) = X end
              12(A1) = Y start
              18(A1) = X start
      
           D0=$33 SD.ELLIPS   plots an ellipse
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1   arithmetic stack ptr  A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
              0(A1) = angle (6 byte Float)
              6(A1) = radius
              C(A1) = eccentricity
              12(A1) = Y centre
              18(A1) = X centre
      
           D0=$34 SD.SCALE    sets window scale
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1   arithmetic stack ptr  A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
              0(A1) = Y coordinate bottom line (6 byte Float)
              6(A1) = X coordinate left hand pixel
              C(A1) = length of Y axis
      
           D0=$35 SD.FLOOD    turns area flood on and off
              Call parameters            Return parameters
              D1.L 0/1                   D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
      
           D0=$36 SD.GCUR     sets graphics cursor position
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1   arithmetic stack ptr  A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
              0(A1) = grafics X coordinate (6 byte Float)
              6(A1) = grafics Y coordinate
              C(A1) = pixel offset to the right
              12(A1) = piixel offset downwards
      
           D0=$37 illegal system call
           D0=$38 illegal system call
           D0=$39 illegal system call
           D0=$3A illegal system call
           D0=$3B illegal system call
           D0=$3C illegal system call
           D0=$3D illegal system call
           D0=$3E illegal system call
           D0=$3F illegal system call
           D0=$40 FS.CHECK    checks all pending operations on a file
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
      
           D0=$41 FS.FLUSH    flushes buffer for file
              Call parameters            Return parameters
              D1                         D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
      
           D0=$42 FS.POSAB    position file pointer absolute
              Call parameters            Return parameters
              D1.L position in file      D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO,EF
      
           D0=$43 FS.POSRE    position file pointer relative
              Call parameters            Return parameters
              D1.L offset to file ptr    D1   ?
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1                         A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO,EF
      
           D0=$44 illegal system call
           D0=$45 FS.MDINF    Gets information about storage medium
              Call parameters            Return parameters
              D1                         D1   empty/good sectors
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1   ptr to 10 byte buffer A1   end of medium name
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
      
           D0=$46 FS.HEADS    sets the file header
              Call parameters            Return parameters
              D1                         D1   lenght of header set
              D2                         D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1   base of header block  A1   end of header definition
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO
              00 file length
              04 file access
              05 file type (0=data , 1=executable)
              06 8 byte type dependent information (size of dataspace)
              0E length of file name
              10 up to 36 characters of file name
              34 date information
      
           D0=$47 FS.HEADR    reads the file header
              Call parameters            Return parameters
              D1                         D1   ?
              D2.W bufer length          D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1   ptr to read buffer    A1   ?
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NC,NO,BO
      
           D0=$48 FS.LOAD     loads a file into memory
              Call parameters            Return parameters
              D1                         D1   ?
              D2.L length of file        D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1   address for load      A1   top address after load
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : NO
      
           D0=$49 FS.SAVE     saves a file from memory
              Call parameters            Return parameters
              D1                         D1   ?
              D2.L length of file        D2   preserved
              D3.W timeout               D3   preserved
              A0.L channel ID            A0   preserved
              A1   ptr to data           A1   top address of file
              A2                         A2   preserved
              A3                         A3   preserved
              Errors : DF,NO
      	
    5. relative to A6 TRAP (#4)
      makes the next IO trap relative to A6 (for BASIC)
    6. Vectored utilities
           Vectored utilities [ MOVEA.W $???,An      JSR (An)]
      	(from original text --> !! Excuse me, I give up here. Everybody, who is interested is invited to complete this Manual and send the updated Version to me.)
           0C0 MM.ALCHP allocate common heap (D1)
           0C2 MM.RECHP release common heap
           0C4 UT.WINDW Set up window
           0C6 UT.CON   set up a console window
           0C8 UT.SCR   set up screen window
           0CA UT.ERR0  write error message to #0
           0CC UT.ERR   write error message to a channel
           0CE UT.MINT  convert integer to ASCII
           0D0 UT.MTEXT send message to a channel
           0D2 UT.LINK  link intem into list
           0D4 UT.UNLNK unlink item from list
           0D6 illegal Vector !
           0D8 MM.ALLOC allocate area in a  heap
           0DA MM.LNKFR Links free space into heap
           0DC IO.QSET  set up a queue
           0DE IO.QTEST test queue status
           0E0 IO.QIN   put byte into a queue
           0E2 IO.QOUT  Extract a byte frrom a queue
           0E4 IO.QEOF  put EOF marker into queue
           0E6 UT.CSTR  compare two strings
           0E8 IO.SERQ  direct queue handling
           0EA IO.SERIO General IO handling
           0EC CN.DATE  get date and time
           0EE CN.DAY   get day of week
           0F0 CN.FTOD  convert float to ASCII
           0F2 CN.ITOD  convert Integer to ASCII
           0F4 CN.ITOBB convert binary byte to ASCII
           0F6 CN.ITOBW convert binary word to ASCII
           0F8 CN.ITOBL convert binary long word to ASCII
           0FA CN.ITOHB convert hex byte to ASCII
           0FC CN.ITOHW convert hex word to ASCII
           0FE CN.ITOHL convert hex long word to ASCII
           100 CN.DTOF  convert ASCII to float
           102 CN.DTOI  convert ASCII to integer
           104 CN.BTOIB convert ASCII to binary byte
           106 CN.BTOIW convert ASCII to binary word
           108 CN.BTOIL convert ASCII to binary long word
           10A CN.HTOIB convert ASCII to hex byte
           10C CN.HTOIW convert ASCII to hex word
           10E CN.HTOIL convert ASCII to hex long word
           110 BP.INIT  basic procedure initialization
           112 CA.GTINT Get integers from basic
           114 CA.GTFP  Get floats from basic
           116 CA.GTSTR Get strings from basic
           118 CA.GTLIN Get long integers from basic
           11A BV.CHRIX reserve space on arithmetic stack
           11C RI.EXEC  Executes an arithmetic operation
           11E RI.EXECB execute list of arithmetic operations
           120 BP.LET   return basic parameter value
           122 IO.NAME  decode a device name
           124 MD.READ  read a sector on a microdrive
           126 MD.WRITE write a sector on a microdrive
           128 MD.VERIN verify a sector on a microdrrive
           12A MD.SECTR read a sector header on a microdrive
           12C ANA_SYNX basic syntax analyser
           12E TB_LIST  first syntax table
           130 EXP_SYNX expression syntax table
           132 FMT_LINE format precompiled line
           134 COMP_ERR error when compiling
           136 STO_LINE store precompiled line
           138 TKN_LIST convert precompiled line to ASCII
           13A INI_STCK initialize basic stacks
      	
    7. System Variables ($28000+??)
           00 SV.IDENT Identification
           02          extension flag 0:open path,1:OV error,2:No Clear ALCHP
           03          CIA-A ICR
           04 SV.CHEAP Base of common heap
           08 SV.CHPFR First free space in common heap
           0C SV.FREE  Base of free area
           10 SV.BASIC Base of BASIC stack
           14 SV.TRNSP Base of transient program area
           18 SV.TRNFR First free space in TPA
           1C SV.RESPR Base of RESPR
           20 SV.RAMT Top of RAM(+1)
           2E SV.RAND Random number(constantly changing)
           30 SV.POLLM Count of poll interrupts missed
           32 SV.TVMOD 0 if not TV display
           34 SV.MCSTA MC status register
           35 SV.PCINT PC interrupt register
           37 SV.NETNR Network station number
           38 SV.I2LST list of INT2 drivers
           3C SV.PLIST list of 50 Hz routines
           40 SV.SHLIST List of scheduler tasks
           44 SV.DRLST list of device drivers
           48 SV.DDLST list of directory device drivers
           4C SV.KEYQ  keyboard queue
           50 SV.TRAPV trap redirection table
           54 SV.BTPNT most recent slave block entry
           58 SV.BTBAS base of slave block table
           5C SV.BTTOP top of slave block table
           60 SV.JBTAG Current value of job tag
           62 SV.JBMAX Highest current job number
           64 SV.JBPNT current job table entry
           68 SV.JBBAS base of job table
           6C SV.JBTOP top of job table
           70 SV.CHTAG value of channel tag
           72 SV.CHMAX current channel number
           74 SV.CHPNT Pointer to last channel checked
           78 SV.CHBAS Pointer to base of channel table
           7C SV.CHTOP Pointer to top of channel table
           88 SV.CAPS  Caps lock
           8A SV.ARBUF Auto repeat buffer
           8C SV.ARDEL Autorepeat delay
           8E SV.ARFRQ Autorepeat 1/frequency
           90 SV.ARCNT Autorepeat count
           92 SV.CQCH  Taskswitc character(^C)
           94 SV.WP Write protect
           96 SV.SOUND Sound status
           98 SV.SER1C SER1 queue address
           9C SV.SER2C SER2 queue address
           A0 SV.TMODE ZX8032 transmit mode
           A2 SV.CSUB CAPSLOCK routine ! now changed to Clock offset !
           A6 SV.TIMO  Timeout for transmit
           A8 SV.TIMOV Value of switching timeout (2 chars.)
           AA SV.FSTAT Flashing cursor status
           F2          Amiga screen priority
           F4          Blitter server
      	
    8. Basic Variables (??(A6))
           00 BV.BFBAS buffer base
           04 BV.BFP buffer running pointer
           08 BV.TKBAS token list
           0C BV.TKP token list running pointer
           10 BV.PFBAS program file
           14 BV.PFP program running pointer
           18 BV.NBAS name table
           1C BV.NTP name table running pointer
           20 BV.NLBAS name list
           24 BV.NLP name list running pointer
           28 BV.VVBAS variable values
           2C BV.VVP variable values running pointer
           30 BV.CHBAS channel name
           34 BV.CHP channel name running pointer
           38 BV.RTBAS return table
           3C BV.RTP return table running pointer
           40 BV.LNBAS line number table
           44 BV.LNP line number running pointer
           48 BV.BTP backtrack stack
           4C BV.BTBAS backtrack running pointer
           50 BV.TGP temporary graph stack
           54 BV.TGBAS graph stack running pointer
           58 BV.RIP arithmetic stack
           5C BV.RIBAS arithmetic stack running pointer
           60 BV.SSP  system stack
           64 BV.SSBAS system stack running pointer
           68 BV.LINUM current line number
           6A BV.LENGTH current length
           6C BV.STMNT current statement on line
           6D BV.CONT  continue ($80) or stop (0) processing
           6E BV.INLIN Processing in the line clause or not
           6F BV.SING  Single line execution ON ($FF) or OFF (0)
           70 BV.INDEX Name tab row of last inlin lp index read
           72 BV.VVFREE First free space in vvtable
           76 BV.SSSAV Saved sp for out/mem to back to
           80 BV.RAND  Random number
           84 BV.COMCH Command channel
           88 BV.NXLIN Which line number to start after
           8A BV.NXSTM Which statement to start after
           8B BV.COMLN Command line saved ($ff) or not (0)
           8C BV.STOPN Which stop number set
           8E BV.EDIT  Program has been edited ($ff) or not (0)
           8F BV.BRK  There has been a break (0) or not ($80)
           90 BV.UNRVL Need to unravel ($ff) or not (0)
           91 BV.CNSTM Statement to CONTINUE from
           92 BV.CNLND Line to CONTINUE from
           94 BV.DALNO Current DATA line number
           96 BV.DASTM Current DATA statement number
           97 BV.DAITM Next DATA item to read
           98 BV.CNIND Inline loop index to CONTINUE with
           9A BV.CNINL Inline loop flag for CONTINUE
           9B BV.LSANY Whether checking list ($ff) or not (0)
           9C BV.LSBEF Invisible top line
           9E BV.LSBAS Bottom line in window
           A0 BV.LSAFT Invisible bottom line
           A2 BV.LENLN Length of window line
           A4 BV.MAXLN Max. number of window lines
           A6 BV.TOTLN Number of window line so far
           AA BV.AUTO  Whether AUTO/EDIT is on ($FF) or off (0)
           AB BV.PRINT Print from prtok ($ff) or leave in buffer
           AC BV.EDLIN Line number to edit next
           AE BV.EDINC Increment on edit range
           E0          Toolkit 2 ALCHP
           EC          QLIB_RUN
      	
    9. error codes and messages
           Errors are returned in D0 throughout the whole system.
           If D0 is set to 0, then no error has occured. Any negative number
           means that the operation has errored.
           -1   ERR.NC  Not complete
           -2   ERR.NJ  Invalid Job
           -3   ERR.OM  out of memory
           -4   ERR.OR  out of range
           -5   ERR.BO  Buffer full
           -6   ERR.NO  Channel not open
           -7   ERR.NF  Not found
           -8   ERR.EX  already exists
           -9   ERR.IU  in use
           -10  ERR.EF  end of file
           -11  ERR.DF  drive full
           -12  ERR.BN  bad name
           -13  ERR.TE  Xmit error
           -14  ERR.FF  Format failed
           -15  ERR.BP  bad parameter
           -16  ERR.FE  bad medium
           -17  ERR.XP  error in expression
           -18  ERR.OV  overflow
           -19  ERR.NI  not implemented
           -20  ERR.RO  read only
           -21  ERR.BL  bad line
      	
    10. Channel definition block
    11. File system channel definition block
    12. Job control block
    13. common heap header
    14. Window block definition
  5. Software overview
      Toolkits
           T.Tebby Toolkit 2                  [Qjump]
              This Toolkit is allmost essential for Working with QDOS.
              You should not try to use QDOS without this particular
              Toolkit! It provides you with JOB handling and parameter passing
              facilities, a full screen BASIC editor, a command line stack,
              wildcard file functions, default devices, definable keys
              and many other usefull commands. QDOS without the Toolkit 2 is
              unusable. Unfortunately this Toolkit is NOT public domain,
              otherwise I would have included it in this Package.
              ---- IMPLEMENTATION  NOTES -----
              This Toolkit is available as pure and unprotected software
              package, but it contains !!!!! TAS instructions !!!!!
              First load this Toolkit with
              adr=RESPR(16*1024):LBYTES FLP1_toolkit_cde,adr:CALL adr
              then let TAS_REPLACER_BAS do its work:
              LRUN FLP1_TAS_REPLACER_BAS     (automatic replace will do)
              After this you will have a new version of the Toolkit, which
              does not contain the TAS instructions. Only use this version
              from now on.
      
          T.Tebby pointer interface and Window manager    [Qjump]
              For those, who miss the Workbench and the mousehandling on QDOS
              this programm may be the most important thing directly behind
              the 68000 CPU inside the Computer. For others it is only a hinderance.
              You have to decide on your own. But there are some programs
              available now, which would not work without the pointer interface.
              Mostly these programs are as redundant as the pointerinterface
              itself, but you may have another opinion.
              ---- IMPLEMENTATION NOTES ----
              You have to remove TAS instructions from PTR_GEN. (automatic mode)
              The other files (WMAN, PTK_BIN, QRAM) must not be changed !
      
          T.Tebby Ramdisk                                 [QJUMP]
              It comes normally together with the pointer environment and
              the QRAM kind of 'workbench'. I can not remember, if it
              contains TAS instructions, but it behaves a little bit
              strange, when you try to format the RAM disk. so only
              use it as dynamic ramdisk. If you really need a fixed
              ramdisk, try the commonly used RAM_bin.
      
          Giga-BASIC                                      [ABC elektronik]
              Some useful and a lot of superflous commands.
              Mostly concerned with mouse and menue handling.
              Problems with compiler
      	
    1. Languages
          QLiberator (BASIC compiler)          [Liberation Software]
              This particular compiler has nearly the same degree of usefullness
              as the T.Tebby toolkit. The compiled programs are not among the
              fastest, but this compiler can compile allmost every program,
              it includes any M-Code toolkits in the object file, and produces
              small code when using the resident runtime library.
              The compiled programs can be linked as resident toolkits to the
              interpreter, the procedures can made accessable from BASIC
              including  parameterpassing.
              ---- IMPLEMENTATION  NOTES -----
              This compiler is available as pure and unprotected software
              package, but the library contains !!!!! TAS instructions !!!!!
              use TAS_REPLACER_BAS to get around this problem. Afterwards
              you can compile TAS_REPLACER_BAS.
      
          Turbo (BASIC compiler)               [Digital Precision]
              Is much faster than the Qliberator, but can not pass parameters
              back to the caller, and has a lot of small bugs and
              incompatibilities. Nevertheless it would be nice if the Turbo
              compiler would work with QDOS-Amiga, but up to now it
              does not work, and the reason is still unknown. Some Programs
              which are available for QDOS are compiled with Turbo, and
              these programs have often (but by far not allways) the same
              strange behaviour as the Turbo compiler itself.
              Supercharge was an ancestor of Turbo with a very remarkable
              copy protection 'device'. You must have seen it !
              Turbo itself is not protected anymore.
      
          FORTRAN 77 and PASCAL         [Prospero Software]
              These are the QDOS Versions of the widely used Prospero
              compilers, which give you access to all QDOS functions,
              and have only a few minor bugs (in my Version the Double
              Precision Arithmetic makes problems, when passed through
              Functions). They are using QDOS standard relocatable format
              and are linked with the same Linker which comes with the
              GST Macro assembler, and the GST QC compiler.
              Unfortunately there is a little handicap:
              The protection against copying consists of an EPROM which also
              contains parts of the runtime library.
              To get around this problem, you can use the supplied PRL
              (Prospero Resident Library) in RAM, but you have to
              reload it after every pass of the compiler. See example
              on the QDOS disk (F77_BAS). The supplied compiler supervisor
              does not work on the Amiga anyway.
      
          Computer one PASCAL                    [Computer one]
              It is in general a usefull PASAL compiler with a sort of
              integrated environment. It can generate executable Jobs
              in the new Version, but it is still a P-code Pascal.
              String handling is not implemented.
              This Compiler only works with !!! less than 1MB RAM  !!!
      
          Metacomco PASCAL                       [Metacomco]
              Forget it !
      
          Lattice C                              [Metacomco]
              The only full scale C implementation for the QL.
              Some Bugs are still alive, and the Floatingpoint  arithmetic
              is terribly slow. It uses QDOS standard relocatable format
              and not Metacomcos own format. As with Lattice standard #ASM
              is not allowed, you have to write M-Code programs separately.
              ---- IMPLEMENTATION  NOTES -----
              The protection against piracy consists of an 8K EPROM which
              occupies addresses $C000 - $FFFF, mirrored at $E000.
              Make a copy from a normal QL with
              SBYTES FLP1_QLC_ROM,48*1024,16*1024
              This file can then be loaded on the Amiga at the same address.
              Use ini_EPROM_BAS to initialize the EPROM.
      
          QC                                     [GST]
              An integer C without STRUCTures and and UNIONs, containing
              some bugs, but allows for #ASM to be used.
              I have written some procedures to implement Floatingpoint
              Arithmetic, but it is still a torture to work with FParithmetic.
              Consider it as an interesting alternative for Assembler. The
              GST macro assembler can be used to translate the output from
              this compiler. Not tested on QDOS-Amiga.
      
          Digital C                              [Digital Precision]
              Integer C without STRUCTures, UNIONs and #ASM. restricted to
              32 Kbyte code. Derived from a Public Domain C for CP/M.
              Superflous, Not tested on QDOS-Amiga.
      
          BCPL                                   [Metacomco]
              It was the first Compiler for QDOS. BCPL is an ancestor of C.
              Floatingpoint arithmetic is implemented using procedures,
              and thus is difficuld to use. For those who like such Veterans,
              it may well be worth to have a look at this compiler.
              It uses Metacomcos special linker.
              Runs without problems on QDOS-Amiga.
      
          LISP                                   [Metacomco]
              A very special Version of LISP. Don't ask me to which
              standard it belongs, but it is not related to common LISP.
              Graphics and QDOS facilities are implemented.
              Runs without problems on QDOS-Amiga.
      
          FORTH-83                               [Computer one]
              For those who like to work with pocket calculators on
              big computers, this may be the ultimate solution.
              Multitasking, graphics, floatingpoint arithmetics and
              QDOS access are integrated.
              Runs without problems on QDOS-Amiga.
      
          FORTH                                  [Digital Precision]
              Another Forth. Try which you like more. I have not
              tested it, since I'm not interested in Forth anyway.
      
          GST Macro Assembler                    [GST]
              The only really professional Assembler !
              Macro facilities far beyond the standard !
              Produces standard QDOS relocatable Format, is small and fast.
              The only assembler which was able to translate QDOS and
              produce a running program. Included in the Test were some
              Amiga assembler (for example the Atztec assembler).
              Runs without problems on QDOS-Amiga.
      
          Metacomco Assembler                    [Metacomco]
              Very big (3 overlays), very  slow, lots of bugs.
              The only reason for using this assembler may be to link
              M-Code routines to other Metacomco programs, since the
              Linker for all Metacomco programs are compatible.
              I have not tested this assembler on QDOS-Amiga.
      
          Computer one Assembler                 [Computer one]
              Fast, small, no Macros, no linker.
              Not tested on QDOS-Amiga.
      
          GenQL                                  [HiSoft]
              Together with the MonQL monitor and a special editor it
              is a kind of integrated environment. A usefull Program.
              Not tested on QDOS-Amiga.
      	
    2. Utilities
          EDITOR                                    [Eddy Yeung]
              This editor comes together with the Assembler Workbench.
              It is related in most functions to the well known (at least
              for Amiga users) Metacomco ED, but much faster. Macros
              are not provided. It is my favorite Editor.
              Runs without problems on QDOS-Amiga.
      
          ED                                        [Metacomco]
              You should know it from the Amiga.
              Runs on QDOS-Amiga wihout problems.
      
          C1Edit                                    [Computer one]
              This editor is supplied with all Computer one programs.
              It is menue driven, but not very advanced. The only good
              reason for using it may be the error message include from
              Computer one compilers.
              Runs without problems on QDOS-Amiga.
      
          EDIT                                      [Digital Precision]
              Very advanced editor, including a lot of macro features.
              Compiled SuperBASIC, very big. I have heard of some hard
              Bugs, when it comes to save a file !
              Not tested on QDOS-Amiga.
      
          compiled Basic editors                    [weiss der Geier]
              there are a lot of other editors, which are mostly written
              in Superbasic and then compiled using the TURBO compiler.
              Among them are some, which make use of the Pointer interface.
              If you like to write programs with a mouse instead of the
              keyboard, try them.
      
          MAKE                                      [Qjump]
          Assembler Workbench                       [Eddy Yeung]
              Another kind of integrated environment for assembler programmers.
              It provides online Help and an inline assembler.
              Unfortunately protected against copying, and available only
              on Microdrive cartridges. The cracked Version runs on QDOS-Amiga.
      
          QMON monitor                              [Qjump]
              A nice M-Code monitor, available as ROM. It is a good tool
              to have allways by the hand, allthough I prefer the MONQL
      
          MonQL monitor                             [HiSoft]
              has a corresponding assembler (GenQL) and is in general
              the most usefull monitor/debugger for the QL. The only
              disadvantage with it is, that it can not cope with addresses
              longer than 20 bits. This means, that you can only debug
              programs in CHIP memory with the MonQL. Perhaps some day HiSoft
              makes a new Version for Atari/Amiga/Thor2 users. We will be
              gratefull.
      
          QL super sprite generator                  [Digital Precision]
          Super Media Manager                        [Digital Precision]
              Compiled SuperBASIC. May cause lots of troubles. The only
              usefull thing is the included description of how QDOS handles
              Disks. This is worth reading, the program is for nothing.
      
          Solution (MS-DOS emulator)                 [Digital Precision]
              Terribly slow ! But CGA graphics is included. It is said to
              be faster than the Amiga Transformer. There may be some trouble
              in reading disks. Not testet on QDOS-Amiga.
      
          CPMulator (CP/M emulator)
              Think of an 0.5 MHz Z80. Apart for some bugs, thats it.
              Not tested on QDOS-Amiga.
      	
    3. custom software
          Quill                                      [Psion]
              The original wordprocessor for QDOS. It was standard software,
              included in the price of the QL. I have written a Patch, which
              enables it to use any kind of character set. You can print your
              formatted text to a file and use any program for advanced
              character printing on normal matrix printers. I prefer the
              Public domain NLQ package.
              Runs on QDOS-Amiga without problems.
      
          Archive                                    [Psion]
              The original Data Base for QDOS. It was standard software,
              included in the price of the QL. Allthough not very advanced,
              and of course not able to handle pictures or sound, it may
              still be sufficient for most applications. (This is the kind
              of Data Base, which makes use of a special Language, which looks
              a litle bit like BASIC)
              Runs on QDOS-Amiga without problems.
      
          Easel                                      [Psion]
              The original Buisiness Graphic program for QDOS, included in
              the price of the QL. Allthough you may find better programs
              on the IBM (for example Boing graph) it is still state of the art.
              Runs on QDOS-Amiga without problems.
      
          Abacus                                     [Psion]
              The original Spreadsheet for QDOS, included in the price of
              the QL. It is not able to handle graphics, but still state
              of the art.
              Runs on QDOS-Amiga without problems.
      
          Exchange                                   [Psion]
              The combined Quill/Easel/Abacus/Archive program, able to
              multitask, including a 'Task Sequency Language', which allows
              to write macros for all 4  programs. You need memory expansion
              for using this program.
              Runs on QDOS-Amiga without problems.
      
          Text 87
              Advanced Word processor for QDOS. The new version runs without
              problemms on QDOS-Amiga, older Versions may cause trouble, since
              the zero divide trap is now handled  by QDOS, and it allways
              occured on the first versions.
      
          GraphiQL                                   [Talent]
              A picture drawing program for the low resolution mode.
              Protected against piracy. The cracked Version runs on QDOS-Amiga
      
          TechniQL                                   [Talent]
              Another drawing program for high resolution mode. It has
              interesting features, includes a plotter driver, and may
              well be worth using. But there is a little handicap.
              The cracked Version runs on QDOS-Amiga (with problems).
      
          QL Art
              It is a nice picture drawing program, but it will not run on
              QDOS-Amiga. This stupid copy protection...
      
          MPaint                                     [Medic Datasystems]
              The first picture drawing program for the QL which supported
              the mouse. It is a Basic program with some M-code extensions.
              The cracked and compiled Version runs on QDOS-Amiga (with problems)
      
          Page Designer
          Professional Desktop
      	
    4. Games
          Games are mostly protected against copying, and are available only
          on Microdrive cartriges. But if you get a cracked Version of a game
          on a Floppydisk, here is a List of games, which may give you a survey.
      
         Chess                                       [Psion]
              Really good, a classic, but as far as I have tested it, it will
              never run on the Amiga. It contains TAS instructions and attempts
              to change the contents of the operatingsystem ROM,
              which is now RAM !!!
      
         Match (Tennis)                              [Psion]
              Another classic, it works on the Amiga, but is too fast
              for playing, since the QL had only 1/4 of the Speed.
      
         QL Cavern                                   [JMF]
              Grafic adventure (not comparable of course to Amiga games)
              Not too stuid, runs with modifications (Interrupts must be
              enabled !!!!!)  on the Amiga
      
         QL Flight  simulator                         [I don't know]
              HaHaHa
      
         QL Hyperdrive                                [doesn't matter]
              Is running but boring