ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi guys, here is one problem I came across recently - I have an app which operates with dos functions, so I tried to compile it with gnu and it doesn't seem to work due to the dos libs,even though I put them in right folders, I've made a little research and people were saying that dos doesn't fit well with linux and noone proposed any solution, could you guys recommend me something? Thank you, have a nice day
What is the app? Does it have a homepage? Can we download the source too?
What are the DOS functions that it uses?
What were "dos libs" and what were the "right folders" that you put them in?
Note: if you're asking what it sounds like you're asking, then consider the very strong possiblity that "it won't work in Linux" actually is the right answer. In that case, you'd have to build and run it using DosEMU, DosBox, a VM running FreeDOS, etc.
You might need to re-code this application somewhat in order to make it work. How easy this may be will depend entirely on just how the original was built.
If, for instance, there are subroutine calls that are used to request various DOS system services, these could be replaced on a case-wise basis by adding a new file to your application (with appropriate #include directives in the appropriate other places) in which you create an appropriate implementation of this functionality.
If, on the other hand, the application is chock-full of asm{...} sections with hard-coded int instructions, you'll have much more work to do.
If your DOS program expects to use libraries (other than components of itself ...) you will probably have to re-create the functionality of those libraries as well.
Likewise, how does the application do screen I/O and keyboard input? Some programs were very brutish, directly writing to display memory. Others made use of "GUI" (sic ...) libraries that you may or may not have.
As others have noted, tools like "DosBox" also exist. They put the program into an environment that reasonably mimics the DOS environment as seen by application programs.
Last edited by sundialsvcs; 11-14-2016 at 06:25 PM.
Since I have no idea how helpful or good this application is and what the benefit it derives from DOS, my personal instinct would be rewrite the functionality entirely in C and compile it under Linux. Further, I could tweak it to do exactly what I'd want it to do, maybe even improve it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.