DOS application don't work
DOS application don't work
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?
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: DOS application don't work
Try actually running DOS instead of Windows.
Re: DOS application don't work
I'm not sure about windows 64-bit version, but 32-bit xp allowed direct read/write with emulated int 13h code. in 32-bit windows 7 it might work if you right click the console/cmd.exe and "run as administrator" before executing the program.
Re: DOS application don't work
64-bit versions won't run DOS apps at all, since Long mode doesn't support V86 mode.bubach wrote:I'm not sure about windows 64-bit version...
Re: DOS application don't work
My problem is that the DOS application that I write don't works because it use the INT 13h for read the sector of the hard disk.
What can I do to solve this problem in Windows 7, Vista and XP all of 32 bit and 64 bit?
What can I do to solve this problem in Windows 7, Vista and XP all of 32 bit and 64 bit?
Re: DOS application don't work
Hi ,
Best way would be to run dos in an emulator like Virtual PC if you want to run the application as such
--Thomas
Use CreateFile() , ReadFile() .. Win32 api functions .. . You generally do not use bios services in protected mode.What can I do to solve this problem in Windows 7, Vista and XP all of 32 bit and 64 bit?
Best way would be to run dos in an emulator like Virtual PC if you want to run the application as such
--Thomas
Re: DOS application don't work
I will tell you again what is my problem because i'm reading that you don't understand. I AM WRITING A DOS APPLICATION THAT READ THE BOOT SECTOR OF A HARD DISK AND BECAUSE OF THIS MY DOS APPLICATION DON'T WORKS.
THE PROBLEM IS NOT THAT CPU IS IN PROTECTED MODE BECAUSE THE DOS IS IN V86 MODE.
THE PROBLEM HAPPEN WHEN THE INT 13h FIND THE LES AX,SP INSTRUCTION AND DL IS 80h(HARD DISK). WHEN MY DOS APPLICATION GO TO THIS INSTRUCTION AT INT 13h AND AX = 0201h and DL = 80h THE NTVDM SHOW THE ERROR MESSAGE AND INT 13 RETURNS A ERROR(AH = 80h).
WHAT CAN I DO TO READ THE BOOT SECTOR OF A HARD DISK WITH AN APPLICATION THAT USE THE INT 13h AND WITHOUT CALL API AND WITHOUT USE VIRTUAL MACHINES???
THE PROBLEM IS NOT THAT CPU IS IN PROTECTED MODE BECAUSE THE DOS IS IN V86 MODE.
THE PROBLEM HAPPEN WHEN THE INT 13h FIND THE LES AX,SP INSTRUCTION AND DL IS 80h(HARD DISK). WHEN MY DOS APPLICATION GO TO THIS INSTRUCTION AT INT 13h AND AX = 0201h and DL = 80h THE NTVDM SHOW THE ERROR MESSAGE AND INT 13 RETURNS A ERROR(AH = 80h).
WHAT CAN I DO TO READ THE BOOT SECTOR OF A HARD DISK WITH AN APPLICATION THAT USE THE INT 13h AND WITHOUT CALL API AND WITHOUT USE VIRTUAL MACHINES???
Re: DOS application don't work
You are asking how to write DOS programs that uses BIOS call and not run in DOS, but in Windows, and you asking that on an OS development forum which we focus on develop our own OS.
Think again. Try application development forum like stackoverflow.
Hint: Windows provide DOS emulation, but that is not pure DOS, it may deny some access.
Think again. Try application development forum like stackoverflow.
Hint: Windows provide DOS emulation, but that is not pure DOS, it may deny some access.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: DOS application don't work
You obviously don't understand a thing about etiquette or reading forum rules.0x1f1 wrote:you don't understand. ALL CAPS WITH LOTS OF MARKUP
You can't provide the functionality and meet all the other irrelevant requirements at the same time. End of story. Try not to post before you understand and accept that fact.
- xenos
- Member
- Posts: 1118
- Joined: Thu Aug 11, 2005 11:00 pm
- Libera.chat IRC: xenos1984
- Location: Tartu, Estonia
- Contact:
Re: DOS application don't work
...or the relation between DOS, Windows, VM86, protected mode, real mode and BIOS calls.Combuster wrote:You obviously don't understand a thing about etiquette or reading forum rules.0x1f1 wrote:you don't understand. ALL CAPS WITH LOTS OF MARKUP
- DavidCooper
- Member
- Posts: 1150
- Joined: Wed Oct 27, 2010 4:53 pm
- Location: Scotland
Re: DOS application don't work
MAYBE SHOUTING EVEN LOUDER WOULD HELP?
Help the people of Laos by liking - https://www.facebook.com/TheSBInitiative/?ref=py_c
MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming
MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming
Re: DOS application don't work
WHY YOU ARE INSULTING ME??? The only thing that 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?
-
- Member
- Posts: 510
- Joined: Wed Mar 09, 2011 3:55 am
Re: DOS application don't work
V86 mode is a subset of protected mode, and V86 mode programs can only do as much direct hardware access as the OS allows them to do, which, in modern versions of Windows, is pretty much nothing.0x1f1 wrote:THE PROBLEM IS NOT THAT CPU IS IN PROTECTED MODE BECAUSE THE DOS IS IN V86 MODE.
Probably nothing. There's not a lot of back compatibility between modern Windows versions and DOS (and absolutely no back compatibility with DOS for 64-bit Windows, except via emulation or virtual machines).WHAT CAN I DO TO READ THE BOOT SECTOR OF A HARD DISK WITH AN APPLICATION THAT USE THE INT 13h AND WITHOUT CALL API AND WITHOUT USE VIRTUAL MACHINES???
-
- Member
- Posts: 510
- Joined: Wed Mar 09, 2011 3:55 am
Re: DOS application don't work
Considering that he seems to want to edit the boot sector of his machine's physical hard disk, I don't think an emulator or VM would help.Thomas wrote:Best way would be to run dos in an emulator like Virtual PC if you want to run the application as such
Re: DOS application don't work
Sorry for that, but using int13h is definitely not the way go ....linguofreak wrote:Considering that he seems to want to edit the boot sector of his machine's physical hard disk, I don't think an emulator or VM would help.Thomas wrote:Best way would be to run dos in an emulator like Virtual PC if you want to run the application as such
@0x1f1 : I was trying to help, I do apologize if I have "read" you incorrectly .
--Thomas