HDLOCKER.ASM
资源名称:schdlock.zip [点击查看]
上传用户:petreluo
上传日期:2007-01-06
资源大小:7k
文件大小:2k
源码类别:
磁盘编程
开发平台:
Others
- code segment
- assume cs:code,ds:code
- org 100h
- start:
- jmp begin
- msg1 db 0Ah,0Dh,' Babysoft (R) Hard Disk Locker version 1.0'
- db 0Ah,0Dh,' Copyright (C) 1997.11 LiuYaDing,Babysoft Corp.',0Ah,0Dh
- db 0Ah,0Dh,' C ...... Lock Hard Disk'
- db 0Ah,0Dh,' D ...... Only Lock Driver D:'
- db 0Ah,0Dh,' Q ...... Quit',0Ah,0Dh
- db 0Ah,0Dh,' Enter your select :(D)?$'
- msg2 db 07h,0Ah,0Dh,' Locked OK!',0Ah,0Dh,'$'
- msg3 db ' Not fount Driver D:$'
- error db 0Ah,0Dh,' Enter error!$'
- cxd dw 0
- begin:
- mov ax,201h
- mov bx,offset buf
- mov cx,1
- mov cxd,cx
- mov dx,80h
- int 13h
- jc begin
- mov ah,9
- lea dx,msg1
- int 21h
- ag1: mov ah,1
- int 21h
- cmp al,'Q'
- jz exitq
- cmp al,'q'
- jz exitq
- cmp al,0Dh
- jz jmd
- cmp al,'D'
- jz jmd
- cmp al,'d'
- jz jmd
- cmp al,'C'
- jz jmc
- cmp al,'c'
- jz jmc
- lea dx,error
- jmp exit
- jmd: cmp byte ptr [buf+1D0h],0
- jnz re
- lea dx,msg3
- jmp exit
- re: mov ax,201h
- mov cx,word ptr [buf+1D0h]
- mov cxd,cx
- mov bx,offset buf
- mov dx,80h
- int 13h
- jc re
- jmc: mov ah,0A8h
- cld
- mov si,offset buf
- mov di,si
- mov cx,1FEh
- ag2: lodsb
- xor al,ah
- rol ah,1
- stosb
- loop ag2
- agw: mov ax,301h
- mov bx,offset buf
- mov cx,cxd
- mov dx,80h
- int 13h
- jc agw
- mov dx,offset msg2
- mov ah,9
- int 21h
- mov ax,0FFFFh
- push ax
- xor ax,ax
- push ax
- retf
- exit:mov ah,9
- int 21h
- exitq:
- int 20h
- buf db 0
- code ends
- end start