.title IMAGEUP - Send an IMAGE_UP message to creator .library 'sys$share:lib' $iodef $jpidef $ssdef .psect IMAGEUP$$CODE,pic,usr,con,rel,lcl,shr,exe,nowrt,novec ;++ ; IMAGEUP - tell creator (via TMBU) that the image has ; started ok. This allows creator process to differentiate ; between image activation failures and failures of ; images due to image errors. ;-- $DEFINI IUP IUP_K_MSGTYP = ^xFFFF $DEF IUP_W_MSGTYP .blkw 1 $DEF IUP_W_MSGLEN .blkw 1 $DEF IUP_L_STATUS .blkl 1 $DEF IUP_L_PID .blkl 1 IUP_K_MSGLEN = . $DEF IUP_L_TMBU .blkl 1 $DEF IUP_L_TMBCHN .blkl 1 $DEF IUP_Q_MBNAM .blkq 1 IUP_K_MBLEN = 32 $DEF IUP_T_MBNAM .blkb IUP_K_MBLEN $DEF IUP_Q_IOSB .blkq 1 IUP_K_LENGTH = . $DEFEND IUP ASSUME IUP_W_MSGTYP EQ 0 ; msg must be the first thing in the block! .psect $$code mbafmt: .ascic /_MBA!UL:/ .entry IMAGEUP, ^m ; Allocate data frame subl #IUP_K_LENGTH,SP ;allocate that much space movl SP,r8 ;data frame pointer ; Initialize data frame movw #IUP_K_MSGTYP,IUP_W_MSGTYP(r8) movw #IUP_K_MSGLEN,IUP_W_MSGLEN(r8) movw #SS$_NORMAL,IUP_L_STATUS(r8) movzwl #IUP_K_MBLEN,IUP_Q_MBNAM(r8) movab IUP_T_MBNAM(r8),IUP_Q_MBNAM+4(r8) ; Build JPILST on stack movl SP,r9 ;save for stackwipe later clrq -(SP) moval IUP_L_PID(r8),-(SP) movl #!4,-(SP) clrl -(SP) moval IUP_L_TMBU(r8),-(SP) movl #!4,-(SP) moval (SP),r2 ;point for getjpi call ; Get the info $getjpiw_s - itmlst = (r2),- iosb = IUP_Q_IOSB(r8) movl r9,SP ;restore stack blbc r0,10$ movzwl IUP_Q_IOSB(r8),r0 blbs r0,20$ 10$: ret ; Check if termination mailbox specified 20$: tstl IUP_L_TMBU(r8) bneq 30$ movzwl #SS$_NOSUCHDEV,r0 ret ; Build a descriptor onstack for the mba format & do format 30$: pushab w^mbafmt+1 movzbl w^mbafmt,-(SP) movaq (SP),r2 ;point to descriptor $FAO_S - ctrstr = (r2),- outlen = IUP_Q_MBNAM(r8),- outbuf = IUP_Q_MBNAM(r8),- p1 = IUP_L_TMBU(r8) movl r9,SP ;restore stack blbc r0,40$ ;oops $assign_s - chan = IUP_L_TMBCHN(r8),- devnam = IUP_Q_MBNAM(r8) blbc r0,40$ $qiow_s - chan = IUP_L_TMBCHN(r8),- func = #IO$_WRITEVBLK,- iosb = IUP_Q_IOSB(r8),- p1 = IUP_W_MSGTYP(r8),- p2 = #IUP_K_MSGLEN blbc r0,40$ movzwl IUP_Q_IOSB(r8),r0 blbc r0,40$ $dassgn_s - chan = IUP_L_TMBCHN(r8) blbc r0,40$ movzwl #SS$_NORMAL,r0 40$: ret .end