Technical Capabilities
Having trouble finding what you need?
Get in touch with us, so we can answer your specific questions directly.
Get In Touch
technical
/
Display
/
VX/SMG - SMG

VX/SMG - SMG

Description

VX/SMG is a full implementation of DEC’s VMS/OpenVMS Screen Management Service (SMG$) for Linux and Windows. It provides a call-compatible interface for all 3GL languages, allowing applications that use SMG$ routines on VMS to function identically on modern platforms.

VX/SMG ensures that user programs remain independent of the physical display devices, offering virtual displays, pasteboards, viewports, and advanced terminal rendering features.

Key Features

Full SMG$ API Compatibility – Implements all VMS SMG$ calls without modification.

Terminal Independence – Works with VT100, VT220, VTxxx ANSI, AT386, and DECterm.

Advanced Window Management – Supports pasteboards, multiple windows, overlapping views.

Extended Rendering Features – Includes double-wide characters, scrolling regions, and cursor control.

Seamless Migration – Works without modifying original VMS SMG applications.

Performance Optimized – Implements a native C-based terminal driver, bypassing curses, termcap, and terminfo for high-speed execution.

VX/SMG Features and Compatibility

VX/SMG retains all core functionalities of VMS/OpenVMS SMG while enabling enhanced flexibility in modern environments.

Feature Description
Virtual DisplaysAllows **independent screen areas** for applications.
PasteboardsProvides a **logical screen buffer** that manages multiple displays.
ViewportsEnables **scrollable window views** into larger virtual displays.
Double-Wide CharactersSupports **double-wide and double-high text rendering**.
Terminal IndependenceCompatible with **VT100, VT220, VTxxx, and DECterm**.
Cursor & Text ControlSupports **positioning, deletion, insertion, and erasure of text**.


VX/SMG enables seamless execution of legacy VMS SMG applications while enhancing performance and portability.

VX/SMG Functionality & Terminal Support

Multiple Screen Regions

VX/SMG allows applications to create multiple independent windows using virtual displays, each of which can be dynamically moved, updated, or hidden.

Pasteboards – Act as logical containers for multiple screen areas.

Viewports – Provide zoomed-in windows into larger virtual displays.

Occlusion Checking – Ensures correct layering of overlapping windows.

Direct Terminal Access

VX/SMG does not rely on curses, termcap, or terminfo, instead using a native C-based driver for:

Faster rendering

Hardware scrolling support

More efficient screen updates

Supported terminals include:

VT100, VT220, VTxxx ANSI

AT386 and DECterm


Telnet Image
(TOLAS screen kindly donated by GSI Transcomm)


Windows version of above screen. WINSMG is now obsolete and will only be resurrected under pain of torture, imminent death or cash.

SMG for Windows

Example: Using Virtual Displays in VX/SMG

#include "vxsmg.h"

int main() {
    SMG$CREATE_VIRTUAL_DISPLAY(24, 80, &display_id);
    SMG$PASTE_VIRTUAL_DISPLAY(display_id, pasteboard_id, 1, 1, 0);
    SMG$PUT_LINE(display_id, "Welcome to VX/SMG!");
    SMG$DELETE_VIRTUAL_DISPLAY(display_id);
    return 0;
}

VX/SMG API Reference (SMG$ Functions)

VX/SMG fully implements the VMS SMG$ API, ensuring compatibility with existing applications.

SMG$ API Function
SMG$ALLOW_ESCAPEEnables escape sequence handling in terminal input.
SMG$BEGIN_DISPLAY_UPDATELocks the display for batch updates.
SMG$BEGIN_PASTEBOARD_UPDATEBegins an optimized pasteboard update session.
SMG$CANCEL_INPUTCancels pending input requests.
SMG$CHANGE_PBD_CHARACTERISTICSModifies pasteboard characteristics.
SMG$CHANGE_RENDITIONChanges text appearance (e.g., bold, underline).
SMG$CHANGE_VIEWPORTAdjusts viewport dimensions.
SMG$CHANGE_VIRTUAL_DISPLAYModifies properties of a virtual display.
SMG$CHANGE_VIRTUAL_KEYBOARDAlters keyboard settings.
SMG$CHECK_FOR_OCCLUSIONDetermines if a display is occluded.
SMG$CONTROL_MODEConfigures display control modes.
SMG$COPY_VIRTUAL_DISPLAYDuplicates a virtual display.
SMG$CREATE_MENUCreates a menu interface.
SMG$CREATE_PASTEBOARDCreates a logical screen buffer.
SMG$CREATE_VIEWPORTDefines a viewport in the display.
SMG$CREATE_VIRTUAL_DISPLAYAllocates a new virtual screen region.
SMG$CREATE_VIRTUAL_KEYBOARDCreates a virtual keyboard.
SMG$CURSOR_COLUMNGets or sets the cursor column.
SMG$CURSOR_ROWGets or sets the cursor row.
SMG$DEFINE_KEYAssigns a function to a key.
SMG$DELETE_CHARSRemoves characters from the display.
SMG$DELETE_LINEDeletes a line of text.
SMG$DELETE_MENURemoves a menu from memory.
SMG$DELETE_PASTEBOARDDeletes a pasteboard.
SMG$DELETE_VIEWPORTRemoves a viewport from the display.
SMG$DELETE_VIRTUAL_DISPLAYRemoves a virtual display from memory.
SMG$CREATE_VIRTUAL_KEYBOARDCreates a virtual keyboard.
SMG$CURSOR_COLUMNGets or sets the cursor column.
SMG$CURSOR_ROWGets or sets the cursor row.
SMG$DEFINE_KEYAssigns a function to a key.
SMG$DELETE_CHARSRemoves characters from the display.
SMG$DELETE_LINEDeletes a line of text.
SMG$DELETE_MENURemoves a menu from memory.
SMG$DELETE_PASTEBOARDDeletes a pasteboard.
SMG$DELETE_VIEWPORTRemoves a viewport from the display.
SMG$DELETE_VIRTUAL_DISPLAYRemoves a virtual display from memory.
SMG$DELETE_VIRTUAL_KEYBOARDRemoves a virtual keyboard.
SMG$DISABLE_BROADCAST_TRAPPINGDisables broadcast message trapping.
SMG$DRAW_CHARDraws a single character at the cursor position.
SMG$DRAW_CHARACTERRenders a character at a specified position.
SMG$DRAW_LINEDraws a line on the virtual display.
SMG$DRAW_RECTANGLECreates a rectangular shape on the display.
SMG$END_DISPLAY_UPDATEUnlocks the display after batch updates.
SMG$END_PASTEBOARD_UPDATEEnds an optimized pasteboard update session.
SMG$ERASE_CHARSErases specified characters from the display.
SMG$ERASE_COLUMNClears a column of text on the display.
SMG$ERASE_DISPLAYClears the entire display.
SMG$ERASE_LINEErases the current line from the display.
SMG$ERASE_PASTEBOARDClears all content from the pasteboard.
SMG$FIND_CURSOR_DISPLAYIdentifies which display contains the cursor.
SMG$FLUSH_BUFFERFlushes output buffers to the terminal.
SMG$GET_BROADCAST_MESSAGERetrieves system broadcast messages.
SMG$GET_CHAR_AT_PHYSICAL_CURSORGets the character at the cursor position.
SMG$GET_DISPLAY_ATTRRetrieves display attributes of a virtual screen.
SMG$GET_KEYBOATD_ATTRIBUTESGets keyboard characteristics.
SMG$GET_PASTEBOARD_ATTRIBUTESRetrieves pasteboard properties.
SMG$GET_PASTING_INFOFetches details on pasting order.
SMG$GET_TERM_DATARetrieves terminal configuration data.
SMG$GET_VIEWPORT_CHARGets the character at viewport position.
SMG$HOME_CURSORMoves the cursor to the home position.
SMG$INIT_TERM_TABLEInitializes the terminal information table.
SMG$INIT_TERM_TABLE_BY_TYPEInitializes a terminal table by type.
SMG$INSERT_CHARSInserts characters at cursor position.
SMG$INSERT_LINEInserts a new line at cursor.
SMG$INVALIDATE_DISPLAYMarks the display as needing refresh.
SMG$KEYCODE_TO_NAMEConverts a keycode to a name.
SMG$KEYPAD_MODESets the keypad mode.
SMG$LABEL_BORDERAdds a border label to a display.
SMG$LIST_PASTING_ORDERLists the pasting order of virtual displays.
SMG$LOAD_VIRTUAL_DISPLAYLoads a virtual display into memory.
SMG$MOVE_TEXTMoves text from one location to another.
SMG$MOVE_VIRTUAL_DISPLAYMoves a virtual display on the screen.
SMG$NAME_TO_KEYCODEConverts a key name to its keycode.
SMG$PASTE_VIRTUAL_DISPLAYAdds a virtual display to the pasteboard.
SMG$POP_VIRTUAL_DISPLAYRemoves the topmost virtual display from the stack.
SMG$PRINT_PASTEBOARDPrints the contents of the pasteboard.
SMG$PUT_CHARSWrites characters to the virtual display.
SMG$PUT_CHARS_HIGHWIDEWrites double-height, double-wide characters.
SMG$PUT_CHARS_MULTIWrites multi-byte character strings.
SMG$PUT_CHARS_WIDEWrites wide characters to the display.
SMG$PUT_LINEOutputs a line of text to the display.
SMG$PUT_LINE_HIGHWIDEOutputs a high-wide formatted line.
SMG$PUT_LINE_WIDEOutputs a wide-character formatted line.
SMG$PUT_PASTEBOARDWrites a pasteboard to the screen.
SMG$PUT_WITH_SCROLLOutputs text with automatic scrolling.
SMG$READ_FROM_DISPLAYReads data from a virtual display.
SMG$READ_KEYSTROKEReads a keystroke from the input buffer.
SMG$READ_STRINGReads a string of input from the user.
SMG$REPAINT_LINERepaints the specified line on the display.
SMG$REPAINT_SCREENRepaints the entire screen.
SMG$REPASTE_VIRTUAL_DISPLAYRepastes a virtual display to the pasteboard.
SMG$RESTORE_PHYSICAL_SCREENRestores a previously saved physical screen.
SMG$RETURN_CURSOR_POSReturns the current cursor position.
SMG$RING_BELLSounds the terminal bell.
SMG$SAVE_PHYSICAL_SCREENSaves the current physical screen state.
SMG$SAVE_VIRTUAL_DISPLAYSaves a virtual display to memory.
SMG$SCROLL_DISPLAY_AREAScrolls a specified area of the display.
SMG$SCROLL_VIEWPORTScrolls within a viewport.
SMG$SELECT_FROM_MENUAllows the user to select an item from a menu.
SMG$SET_BROADCAST_TRAPPINGEnables or disables broadcast message trapping.
SMG$SET_CURSOR_ABSSets the cursor position to absolute coordinates.
SMG$SET_CURSOR_MODESets the cursor visibility and blink mode.
SMG$SET_CURSOR_RELMoves the cursor relative to its current position.
SMG$SET_DISPLAY_SCROLL_REGIONDefines a scroll region within the display.
SMG$SET_KEYPAD_MODESets the keypad operating mode.
SMG$SET_PHYSICAL_CURSORSets the physical cursor position.
SMG$SET_TERM_CHARACTERISTICSModifies terminal characteristics.
SMG$UNPASTE_VIRTUAL_DISPLAYRemoves a virtual display from the pasteboard.


VX/SMG retains all SMG$ APIs required for seamless execution of legacy VMS applications.

Conclusion

100% SMG$ API compatibility on Linux & Windows

Full terminal control – pasteboards, virtual displays, viewports

No changes needed – identical execution to OpenVMS SMG

Seamless migration with Sector7’s VX/RT

Supports VT-terminals, DECterm, and ANSI-emulation

Optimized for performance – No reliance on termcap/curses

VX/SMG ensures that OpenVMS SMG-based applications function identically on Linux and Windows while enhancing performance and usability.

Frequently Asked Questions

Curious about how Sector7 can facilitate your application migration? Explore our FAQs for expert insights.

No items found.

Transform Your Legacy Software Today!

Get In Touch
Unlock the potential of your legacy software with our expert migration services.