Dallas Semiconductor Corporation Spring 1985 VAX/VMS DECUS Tape Contribution This contribution consists of a set of macros which support the VAX/VMS V4.x SMG$ RTL screen management routines from VAX-11 MACRO32 assembly language. Under the VMS V3.x SCR$ screen driver routines, it was possible to pass numeric values to the screen function routines as immediate values from assembly language programs. This functionality does not exist under the version 4.x routines, as all numeric arguments must be passed by reference. This, in combination with the large number of arguments required by the version 4.x SMG$ routines make the use of them in MACRO32 quite difficult. The enclosed macros allow a very simple access mechanism to these routines, with support for the passing of immediate values as well as normal pass-by-reference calling mechanisms. As an example of how the SMG$ routines would be invoked using the interface macros, examine the following source lines: ;----------------------------------------------------------------------; ; ; ; Create the virtual display ; ; ; ;----------------------------------------------------------------------; SMG$CREATE_VIRTUAL_DISPLAY- NUM_ROWS=#5,- NUM_COLUMNS=#12,- NEW_DISPLAY_ID=DID,- DISPLAY_ATTRIBUTES=R5,- VIDEO_ATTRIBUTES=R3 ;----------------------------------------------------------------------; ; ; ; Paste the virtual display ; ; ; ;----------------------------------------------------------------------; SMG$PASTE_VIRTUAL_DISPLAY- DISPLAY_ID=DID,- PASTEBOARD_ID=PID,- PASTEBOARD_ROW=#22,- PASTEBOARD_COLUMN=#7 As you can see, the function calls directly map the RTL entrypoints for each SMG$ screen routine, and the function parameter names match exactly the argument names given in the VMS documentation for each routine entrypoint. The only exception in routine naming Page 2 takes place where the documentation is inconsistant. In these cases, a naming convention for parameters was adopted to solve the problem. In addition to the normal function arguments for each screen function, there are also standard SUCCESS and FAILURE parameters which can be specified to jump to success/error processing routines for special case processing. By default, all errors are signalled via LIB$SIGNAL. These routines allow very rapid development of screen applications in MACRO32, as all the overhead of generating argument lists is removed from the code and buried in these support macros. In the cases of immediate value arguments (#5, R3, R6, etc.) the by-reference argument is automatically generated, allowing the programmer to concentrate on application development rather than argument list generation. I hope these macros are of use to other heavy users of MACRO32 out there, as it seems that DEC has left us out in the cold with the "new and improved" SMG$ services. If you have problems with these routines, please feel free to contact me personally: Kevin Klughart Dallas Semiconductor 4350 Beltwood Parkway South Dallas, Texas 75244 (214) 450-0400