.TITLE ZERO Disk Wipeout .SBTTL .SBTTL ZERO Security Disk Zero Program .SBTTL .SBTTL Edit: Edit Date: Author: .SBTTL V4.0 16-Jun-80 Brant Cheikes .SBTTL .IDENT "V4.0" ; ; M o d i f i c a t i o n H i s t o r y ; ; ; Version/Edit Edit Date Reason ; ; V04A-01 16-Jun-80 New release ; ;+ ; ZERO is designed to write zeros (null bytes) on all unused areas of the ; system disk. It opens a large file on disk (with a clustersize of 4 to ; get all pack clusters on the RM03), marks it for deletion, and proceeds ; to write zeros on it until it grows so large that it takes up all room ; on the disk. At that point, a '?No room for user on device' error is ; returned to the program, whereupon it closes (and thereby deletes) the ; file and commits suicide. When ZERO is finished, disk dumps to get ; data from the disk (possibly confidential data) fail, since the disk ; is full of nothing (the disk sings "I got plenty o' nuttin'" at this ; point). This procedure guarantees system data security. ; ; ZERO began as a BASIC-PLUS program written by Dr. Terry F. O'Dwyer, Dean ; of Instruction for Learning Resources of Nassau Community College. It ; was later expanded and rewritten by Brant Cheikes. The current version ; of ZERO was written in MACRO-11, the PDP-11 assembly language, by Brant ; Cheikes, T.E.A.O.R.E. ; ; This version of ZERO is written completely with defaults; there is no ; place for user interaction within this program. This program was written ; for use at system startup time for the fastest disk zero operation possible ; under RSTS/E V7.0. ;- .PAGE .SBTTL Set up I/O buffer .PSECT BUFFER BUFFER: .BLKB0 4000 ; Set up a 4 block data buffer filled with ; zeros for zero operation .EVEN .SBTTL Filename buffer .PSECT DATA FILNAM: .ASCII %SY:ZERO00.TMP<60>/CL:4% ; Set up the filename for the large ; file as an ASCII string in memory .EVEN .SBTTL .SBTTL Main Program Coding .SBTTL .PSECT ZERO STRT: .TTRST ; Reset terminal output, just in case HEADER ZERO,V04A-01, ; Output system header CLEAR FIRQB, FQBSIZ ; Clear the FIRQB CLEAR XRB, XRBSIZ ; And the XRB MOV #77777, R0 ; Set initial filesize MOV #26, XRB+XRLEN ; Define length of filename MOV #26, XRB+XRBC ; Define length again MOV #FILNAM, XRB+XRLOC ; Set starting address of filename .FSS ; Execute filename string scan OPEN: MOVB #CREFQ, FIRQB+FQFUN ; OPEN FOR OUTPUT function MOV R0, FIRQB+FQSIZ ; Set desired filesize MOVB #2, FIRQB+FQFIL ; Channel number times 2 (1%) CALFIP ; Call FIP, with FIRQB loaded TST FIRQB ; Error on open? BNE OPERR ; Yes, go to handler MOVB FIRQB+FQJOB, R5 ; Nope, put returned job number * 2 ASR R5 ; into R5 and divide it by 2 KILL ; Mark the file for deletion JMP DETACH ; Go to detaching routine OPERR: ASR R0 ; Cut down filesize by a factor of 2 CMP #2, R0 ; See if filesize is a small number BEQ NOROOM ; Too small to be significant, exit BR OPEN ; Filesize fine, try for an open again NOROOM: SAY ; Tell user no room PEEK 1006 ; Let's get our job number BIS #377, R0 ; Mask out high byte ASR R0 ; Divide remainder by 2 MOV R0, R5 ; Set up register for suicide SAY SAY ; Tell user we are going byebye SAY JMP BYEBYE ; Let's go kill ourself .PAGE .SBTTL Detach from keyboard DETACH: SAY /> ; Notify user we are leaving CLEAR FIRQB, FQBSIZ ; Clear the FIRQB MOVB #UU.DET, FIRQB+FQFUN ; .UUO DETACH function MOVB #200, FIRQB+4 ; Force a close on keyboard .UUO ; Process UUO and detach SET JFSPRI ; Set special run priority CLEAR XRB, XRBSIZ ; Clear out XRB MOV #4000, XRB+XRLEN ; Set buffer size MOV #4000, XRB+XRBC ; # bytes to write MOV #BUFFER, XRB+XRLOC ; I/O buffer address MOVB #2, XRB+XRCI ; Channel number * 2 MOV #1, XRB+XRBLK ; Block number where write begins MOV #1, R3 ; Put block write number into R3 LOOP: .WRITE ; Do the output TST FIRQB ; Error? BNE BYEBYE ; Yes, go exit ADD #4, XRB+XRBLK ; Nope, go to next cluster BR LOOP ; Do next write .PAGE .SBTTL Exit routine BYEBYE: CLOSE 1 ; Close the file CLEAR FIRQB, FQBSIZ ; Clear out MOVB #UU.CHU, FIRQB+FQFUN ; KILL JOB function MOVB R5, FIRQB+4 ; Job # to kill is our own MOVB #377, FIRQB+35 ; Kill job flag .UUO ; Commit suicide .EXIT ; Just to be sure .END STRT ; The End.