Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!microsoft!tom From: tom@microsoft.UUCP (Tom MCCONNELL) Newsgroups: comp.os.os2.programmer Subject: Re: Is OS/2 really usable for programming? Message-ID: <72824@microsoft.UUCP> Date: 9 Jun 91 01:46:28 GMT References: <1991Jun5.212129.11089@ux1.cso.uiuc.edu> Reply-To: tom@microsoft.UUCP (Tom MCCONNELL) Organization: Microsoft Corp., Redmond WA Lines: 69 In article <1991Jun5.212129.11089@ux1.cso.uiuc.edu> phil@ux1.cso.uiuc.edu (Phil Howard KA9WGN) writes: >I have heard from several sources that OS/2 is really the way to go, but I >still have my doubts based on some other and same sources of information. > >So I'd like to pose some questions about programming applications to run >under OS/2 as well as MS-DOS. > >I want my program to be able to trap and handle every keyboard state change >that takes place. I want to handle both up and down keystrokes in any >combination. Under MS-DOS I would just have my program take over the >interrupt handling of the keyboard directly. How do I make a program do >this under OS/2? > OS2 will allow you to have this granualarity of keyboard input. If you really want to be a part of the input chain, simply use the DosMonReg() class of apis. These allow you to set up a routine which get's all keyboard info. You can have multiple keyboard handlers all hooked in, allowing keyboard handlers to coexits peacefully. Of course there is info which specifies where in the chain you want to be, at the front, at the end, you don't care, or a specific point. It's all very easy. In fact the very first OS2 program I wrote was a DosMonReg program. >I want my program to be able to write directly to VGA buffers and registers >for the purpose of writing to the screen at the maximum possible speed, and >to be able to pan and scroll the screen smoothly at high speeds. I also >want to be able to setup special modes such as 360x480x256 and others that >the VGA cards are actually capable of (not all the same for all cards, I do >know). Under MS-DOS I can easily take control of the video card and do >just what I want. How do I do this under OS/2? If you are using a "full screen" or better known as text mode, then there is a class of api's called VIO api's which give you the same sort of control and speed. The nice thing about using VIO's, is that when you are running as a full screen, you have the speed, and when you are running as a windowed shell, it still displays the same, just in a window. This API is also very rich, flexible and fast. It gives you an OS 'okayed' method of doing the high performance sort of things you want to do. > >This article is not to argue the merits of or lack thereof of bypassing the >BIOS or OS to do such things that might cause problems under other systems. >The nature of what I want to do necessitates doing it this way unless the OS >has provides very high performance and flexible interfaces for it. > >I just want to know if OS/2 is going to be more hassle than it is worth as >some have already suggested to me w/o much supportive evidence. Not only are these interfaces easy, but they are high performance as well. Try it, you'll like it! :-) -Tom >-- > /***************************************************************************\ >/ Phil Howard -- KA9WGN -- phil@ux1.cso.uiuc.edu | Guns don't aim guns at \ >\ Lietuva laisva -- Brivu Latviju -- Eesti vabaks | people; CRIMINALS do!! / > \***************************************************************************/ -- "Hey COW!" _____________(( / ** o \ ______ _______________________ /| **** \ _/moo...\ | Tom McConnell | / | ** /\__/ \______/ | uunet!microsoft!tom |