home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
UTILITY
/
CHKDISK.ZIP
/
CHKDISK.MOD
Wrap
Text File
|
1993-05-17
|
3KB
|
82 lines
Diamond #1 @3956 7[1System Operator7]0
Sunday, May 16, 1993 at Ten in the morning
0R: net33: @2050 (via @1040) [14:28 05/16/93]
0R: net33: @1021 (via @3950) [10:14 05/16/93]
Here's a small (51 bytes) utility I've written that checks the disk in the A:
drive and returns an errorlevel of 1 if a disk is found with the volume label
"!BACKUP!"
I wrote this so my daily maintenance batch file can detect whether it's okay
to update a set of backup files on a floppy that's in my drive most of the
time. The drive letter and volume name can be hex edited to whatever you
please; however changing the length of that string requires the source code,
which follows the UUE.
(world's smallest UUE)
section 1 of uuencode 5.15 of file chekdisk.com by R.E.M.
begin 644 chekdisk.com
M#A\.![0EL"2Z)0'-(;HH`;D(`+1.S2%R!K1,L`'-(;1,L`#-(;`"ST$Z(4)!
&0TM54"$`
`
end
sum -r/size 11071/101 section (from "begin" to "end")
sum -r/size 8542/51 entire input file
Source code to chekdisk.com:
;Chekdisk by Diamond:
;Check a: drive for a certain volume label, and return errorlevel 1 if found,
;0 if not found or no disk in drive. Traps critical error handler
;This code written for TASM 1.0
;
;by Diamond, WWIVnet IceNET WWIVlink #1 @3956 FILEnet #1 @710 StarNet #1 @10
;If you use this code, or modify & redistribute it, please give credit where
;credit is due.
title chekdisk
code segment
assume cs:code, ds:nothing, es:nothing
org 100h
start proc
push cs ;make local data addressable
pop ds
push cs
pop es
mov ah,37 ;grab critical error handler in case there
mov al,36 ;is no disk in the drive.
mov dx,offset handler ;offset of our handler
int 21h
mov dx,offset asciiz ;look for the volume label
mov cx,8 ;volume label (attribute to look for)
mov ah,78 ;find first function
int 21h
jc error
mov ah,76 ;return errorlevel 1
mov al,1
int 21h
error: mov ah,76 ;return errorlevel 0
mov al,0
int 21h
handler: mov al,2 ;critical errors go here.
iret ;return "abort" response
start endp
asciiz db 'A:!BACKUP!',0 ;Drive letter + Volume label + zero byte
code ends
end start