This shows you the differences between two versions of the page.

Link to this comparison view

qdosmsq:traps:trap_1:spjb [2008/07/25 11:26]
norman created
qdosmsq:traps:trap_1:spjb [2015/09/18 07:47] (current)
george.gwilt Correctly describe the return value in D1
Line 1: Line 1:
 +====== MT_PRIOR/SMS_SPJB ======
 +Set a job's priority.
 +^Call Parameters^^Return Parameters^^
 +|D0.B|$0B|D0.L|Error code.|
 +|D1.L|Id of the job to be prioritised.|D1.L|Preserved unless on entry it was -1 in which case it will become the Id of the current job.|
 +|D2.B|Job's new priority. See notes below.|D2.L|Preserved.|
 +|A0.L|Unused. |A0.L|Base address of prioritised job.|
 +===== Errors =====
 +|ERR_NJ|Invalid job id.|
 +===== Notes =====
 +  * All registers not shown above are not used on entry and are preserved on exit.
 +  * The priority passed in D2.B is documented as being in the range 0 to 127, however, it appears that values from 0 to 255 can be used.
 +  * This trap always exits via the job scheduler, so it is not atomic.
 +  * //Note to self//. Check D3.W. Should there not be a timeout on this trap call? My notes say is D3.W unused on entry and D3.L is preserved on exit. Doesn't seem right.
 +===== Example =====
 +The following shows the use of this call to change the priority of the
 +current job to a very low priority.
 +        moveq   #mt_prior,d0    ; Trap code
 +        moveq   #-1,d1          ; Change my own priority
 +        moveq   #1,d2           ; Set priority very low
 +        trap    #1              ; Change the priority
  • qdosmsq/traps/trap_1/spjb.txt
  • Last modified: 2015/09/18 07:47
  • by george.gwilt