I write a DOS application that read the boot sector of a hard disk but this dont work and show a message saying that a application try to access directly the hard disk and is no support to this. Why this happens? How can I bypass this?
I write a DOS application that read the boot sector of a hard disk but this dont work and show a message saying that a application try to access directly the hard disk and is no support to this. Why this happens? How can I bypass this?
If it is the boot sector of the hard disk from which you are running the application, this probably won't be easy. The OS will try it's best to prevent it as writing to this region is an operation which is used by boot sector viruses. Although reading from the boot sector won't be much use to a virus, maybe it is easier and safer for the OS to just prohibit any access to the boot sector.
Originally Posted by INT 13h
Why nobody answer???
Answering questions on these forums isn't our job, you know. We do it for free, when we have a spare minute. Remember to be polite and you will have more chance of being answered.
If you boot DOS (or Win95/WinME) you will probably succeed but I would be surprised if not all variants of NT OS will prohibit you from using int13 regardless of if you read or write.
The reason is that if int13 was allowed you could read any file on the disk regardless of priviledges.
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it.
- Brian W. Kernighan
What I can't understand is that when my DOS Application that use INT 13h enter at INT 13h it find the instruction LES AX,SP that stop the application. What is the instrunction LES AX,SP and why this instruction stop the DOS application that I write?
The instruction pointer is always one step ahead when you experience such a break.
I repeat, do this kind of programming in a DOS compatible OS. The shell (cmd.exe) in a NT OS isn't fully DOS compatible.
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it.
- Brian W. Kernighan
Bookmarks