DOS application don't work

Programming, for all ages and all languages.
User avatar
Kazinsal
Member
Member
Posts: 559
Joined: Wed Jul 13, 2011 7:38 pm
Libera.chat IRC: Kazinsal
Location: Vancouver
Contact:

Re: DOS application don't work

Post by Kazinsal »

0x1f1 wrote:Angry bold text!!
Stop that. Yelling is not nice. Google "netiquette".

You've gotten your answer. Run it in DOS, and don't come yelling at us if you nuke your MBR. The NTVDM probably has protections against doing potentially malicious/stupid things like this.

Why are you even writing a DOS application that's designed to run in Windows? It's not going to work in x64, and who knows how long x86 Windows will last (probably not very much past Windows 8). DOS is a dead platform. Microsoft has known it since the release of OS/2.
linguofreak
Member
Member
Posts: 510
Joined: Wed Mar 09, 2011 3:55 am

Re: DOS application don't work

Post by linguofreak »

0x1f1 wrote: 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?
LES can't have a register for its second operand, see: http://www.fermi.mn.it/linux/quarta/x86/lgs.htm

I understand that NTVDM uses the fault generated by this instruction to transfer from V86 mode to Windows code running in normal protected mode.

In any case, it's not actually this instruction that's causing the problem (though if you're tracing it in a debugger, the debugger will probably stop at this instruction because of the V86 -> Normal protected mode transition).

LES AX, SP is just part of the processing of INT 13h. In the course of that processing, NTVDM is determining that you're trying to do something that it doesn't support, and is giving you an error message.
User avatar
brain
Member
Member
Posts: 234
Joined: Thu Nov 05, 2009 5:04 pm
Location: UK
Contact:

Re: DOS application don't work

Post by brain »

Obvious troll is obvious...
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: DOS application don't work

Post by AJ »

Banned in 4 posts. Apart from spambots, I think that may be a record.
Locked