🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.os2.programmer
Article #3207

Re: Is OS/2 really usable for programming?

#3207
From: Rick Rodman
Date: Fri, 14 Jun 1991 02:02
50 lines
2898 bytes
In article <11560004@hpnmdla.sr.hp.com>, joeb@hpnmdla.sr.hp.com (Joe Barnhart) writes:
> In comp.os.os2.programmer, phil@ux1.cso.uiuc.edu (Phil Howard KA9WGN) writes:
> 
>   | 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?
> 
> Use a "keyboard monitor."  This is an OS-supplied "keyboard hook" which
> allows you to do just about anything you want on keystrokes.  You can
> hook a similar monitor on virtually any hardware device.
> 
>   | 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
> 
> Don't think for one second that OS/2 has the same limits on raw video 
> performance that DOS does.  The standard "VIO" calls are _fast_ under OS/2.
> You might find that you don't need to go to this trouble for video I/O 
> speed.
> 
>   | 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?
> 
> This can be done, but only for a "full screen" application.  As you might
> imagine, your customer wouldn't be very happy if you switched video modes
> and his Presentation Manager screen went gaga (technical term).
> 
> For a good treatment on VIO calls, device monitors, etc., I recommend 
> Ray Duncan's "Advanced OS/2 Programming" (or something like that).  Also,
> Gordon Letwin's book on the philosophy of OS/2 is very enlightening.
> 
> -- Joe B.
> 

SCR_ALLOCLDT allows R/W access to the screen buffer to do whatever you want.
See p. 269 of vol. 4 of the programmer's reference.

It also allows R/O access to rest of 1st megabyte.  Anyone know how to get
R/W access?  Are there backdoor segments like in Windows?


Rick Rodman      uunet!virtech!rickr	"Yesterday's Tomorrow is Here Today"

-- 

Rick Rodman      uunet!virtech!rickr	"Yesterday's Tomorrow is Here Today"
Technical Details
Message-ID: <1991Jun14.020239.27279@virtech.uucp>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!virtech!rickr
References: <1991Jun5.212129.11089@ux1.cso.uiuc.edu> <11560004@hpnmdla.sr.hp.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!virtech!rickr
From: rickr@virtech.uucp (Rick Rodman)
Newsgroups: comp.os.os2.programmer
Subject: Re: Is OS/2 really usable for programming?
Summary: 2nd try
  (Postnews is crap!)
Message-ID: <1991Jun14.020239.27279@virtech.uucp>
Date: 14 Jun 91 02:02:39 GMT
References: <1991Jun5.212129.11089@ux1.cso.uiuc.edu> <11560004@hpnmdla.sr.hp.com>
Organization: Virtual Technologies Inc.
Lines: 50