c program to bad and initialize a floppy via Profbi c puts the result on the message board, therefore c can be spawned c implicit integer(a-z) integer*2 status(8),dvsiz,attlst,attsiz byte dvspec(80),cmdmsg(36) INTEGER*4 NAME(3),DEVSTR(23),ender(5),error(4),ecode C equivalence (name(1),devstr(1)) equivalence (dvspec(1),devstr(4)) equivalence (ecode,error(4)) c parameter badreq=2,inireq=4 parameter cmdlen=34 c data attlst/0/,attsiz/0/,requst/2/ data name/'INIT','DZ -',' ** '/ data error/'Erro','r Co','de: ',' '/ data ender/'has ','been',' ini','tial','ized'/ c call getmcr(dvspec,status) mlen=status(1) d write(5,2) mlen d2 format(' status received was ',o7) if(mlen.le.0) goto 17 c c convert to upper case c do 3 i=1,mlen if(dvspec(i).ge.'a') dvspec(i)=dvspec(i)-32 3 continue d write(5,15) (dvspec(i),i=1,mlen) d15 format(' input command line was:',/,1x,a1) c if(mlen.le.4) goto 12 if(dvspec(1).ne.'D') goto 12 if(dvspec(2).ne.'Z') goto 12 if(dvspec(3).eq.'1') goto 7 if(dvspec(3).ne.'2') goto 12 7 if(dvspec(4).ne.':') goto 12 do 10 i=5,mlen if(dvspec(i).LT.'A') goto 12 if(dvspec(i).GT.'Z') goto 12 10 continue dvlen=mlen goto 50 c c error mesages for message board c 12 call msgbrd(status,'INITDZ - syntax error on command:',33) k=mlen+12 call msgbrd(status,devstr,k) goto 100 17 code=status(1) call msgbrd(status,'INITDZ - no command line received',33) goto 20 19 code=status(1) call msgbrd(status,'INITDZ - operation failed:',26) 20 encode(4,18,ecode) code 18 format(i4) k=4 do 22 i=1,4 devstr(k)=error(i) k=k+1 22 continue call msgbrd(status,devstr,28) goto 100 ccc cc bad cc 50 call profbi(status,badreq,dvspec,dvlen,attlst,attlen) cd write(5,45) (dvspec(i),i=1,dvlen) cd45 format(' device spec is: ',a1) c if(status(1).ne.1) goto 19 c c initialize c call profbi(status,inireq,dvspec,dvlen,attlst,attlen) if(status(1).ne.1) goto 19 c c pad up to i*4 boundary c 60 dvlen=dvlen+1 dvspec(dvlen)=' ' k=(dvlen-1)/4 if((k*4).ne.(dvlen-1)) goto 60 c k=k+4 j=1 do 70 i=k,k+4 devstr(i)=ender(j) j=j+1 70 continue len=4*(k+4) name(3)=' ' call msgbrd(status,devstr,len) c 100 call exit end