QDOS Internals

Anything you never knew you wanted to know about the Sinclair QL.

User Tools

Site Tools



Suspend an existing job. (ok, how do I suspend a non-existing job then? LOL)

Call ParametersReturn Parameters
D0.B$08D0.LError code.
D1.LId of the job to be suspended. -1 indicates the current job. D1.LPreserved. Unless the job id of -1 was used on entry, in which case the return value is the job id of the current job.
D3.WTimeout period in frames. -1 indicates indefinite suspension.D3.LPreserved.
A0.LUnused. A0.LBase address of suspended job.
A1.LAddress of the flag byte (see below) or zero. A1.LPreserved. (or is it? See notes below.).


ERR_NJInvalid job id.


  • All registers not shown above are not used on entry and are preserved on exit.
  • A1.L is documented as being preserved, but personal experience has shown that it is not always preserved.
  • The value in D3.W is stored in the job's header at JB_STAT.
  • The value in A1.L is stored in the header at JB_HOLD. The flag byte at (A1) will be cleared when the job is released (unsupended) again.
  • A frame period is 1/50th of a second in UK/Europe but 1/60th in the USA.
  • If the job being suspended is already suspended, then the current suspend period is changed to the new one, and the job is re-suspended for the new period of time in full.
  • This trap always exits via the job scheduler, so it is not atomic.


The following shows the use of this call :

        moveq   #mt_susjb,d0    ; Trap code
        moveq   #-1,d1          ; Suspend myself
        moveq   #50,d3          ; Suspend for 50 frames
        suba.l  a1,a1           ; No flag byte required
        trap    #1              ; Suspend the job
        <Do stuff here whan the suspension is over>
qdosmsq/traps/trap_1/ssjb.txt · Last modified: 2021/04/26 13:57 by superuser