.Title AlvIdle Dummy Routine .Psect Alvin,Con,Gbl .Ident /LVL51 / ;;**************************************************************************** ;; AlvIdle is a routine called to initiate background processing activity ;; during states when there is no work for Alvin or the user program ;; to do, like when terminal input is not completed. Typically the ;; only routine which must be called from AlvIdle is the AlvUpdate ;; routine which processes things such as RT controlled terminal ;; input and output. This version of AlvIdle is the default which ;; only calls AlvUpdate. A User program can alternatively provide ;; an AlvIdle subroutine to do whatever chain of processing desired ;; with the restrictions that it cannot do terminal interaction, ;; it must return in a reasonable length of time, and it should call ;; AlvUpdate. ;; 25-Nov-85 DJ - For use in the RT forground or under TSX, time needs to ;; be alloted to other tasks. By doing a timed wait, other tasks ;; will have a chance to execute even though the Alvin/Aleda ;; task may be running at a high priority. Typically, Aleda is ;; interactive and waiting on input from the user or from some ;; device, therefore with a timed wait, Aleda will use only a ;; small portion of the available CPU time but will activate ;; frequently to see if something more can be done. This is now ;; the default Aleda library mode of operation. ;; ;; Expects calls of the form: Jsr Pc,AlvIdle ;; or Call AlvIdl ;; .Globl AlvUpdate .Mcall $Twait ;; AlvIdle:: $Twait 2 ; Wait for two clock ticks. ; (Twait is system independent: SJ,FB,TSX ; whether or not a timer is gen'ed in.) Jsr Pc,AlvUpdate ; After a wait, presume Alvin may need to ; move characters, update flow control, etc. Rts Pc ; Return to the blocked task. ;;**************************************************************************** .End