Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Running Dos apps under linux

jbstormjbstorm Posts: 4Member
I have a 16-bit dos application that was developed using Intel assembler and currently runs under windows 98 dos(dos 7 maybe). The compilier accepts a .asm file and returns a .com file. My question is could this .com app run directly under linux on an intel processor or would it need to be recomplied to become something other type of executable?


Comments

  • CroWCroW Posts: 348Member
    : I have a 16-bit dos application that was developed using Intel assembler and currently runs under windows 98 dos(dos 7 maybe). The compilier accepts a .asm file and returns a .com file. My question is could this .com app run directly under linux on an intel processor or would it need to be recomplied to become something other type of executable?
    :
    :
    :
    in assembly you write directly the instructions executed by the cpu.for most things you call some helper-functions provided by the OS.interrupt 21h for dos,winapi for win32 for example.thats one reason why you cant recompile the source.the other reason is that your dos-code most properly is written for realmode while linux is a protectedmode environment.

    the best thing is to use a dos-emulator (like dosbox) running on your linux-system an run the .com in it.
  • jbstormjbstorm Posts: 4Member
    : : I have a 16-bit dos application that was developed using Intel assembler and currently runs under windows 98 dos(dos 7 maybe). The compilier accepts a .asm file and returns a .com file. My question is could this .com app run directly under linux on an intel processor or would it need to be recomplied to become something other type of executable?
    : :
    : :
    : :
    : in assembly you write directly the instructions executed by the cpu.for most things you call some helper-functions provided by the OS.interrupt 21h for dos,winapi for win32 for example.thats one reason why you cant recompile the source.the other reason is that your dos-code most properly is written for realmode while linux is a protectedmode environment.
    :
    : the best thing is to use a dos-emulator (like dosbox) running on your linux-system an run the .com in it.
    :
    :
    :
    : Basically I want to be able to run this .com app but do other things like tcp/ip networking. The .com app is memory intensive and I've reached the ceiling on the 640K conventional range. I can't be connected to the netowrk and run the .com app. So I thought running linux would be an easy way to get access to upper memory without having to rewrite the .com app. Is there a simpler solution?


  • CroWCroW Posts: 348Member
    : : : I have a 16-bit dos application that was developed using Intel assembler and currently runs under windows 98 dos(dos 7 maybe). The compilier accepts a .asm file and returns a .com file. My question is could this .com app run directly under linux on an intel processor or would it need to be recomplied to become something other type of executable?
    : : :
    : : :
    : : :
    : : in assembly you write directly the instructions executed by the cpu.for most things you call some helper-functions provided by the OS.interrupt 21h for dos,winapi for win32 for example.thats one reason why you cant recompile the source.the other reason is that your dos-code most properly is written for realmode while linux is a protectedmode environment.
    : :
    : : the best thing is to use a dos-emulator (like dosbox) running on your linux-system an run the .com in it.
    : :
    : :
    : :
    : : Basically I want to be able to run this .com app but do other things like tcp/ip networking. The .com app is memory intensive and I've reached the ceiling on the 640K conventional range. I can't be connected to the netowrk and run the .com app. So I thought running linux would be an easy way to get access to upper memory without having to rewrite the .com app. Is there a simpler solution?
    :
    :
    :

    running your code in an emulator under linux means not to 'run' under linux.it is still a dos-application.the emulator properly will provide you 640k conventional memory,even with lots of stuff loaded (mousedriver,etc).

    your application will NEVER run under pure linux,the way memory is handled by dos is COMPLETLY different to linux.rewriting will require to rewrite almost everything.every file-io,network,graphics and dynamic memory-allocation must be changed to work.

    try the emulator (a dos-emulator running on windows will do the trick,too since they try to provide the best possible dos-machine without actualy having one).

    the other way is to change the memory-model to an .exe using dpmi.thats a lot of work,too but surely lots easier than rewriting for linux
Sign In or Register to comment.