On 13 Jan 2002, at 13:33, Dilwyn Jones wrote:

> 
> Any ideas how I could do this 'legally' in such a background job?
This is how I did it for az job that blzanks the screen if no 
keyborad/mouse activity after a certain time:

truejob   MULU      #$3C,D7             ; number of seconds
          BEQ.S     label3
          MOVEQ     #$0,D0
          TRAP      #$1                 ; get system info
          MOVE.L    A0,A6
          MOVE.L    $78(A6),A3          ; point to channel table
          MOVE.L    (A3),A3             ; point to channel def block for 
channel #0
          MOVE.L    4(A3),A3            ; point to device driver linkage 
block
label5    MOVE.W    $2E(A3),D4          ; D4 = pointer position
          MOVE.W    D7,D5               ; stock this
          MOVE.W    $8A(A6),D6          ; last key pressed
label4    MOVEQ     #-1,D1              ; suspend myself
          MOVEQ     #$31,D3             ; for one second
          SUBA.L    A1,A1               ; nothing
          MOVEQ     #$8,D0
          TRAP      #$1                 ; suspend job
          SUBQ.W    #1,D5
          BEQ.S     label3
          CMP.W     $8A(A6),D6
          BNE.S     label5
          CMP.W     $2E(A3),D4
          BEQ.S     label4
          BRA.S     label5


wolfgang

Hope this arrives OK

-----------------
www.wlenerz.com

Reply via email to