; -*- Midas -*- title MINSYS - Write minimum system files to tape. a=:1 b=:2 c=:3 d=:4 e=:5 t=:6 tt=:7 x=:10 y=:11 z=:12 p=:17 ch==:0,,-1 chttyi==:1 chttyo==:2 chdski==:3 chtape==:4 %fr==:0,,525252 %fl==:1,,525252 call=:pushj p, return=:popj p, save==:push p, rest==:pop p, flose=:.lose %lsfil slose=:.lose %lssys pause=:.break 16,100000 quit=:.logout 1, tyi=:.iot chttyi, tyo=:.iot chttyo, mtopen==:.open chtape,[.bao,,'mt0 ? setz ? setz] define syscall name,args .call [setz ? sixbit /name/ ? args(400000)] termin popj1: aos (p) cpopj: return format"$$pcode==:1 format"$$errs==:0 .insrt dsk:syseng;format > outstr: syscall siot,[movei chttyo ? a ? b] slose return define format &string&,args call [ call $format .zzz.==-1 irp arg,,[args] save arg .zzz.==.irpcnt termin hrroi a,[ascii string] movei b,.length string movni c,.zzz.+1 jrst format"format] termin $forma: save a save b save c save [.+2] jrst @-4(p) rest c rest b rest a rest (p) return .insrt dsk:syseng;tape bits define mtcmd arg move tt,[chtape,,[arg]] .mtape tt, .lose termin lpdl==:100. .vector pdl(lpdl) .scalar qdate ; Current date in disk format go: move p,[-lpdl,,pdl-1] .open chttyi,[.uai,,'tty ? setz ? setz] slose .open chttyo,[.uao\%tjdis,,'tty ? setz ? setz] slose .open chtape,[.bai,,'mt0 ? setz ? setz] slose mtcmd %mcbot mtopen slose syscall rqdate,[movem qdate] slose .rdate t, movem t,thdate move t,[-lthblk,,thblk] .iot chtape,t movsi a,-lfiles jrst loop0 lbuffer==:4000 .vector buffer(lbuffer) loop: mtopen slose loop0: move b,files(a) format "~&DSK:~S;~S ~S",[dir(b),fn1(b),fn2(b)] move t,fn1(b) movem t,mhfn1 move t,fn2(b) movem t,mhfn2 move t,dir(b) movem t,mhdir move t,lnpk(b) movem t,mhlnpk jumpn t,dolink dofile: format " <- ~S:~S;~S ~S",[xdev(b),xdir(b),xfn1(b),xfn2(b)] syscall open,[[.bai,,chdski] xdev(b) ? xfn1(b) ? xfn2(b) ? xdir(b)] flose syscall rfdate,[movei chdski ? movem t] move t,qdate movem t,mhdate movsi t,(sixbit />/) came t,fn2(b) jrst dofil1 syscall rfname,[movei chdski repeat 3,[ ? movem mhfn2]] slose format " (~S)",mhfn2 dofil1: move t,[-lmhblk,,mhblk] .iot chtape,t copylp: move t,[-lbuffer,,buffer] .iot chdski,t hrloi tt,-1-buffer(t) eqvi tt,buffer .iot chtape,tt jumpge t,copylp aobjn a,loop jrst done dolink: format " => ~S;~S ~S",[xdir(b),xfn1(b),xfn2(b)] move t,xfn1(b) movem t,lnkfn1 move t,xfn2(b) movem t,lnkfn2 move t,xdir(b) movem t,lnkdir move t,qdate movem t,mhdate move t,[-lmhlnk,,mhblk] .iot chtape,t aobjn a,loop done: .close chtape, pause quit define def name name==:.loc. .loc.==.loc.+1 termin .loc.==0 def fn1 def fn2 def dir def lnpk def xdev def xfn1 def xfn2 def xdir define defile dr,n1,n2,xdv=DSK,xdr,xn1,xn2 .dir.==sixbit /dr/ .fn1.==sixbit /n1/ .fn2.==sixbit /n2/ .xdev.==sixbit /xdv/ .xfn1.==sixbit /xn1/ .xfn2.==sixbit /xn2/ .xdir.==sixbit /xdr/ [ .fn1. ? .fn2. ? .dir. ? 0 ? .xdev. ife .xfn1., .fn1. ifn .xfn1., .xfn1. ife .xfn2., .fn2. ifn .xfn2., .xfn2. ife .xdir., .dir. ifn .xdir., .xdir. ] termin define delink dr,n1,n2,xdv=DSK,xdr,xn1,xn2 .dir.==sixbit /dr/ .fn1.==sixbit /n1/ .fn2.==sixbit /n2/ ifsn [xdv]DSK, .err Ignoring device xdv .xfn1.==sixbit /xn1/ .xfn2.==sixbit /xn2/ .xdir.==sixbit /xdr/ [ .fn1. ? .fn2. ? .dir. ? 1,,0 ? 0 ife .xfn1., .fn1. ifn .xfn1., .xfn1. ife .xfn2., .fn2. ifn .xfn2., .xfn2. ife .xdir., .dir. ifn .xdir., .xdir. ] termin files: ; Get system up, and running DUMP under DDT defile .,@,ddt defile .,its,rm03,,minsys defile .,its,rm80,,minsys defile .,its,rp06,,minsys defile .,its,rp07,,minsys defile .,salv,rm03,,minsys defile .,salv,rm80,,minsys defile .,salv,rp06,,minsys defile .,salv,rp07,,minsys defile .,dskdmp,rm03,,minsys defile .,dskdmp,rm80,,minsys defile .,dskdmp,rp06,,minsys defile .,dskdmp,rp07,,minsys defile sys,atsign,ddt delink sys,atsign,hactrn,,,atsign,ddt defile sysbin,dump,bin,,minsys delink sys,ts,dump,,sysbin,dump,bin ; Time setter defile sys,ts,pdset ; FE filesystem defile .,bt,rm03,,minsys defile .,bt,rm80,,minsys defile .,bt,rp06,,minsys defile .,bt,rp07,,minsys defile .,ram,ram,,minsys defile sys,ts,ksfedr ; Backup copies of the really vital stuff defile backup,@,ddt defile backup,its,rm03,,minsys defile backup,its,rm80,,minsys defile backup,its,rp06,,minsys defile backup,its,rp07,,minsys defile backup,salv,rm03,,minsys defile backup,salv,rm80,,minsys defile backup,salv,rp06,,minsys defile backup,salv,rp07,,minsys defile backup,dskdmp,rm03,,minsys defile backup,dskdmp,rm80,,minsys defile backup,dskdmp,rp06,,minsys defile backup,dskdmp,rp07,,minsys defile backup,bt,rm03,,minsys defile backup,bt,rm80,,minsys defile backup,bt,rp06,,minsys defile backup,bt,rp07,,minsys defile backup,ram,ram,,minsys ; if atsign hactrn is busted, what can you do? defile backup,atsign,ddt,,sys defile backup,ts,dump,,minsys,dump,bin defile backup,ts,pdset,,sys defile backup,ts,ksfedr,,sys ; System demons defile channa,atsign,taraka delink sys,atsign,dragon,,channa,atsign,taraka defile channa,rakash,dmpcpy defile dragon,rakash,pfthmg delink channa,rakash,pfthmg,,dragon,rakash,pfthmg defile dragon,dragon,hoard,,minsys defile channa,logout,times,,minsys ; Some well-known databases defile sysbin,hosts3,> defile inquir,lsr1,> defile syseng,ttytyp,> ; Highly handy system programs defile sys,ts,peek delink sys,ts,p,,sys,ts,peek defile sysbin,peek,bin defile sys,ts,lock defile sys,ts,name delink sys,ts,f,,sys,ts,name defile sysbin,name,bin ; Job Devices and Networks defile sys,atsign,device defile sys,atsign,chaos defile sys,atsign,tcp defile device,atsign,mldev defile device,atsign,mlslv delink device,chaos,mldev,,,atsign,mlslv ; Chaosnet file transfer defile device,chaos,file defile sys1,ts,cftp ; Telnet and supdup defile sysbin,telser,bin delink device,chaos,telnet,,sysbin,telser,bin delink device,chaos,supdup,,sysbin,telser,bin delink device,tcp,syn027,,sysbin,telser,bin delink device,tcp,syn137,,sysbin,telser,bin defile sysbin,supdup,bin defile sysbin,chtn,bin defile sysbin,telnet,bin delink sys1,ts,supdup,,sysbin,supdup,bin delink sys2,ts,chtn,,sysbin,chtn,bin delink sys,ts,telnet,,sysbin,telnet,bin ; Internet file transfer defile sysbin,ftpu,bin defile sysbin,ftps,bin delink sys2,ts,ftp,,sysbin,ftpu,bin delink device,tcp,syn025,,sysbin,ftps,bin lfiles==:.-files cnstnts: constants variables ; Tape info thblk: -lthblk,,0 thtpn: 1,,0 ; tape,,reel thdate: 0 ; creation date in SIXBIT thtype: 0 ; type: 0 => random lthblk==:.-thblk ; File info mhblk: -lmhblk,,0 mhdir: 0 ; dir mhfn1: 0 ; fn1 mhfn2: 0 ; fn2 mhlnpk: 0 ; linkp,,pack mhdate: 0 ; creation date in disk format lmhblk==:.-mhblk ; Dump tapes written after 7/15/89 include the following two words, but we ; continue to write the old format so that old salvagers can read the tapes ; we write. ; MHRDAT: 0 ; Reference Date, Author Index, Byte Size, Byte Count ; MHLEN: 0 ; Length in words ; Link info lnkfn1: 0 ; fn1 lnkfn2: 0 ; fn2 lnkdir: 0 ; dir lmhlnk==:.-mhblk patch:: pat: block 100. epatch: -1 ; Make memory exist, end of patch area ffaddr: ffpage==:_-12 end go