.TITLE mumble - Mumble-mode routines .IDENT /1.7/ .REM | *+ mumble - Mumble-mode routines File:mumble.mac Version: 1.7 Author: Last Edit: 31-MAY-1985 17:04:35 Last Update: 31-May-1985 17:07:38 fix logging parameters This module contains the mumble-mode subroutines MBLON, and MBLAST. These initiate, terminate, and monitor mumble mode. *- | .enable lc .LIBRARY /LB:[1,1]GLMAC.MLB/ .MCALL PUSH,POP,CALL .MCALL ASTx$s,Mrkt$,Dir$ .include /sclidat.mac/ .SBTTL LOCAL DATA .psect ldat,d,lcl,con ; ; use this psect for scratch storage - it is not guaranteed to be saved ; across calls to the module ; .psect data,d,gbl,con ; ; use this psect for module-specific data which must be retained across ; calls to the module ; log1: .word 0 ; tt num for logging log2: .word 0 ; another logging variable .psect dpbs,d,lcl,con ; ; this psect contains the static dpbs ; ; we need two mrkt dpbs, to prevent possibility of ast corrupting the ; one that non-ast is working with mrkt: mrkt$ ,mbltim,mbluni,mblast amrkt: mrkt$ ,mbltim,mbluni,mblast .PSECT ; code goes in the blank psect .SBTTL MBLON - Initiate mumble mode .REM | MBLON initiates mumble mode for the current tt. The current tt is pointed to by ttptr (defined by sclidat). CALL jsr,pc mblon INPUT ttptr -> tt record to be put in mumble mode OUTPUT tt placed in mumble mode, foo-count added to total for tt foo-count for tt cleared mumble-timer started for tt's efn REGS preserved | MBLON:: push mov ttptr, r0 ; point to tt-rec bis #fl.mbl, tt.flg(r0) ; set mumble mode add tt.foo(r0), tt.tot(r0) ; accumulate foo-count since ; last login clr tt.foo(r0) ; clear foo-count mov tt.efn(r0), ; set EFN dir$ #mrkt ; start foo timer mov tt.num(r0), log1 ; set for logging mov tt.tot(r0), log2 ; ... dolog 3, ; log mumble-on pop return .SBTTL MBLAST -- Mumble mode AST service routine .REM | MBLAST is entered upon expiration of the mumble-timer for a given tt. The associated tt is determined, and it's foo-count examined. Either the mumble-timer is perpetuated, or the tt is kicked out of mumble-mode. CALL AST service routine INPUT on stack: efn (remove before exit) OUTPUT if tt.foo > 0 mumble-timer restarted if tt.foo = 0 mumble-mode cleared in either case tt.foo added to tt.tot, then cleared REGS preserved | MBLAST: push mov #tttbl, r0 ; point to tt table 100$: cmp 4(sp), tt.efn(r0) ; this record? beq 200$ ; yes - br add #ttsiz, r0 ; bump pointer tst (r0) ; off end???!? bne 100$ ; no - loop ; ; where the ??? did this come from? - ignore it anyway ; br 500$ 200$: ; r0 -> tt associated with this timer tst tt.foo(r0) ; has it been quiet? beq 300$ ; yes - terminate mumble add tt.foo(r0), tt.tot(r0) ; accumulate total foo-count ; since last login mov 4(sp), ; set EFN dir$ #amrkt ; start foo timer again mov tt.num(r0), log1 ; set up for log entry mov tt.tot(r0), log2 ; total count dolog 3, ; make log entry br 400$ ; join common code 300$: ; terminal was quiet during mumble-time, clear mumble mode bic #fl.mbl, tt.flg(r0) ; clear mumble mode 400$: clr tt.foo(r0) ; clear foo-count 500$: pop ; restore regs tst (sp)+ ; clean efn off stack astx$s ; get back where you come from .end