Windows Legacy OS forum

General discussion

Can I call a subroutine that uses DOS Interupts

by Joe Btfsplk / September 17, 2009 4:42 AM PDT

I have some very handy subroutines that use the DOS interrupts. If I call one from a WINDOWS program will it revert to DOS or will it run alright in a WINDOES non DOS window?

ALIAS Joe Btfsplk

Discussion is locked
You are posting a reply to: Can I call a subroutine that uses DOS Interupts
The posting of advertisements, profanity, or personal attacks is prohibited. Please refer to our CNET Forums policies for details. All submitted content is subject to our Terms of Use.
Track this discussion and email me when there are updates

If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.

You are reporting the following post: Can I call a subroutine that uses DOS Interupts
This post has been flagged and will be reviewed by our staff. Thank you for helping us maintain CNET's great community.
Sorry, there was a problem flagging this post. Please try again now or at a later time.
If you believe this post is offensive or violates the CNET Forums' Usage policies, you can report it below (this will not automatically remove the post). Once reported, our moderators will be notified and the post will be reviewed.
Collapse -
Re: subroutines
by Kees Bakker / September 17, 2009 6:28 AM PDT

Why not try it?

Of course, there is no DOS inside (or under, or above) Windows XP. There's just a command interpreter that understands the old DOS-commands. So I doubt if it will work at interrupt level.

What do those very handy subroutines do?


Collapse -
Kees - They work fine using DOS under XP:
by Joe Btfsplk / September 18, 2009 1:42 AM PDT
In reply to: Re: subroutines

I've been programming from way back when Bill Gates was just a schoolkid. I went to work for IBM in 1965 at the advent of 3rd generation mainframe computers so I learned assembler language.In any event, in the early 1980s, I found out that the PC XT had 512K of memory and 20 Meg of disk. WOW, that's about what 3rd generation mainframes had 20 years earlier so it seemed huge to me.I bought one for over $5,000 with the assembly language compiler. I developed Advanced Data Access Method (ADAM) which emulates VSAM. VSAM only runs on mainframes and it wouldn't be in IBM's best interests to develop it for PCs. Those are the subroutines that I have. I did develop a DB for Snelling & Snelling and instead of the usual enter your request and go have a cup of coffee waiting for your response (even then, the PCs were slow) they got their responses in a fraction of a second. They loved it. After approaching several large corporations that existed at that time, like NOVEL, I got discouraged with the young new geniuses who let me know that an old dinosaur mainframer like me couldn't teach them anything. Then came WINDOWS and down the tubes went assembly language except for BIOS and things like that. To make a long story short, in 1995 I took a position as a mainframe programmer with a large company. I did install MASM and the stuff I wrote on the PC XT that I had on a WINDOWS 98 machine that I eventually stored. All the old PC assembly language programs run fine on WINDOWS 98 DOS. I recently brouht it out and copied the DOS programs to the WINDOWS XP machine that I have. The line editor that I wrote on the PC XT doesn't work right. I wrote that right after I got the PC XT because the line editor that came with old DOS was a joke. All of the other programs run fine under WINDOWS XP DOS emulation. I was wondering if ADAM will run OK in a program that runs native WINDOWS XP? I am working on replacing mainframes with a couple of PCs. It can be done.

Collapse -
I'd guess no
by Jimmy Greystone / September 17, 2009 7:02 AM PDT

I'd guess no, because it sounds like you're going to be trying to access the hardware directly. This is a big no-no according to current operating system design theory. Mandating that apps go through the OS in order to do anything with the hardware is a big part of the reason you don't see a lot of the out of nowhere errors you would back in the Win 3.1 days.

But I'm with Kees... Try it and see what happens. Either it will work or the program blows up. Whatever happens, you'll have an answer pretty quick. So, maybe just write a quick program that runs through each subroutine you might want to use, and prints a message upon successful completion. Then you can remove the routines that don't work (if any do) and have a list of routines that do work so you can plan accordingly for your main program.

Collapse -
Jimmy - that's fne with me.
by Joe Btfsplk / September 18, 2009 1:48 AM PDT
In reply to: I'd guess no

Bill Gates became the richest man in the world after he designed software that would only run on PCs. There are millions of them out there, so PC only software should have a big enough market, even if it won't run on a MAC or other computer.

Collapse -
And he didn't really
by Jimmy Greystone / September 18, 2009 5:56 AM PDT

And he didn't really. Gates bought DOS from someone else. His big contribution was to change the default drive letter from D: to C: .

Some even go so far as to say that the BASIC compiler he used to found Microsoft was something he stole while working at DEC.

And one of the things often left out of the story, is that Gates comes from money. His parents are quite well to do. I mean really... In the early 1980s, who could come up with $50K on pretty much no notice in order to buy QDOS? Gates likely would have been pretty well off regardless. He just might not be AS wealthy.

But it's not really a PC/Mac/Other issue so much as it's a Computer Science Operating System Design Theory issue. Programs that directly access the hardware are generally considered a Bad Thing(tm). They are supposed to request some bit of data from the OS, which acts as a broker between the hardware and applications in userspace.

Otherwise Program A might try and allocate resources being used by Program B. The best way to avoid this, at least according to current thinking, is to have a sort of gatekeeper to manage the computer's hardware resources. Programs make requests, and then this gatekeeper hands out the resources.

Direct access worked fine in the single program at a time days of DOS, but doesn't hold up so well in the multitasking world of today.

Collapse -
Thanks for the rundown on Bill Gates!
by Joe Btfsplk / September 21, 2009 3:58 AM PDT
In reply to: And he didn't really


But what you failed to mention is that he was born into royalty, a family of lawyers. I was born a commoner (working class). The lawyers' greed has made a mess of this once greatest nation on earth and it has been lawyers that have prevented me from offering the computer world Advanced, and I do mean ADVANCED Data Access Method (ADAM). I designed and programmed it over twenty years ago. There is no Data Access Method that will touch it for speed, efficient use of memory, efficient use of disk space and it will do things that even IBM's legendary VSAM won't do. If there were such an Access Method it would be dominating the market. Right now it only runs on PCs but it could be easily adapted to run on other platforms. It is lawyers who have prevented me from making it available to other developers, especially in the Client/Server area. Eden Software is trying to replace mainframes with PCs but I had to do google searches on the internet to find them. I'm sure that, if they added ADAM to their system, it would speed it up dramaticly enough to go ahead and replace a bunch of big, and I mean big, businesses mainframes. Lawyers have bankrupted me but there is no way I'll sell ADAM unless I can get a couple of million out of it.

Alias Fearless Fosdick

Collapse -
I'm going with yes for the most part.
by R. Proffitt Forum moderator / September 17, 2009 8:55 AM PDT

A very old program of mine used the old IRQ 2 and 3 during serial IO. Still works.

So test it.

Collapse -
R.: Looks like ADAM will work OK. (See my answer to Kees.)
by Joe Btfsplk / September 18, 2009 1:58 AM PDT

IT looks like some of the DOD interrupts like Delete File (Int 21h, service 41h) and Rename File (Int 21h, service 56h) don't work right but all of the Interrupts that I used in ADAM seem to work fine.

Collapse -
There's still a way.
by R. Proffitt Forum moderator / September 18, 2009 6:32 AM PDT

I didn't mention Virtual Box but I have in a pinch installed that, then DOS and stuff runs there.

Popular Forums
Computer Newbies 10,686 discussions
Computer Help 54,365 discussions
Laptops 21,181 discussions
Networking & Wireless 16,313 discussions
Phones 17,137 discussions
Security 31,287 discussions
TVs & Home Theaters 22,101 discussions
Windows 7 8,164 discussions
Windows 10 2,657 discussions


Help, my PC with Windows 10 won't shut down properly

Since upgrading to Windows 10 my computer won't shut down properly. I use the menu button shutdown and the screen goes blank, but the system does not fully shut down. The only way to get it to shut down is to hold the physical power button down till it shuts down. Any suggestions?