;+ ;;********************************************************************** .Psect AlvBrk,Gbl,Con .Sbttl Breakr Routine to transmit a break. ;;************** ;; BREAKR - Subroutine to initiate a break sequence to an output device. ;; The output device must have the SNDBRK bit set in the logical ;; control word of the device desc to allow the break to be sent. ;; Expects calls of the form: ;; JSR R5,BREAKR ;; .WORD (Alvin device descriptor address) ;- BREAKR:: MOV R2,-(SP) ;SAVE WORK REGISTERS MOV (R5)+,R2 ;GET PARM=OUTPUT DEVICE DESC ADR BIT #SNDBRK,LCTL(R2) ;IS DEVICE ENABLED TO SEND BREAKS? BEQ BREAKX ;NO, EXIT BIT #DISABLE+REQUEST+BRKREQ,(R2) ;Device available? BNE BREAKX ;NO, JUMP CLRB BRKREG(R2) ;SET BREAK COUNTER TO ZERO BIS #BRKREQ+REQUEST,(R2) ;YES, SET UP LOGICAL STATUS BIT #SEIZED,(R2) ;Is device seized? BEQ BREAKGO ;NO, BRANCH TO START THE BREAK BIC #REQUEST,(R2) ;YES, REMOVE REQUEST. BREAK ON INTRUPT BR BREAKX ;EXIT BREAKGO: MOV #SEIZED+BRKREQ+IGNORE,(R2) ;SEIZE LINE-OUT DEVICE MOV DEVADR(R2),R2 ;GET THE DEVICE ADDRESS MOV #101,(R2)+ ;SET INTERRUPT ENABLED & BREAK MOV #CAN1,(R2) ;SEND A CHAR FOR BREAK BREAKX: MOV (SP)+,R2 ;RESTORE REGISTERS RTS R5 ;AND RETURN