ronp@cs.umr.edu (Ron Pacheco) (08/29/90)
(comp.lang.pascal readers please forgive the crosspost) VMS programmers will be familiar with a facility known as SMG. This is a language independent, operating system facility for screen management with windows. For several years I have desired similar capabilities for Turbo Pascal and Turbo C. There are a lot of windowing packages available, but I am already familiar with SMG and would like to use it on all programming platforms, not to mention that SMG is a very powerful facility. Finally, between teaching, studying, research, and programming for one of the engineering departments on campus, I started the project earlier this year. SMG for Turbo Pascal is approximately 75% complete, and I anticipate a beta version in under a month. The library currently consists of 12k of code and 50 bytes of data...not bad for a facility as powerful as SMG. Performance is quite acceptable, even on a 4.77 MHz PC. For those of you who are interested, there are of course a few necessary differences in the facility. First, Turbo Pascal does not support optional arguments, and thus all possible arguments must be present in the SMG function call. Constant values such as SAMEROW and SAMECOLUMN have been provided to allow for default values where VMS would allow an optional or default argument. Second, several routines are of course, not implemented, such as routines which deal with the terminal type. I have not implemented the keyboard mapping routines, and keys have different symbolic names to support PC programming. Third, the pasteboard-id argument has been removed from any routines which referenced it as the PC SMG facility is concerned with only one device. Fourth, several routines which specified a screen block in the format ( start-row, start-column, end-row, end-column ) have been changed to ( start-row, start-column, rows, columns ). There were two reasons for doing this. One, it is a much simpler method of identifying blocks, and two, several SMG routines already use this type of block specification, and so I decided to be consistent across all routines. So, what does this mean? It does mean that you cannot simply pick up a VAX Pascal program which uses SMG and port it immediately to the PC. This should be rather obvious, however, due to the differing nature of the two machines. It does not mean that a program can't be converted, however. I converted a VAX Pascal program about 1000 lines in length, to run on a PC in about a day. It was not my intention to support the conversion of VAX Pascal programs to Turbo Pascal, but it can be done. My goal was to provide the PC with a facility similar enough to VMS/SMG that PC programmers familiar with VMS/SMG could use it with little or no learning curve. Of course, it would also make an excellent windowing package for programmer's who do not know VMS/SMG, but some learning would be involved (not much however, as SMG is very intuitive). One last note: In order to support all possible hardware configurations (MDA, MGA, MCGA, EGA, VGA, and whatever else) I decided to use an existing package to do the low-level direct screen i/o. I am currently developing on three such platforms, but I believe I have chosen a single one to use. The package is QWIK Screen Utilities by Eagle Performance Software. The package is very powerful, and comprises little more than 2k of code even if all 40 plus routines are used. My primary reasons for selecting this package are its support for virtual screens, and its availability for both Turbo Pascal and Turbo C (my next implementation). Alas, the software is a shareware package which I believe currently costs $20 to $30. Sorry, but I did not have the time to develop the support for all the different hardware myself, and the price was right. SMG-PC will be freely distributed. The QWIK library you must obtain for yourself (several anonymous FTP sites as well as any respectable programming BBS will have the shareware version). When a beta test release is ready, I will post another message here (and probably a couple other groups as well). If you have any questions, please E-MAIL to me. -- ------------------------------------------------------------------------ Ron Pacheco "puh-check'-oh" _ _ INTERNET: ronp@cs.umr.edu |_) |_) _ _ |_ _ _ _ BITNET: S100977@UMRVMA.BITNET | \_| (_\_(__| |_(/_(__(_)__