Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!ucsd!ucbvax!DB0ADW11.BITNET!RZA31LH From: RZA31LH@DB0ADW11.BITNET (Lutz Hamann) Newsgroups: comp.lang.asm370 Subject: Re: Source for VMCF ext Int handler Message-ID: <9008291800.AA07219@ucbvax.Berkeley.EDU> Date: 29 Aug 90 18:00:43 GMT References: Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: IBM 370 Assembly Programming Discussion List Distribution: inet Organization: The Internet Lines: 143 X-Unparsable-Date: Wed, 29 Aug 90 09:01:06 MEZ Hi networkers | On Tue, 28 Aug 90 17:33:23 LCL Stelios Fragakis said: >Anyone out there with a sample piece of code, to handle VMCF external >interrupts ? > Thanks in advance ! > >- Stelios Here are some exsamples of routines, which should illustrate how the whole thing works (on our computer, VM/SP Rel.4) for years. I'm a little bit late because first I hat to translate all comments from german into english (next time, writing a routine, I'll do it in english |). Now here is an example for the main-routine : VMCFCALL MODUL 12 my own macro for opening a csect * * * * * Modification of control-reg.0 und VMCF-authorize * * * * * * * DMSKEY NUCLEUS LCTL 0,0,STREG0 set mask in controlreg. 0 DMSKEY RESET (you can use DMSEXS-macro too) VMCF AUTHORIZE,MSGID=SERV,PARM=PRMLST,BUF1=BUF,LEN1=120, * ERROR=RC4 EXTINT VMCFEXT macro for def. interrupt-routine * * * * * Returncodes * * * * * * * * * * * * * * * * * * * * * * * * RC0 EQU * LA 10,0 B EX RC4 EQU * LR 15,11 LINEDIT TEXT='Error authorizing VMCF / Rc= .... |', * DOT=NO,COMP=NO,SUB=(DEC,(11)) LA 10,4 * * * * * E x i t E x i t E x i t E x i t * * * * * * * * * * * EX EQU * LEAVE RC=(10) macro for leaving a csect * * * * * D a t a D a t a D a t a D a t a * * * * * * * * * * ENTRY BUF,PRMLST BUF VMCHEAD external interrupt-buffer (40 B) DC 80C' ' PRMLST VMCPARM Parameterlist for VMCF STREG0 DS 0F Control reg. 0 DC XL4'000000E1' END And now an example of handling an incoming external interrupt : VMCFEXT MODUL 12 My macro for opening a csect VMCF QUIESCE quiesce VMCF-interrupt * * * * * was it really an external interrupt by VMCF ? * * * * * * * * LH 2,26 Code of ext. interrupt R2 CH 2,X4001 VMCF-Code for interrupt ? BNE RC4 L 10,ABUF Addr. ext. interrupt-buffer R10 * * * * * look, what kind of VMCF-interrupt * * * * * * * * * * * * * * CLC 8(6,10),=C'SYSTEM' interrupt via SMSG ? BNE NOSMSG L 15,=V(HSMSG) BALR 14,15 call a routine for handling smsg B RC0 NOSMSG EQU * CLC 40(8,10),=CL8'TEXT1' Text1 in interrupt-buffer ? BE HTEXT1 CLC 40(8,10),=CL8'TEXT2' Text2 in interrupt-buffer ? BE HTEXT2 CLC 40(8,10),=CL8'TEXT3' Text3 ? (and so on) BE HTEXT3 L 15,=V(MOD4) BALR 14,15 Call Routine if undef. text B RC0 HTEXT1 EQU * ... ... handle text1 B RC0 HTEXT2 EQU * ... ... handle text2 B RC0 HTEXT3 EQU * ... ... handle text3 B RC0 * * * * * Returncodes * * * * * * * * * * * * * * * * * * * * * * * * * RC0 EQU * LA 11,0 B RESET RC4 EQU * LA 11,4 WRTERM 'No ext. interrupt by VMCF |' * * * * * E x i t E x i t E x i t E x i t * * * * * * * * * * * RESET EQU * XC 0(160,10),0(10) clear ext. interrupt buffer VMCF RESUME allow VMCF-interrupts LEAVE RC=(11) my own macro for leaving a csect * * * * * D a t a D a t a D a t a D a t a * * * * * * * * * * EXTRN BUF ABUF DS 0F Addr. of ext. interrupt-buffer DC A(BUF) X4001 DS 0H constant for VMCF-interrupt DC XL2'4001' END And last, but not least, the macro EXTINT : MACRO &L EXTINT &ROUT CNOP 0,4 defining a ext. interrupt-rout. BAL 1,S&SYSNDX DC CL8'TRAP' DC V(&ROUT.) S&SYSNDX SVC 202 DC AL4(*+4) MEND Hope this helps | Please, if you have questions, send it not directly to me, but through the list (we're not yet in the BITEARN NODES). Lutz Hamann