home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CDPD Public Domain Collection for CDTV 3
/
CDPDIII.bin
/
bbs
/
ff870.lha
/
SoftProtect
/
SoftProtect.ReadMe
< prev
next >
Wrap
Text File
|
1991-03-10
|
4KB
|
97 lines
Program name: SoftProtect. an update from the program AskFirst
Written with: Profimat Assembler
Machine: Standard Amiga 500 with OS1.3, One floppy drive,1 MByte RAM
Author: Kamran Karimi
Source: Included
What it does: A software disk write protection. Optionally disables writes
to a write-enabled floppy.
Program status:The program can be used freely but I retain the Copyright to
both the source and the executable forms of the program.
Directory contents:
SoftProtect 1296 Bytes
SoftProtect.s
SoftProtect.ReadMe
This program is intended as a substitute for the write disable tab
on the 3.5" disks. My intention was to force the system to believe that the
disk is write protected eventhough it is in the write enable state. This may
prove useful to those users who don't want to always worry if their disks
are write disabled or not, for the fear of viruses or an accidental write.
It opens a small window with a gadget which can be toggled to "OK" and "NO"
states. OK means you want to write to disks which are write enabled but NO
means you want writes to be disabled even on write enabled disks.
When run from the shell, you can enter an optional 'no' (not case sensetive)
after the program name, Then the gadget will be set to NO and writes are
disabled.
The previous version of the program used a software method but SoftProtect
uses the CIA hardware to fool the system in believing that the disk in drive
is write protected. The story follows.
One of the things we study at the university (I am an undergraduate
Telecommunications student) is the programming of 8086 and the related chips
like parallel ,serial or interrupt controllers ( let me assure you that IBM
assembly language is a joke when compared with the flexibility and power of
68000 assembly). The course emphasizes on using the 8086 as a controlling
device ,and not much is said about writing software for MS-DOS, But that is
what one expects from an electrical class.
When preparing myself for the final exams, I became curious about the Amiga
CIAs and read a few pages about them. Then the idea of this program came to
my mind :
It is possible to define the direction of signal propagation in the 8520s in
an arbitrary manner bit for bit. the signal showing that the disk is write
protected or not, and the disk change signal are available in one of the
CIA-A registers.
The program does the following when it is requested by the user to protect
the disk from writing: first the direction of CHNG and WPRO lines are changed
so that the actual signals from the drive does not affect them. Then the WPRO
line is activated to fool the system into believing that the disk is write
protected. So as to enforce this, the CHNG line is activated for half a second
and then deactivated. This makes the system believe that a disk change has
occured and it will gather information about the 'new' disk, among them write
protection information. By now the system won't let any writes to the floppy.
After this the CHNG's direction is set to its original state.
As the hardware registers are changed, even viruses may fail, but don't rely
on that.
When the user allows writes to the write enabled disks (that is, the gadget
shows OK) the same procedure as above is taken but this time, before the
artificial disk change occurs, WPRO line's direction is set to the original
state.
That was all.
I have not tested the program under any other OS version, processor or with
more than one floppy and don't know the effects of it on floppy drives other
than df0: .
Send any bugs you find or any suggestions to
Kamran Karimi
2,Hassanabad
Haghshenas str.
Navab str.
13599 - Tehran
Iran