no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Last revision | |||
— | en:ibm:prcp:vio:globalreg [2016/09/15 05:31] – created valerius | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ==== VioGlobalReg ==== | ||
+ | |||
+ | **Bindings**: | ||
+ | |||
+ | [[globalreg|VioGlobalReg]] allows a subsystem to receive notification at the completion of VIO calls issued by all applications running in full-screen sessions. | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | Address of the ASCIIZ string containing the 1-8 character file name of the subsystem. The maximum length of the ASCIIZ string is 9 bytes including the terminating byte of zero. The module must be a dynamic link library but the name supplied must not include the .DLL extension. | ||
+ | |||
+ | // | ||
+ | Address of the ASCIIZ name string containing the dynamic link entry point name of the routine in the subsystem to receive control when any of the registered functions is called. The maximum length of the ASCIIZ string is 33 bytes including the terminating byte of zero. | ||
+ | |||
+ | // | ||
+ | A bit mask where each bit identifies a video function being registered. The bit definitions are shown below. The first word pushed onto the stack contains the high-order 16 bits of the function mask, and the second word contains the low-order | ||
+ | 16 bits. | ||
+ | |||
+ | |||
+ | ^ BIT | ||
+ | | 31 | VioPrtScToggle | ||
+ | | 30 | VioEndPopUp | ||
+ | | 29 | VioPopUp | ||
+ | | 28 | VioSavRedrawUndo | ||
+ | | 27 | VioSavRedrawWait | ||
+ | | 26 | VioScrUnLock | ||
+ | | 25 | VioScrLock | ||
+ | | 24 | VioPrtSc | ||
+ | | 23 | VioGetAnsi | ||
+ | | 22 | VioSetAnsi | ||
+ | | 21 | VioScrollRt | ||
+ | | 20 | VioScrollLf | ||
+ | | 19 | VioScrollDn | ||
+ | | 18 | VioScrollUp | ||
+ | | 17 | VioWrtCellStr | ||
+ | | 16 | VioWrtCharStrAtt | ||
+ | |||
+ | // | ||
+ | A bit mask where each bit identifies a video function being registered. The bit mask has the format shown below. The first word pushed onto the stack contains the high order 16 bits of the function mask, and the second word contains the low order 16 bits. Unused bits are reserved and must be set to zero. | ||
+ | |||
+ | ^Bit ^Registered Function ^ | ||
+ | |31-11 |Reserved, must be set to zero. | | ||
+ | |10 |VioDeRegister | | ||
+ | |9 |VioRegister | | ||
+ | |8 |VioSetState | | ||
+ | |7 |VioGetState | | ||
+ | |6 |VioSetFont | | ||
+ | |5 |VioGetCp | | ||
+ | |4 |VioSetCp | | ||
+ | |3 |VioGetConfig | | ||
+ | |2 |VioGetFont | | ||
+ | |1 |VioModeUndo | | ||
+ | |0 |VioModeWait | | ||
+ | |||
+ | // | ||
+ | Reserved and must be zero. | ||
+ | |||
+ | //rc// (**USHORT**) - return | ||
+ | Return code descriptions are: | ||
+ | |||
+ | |0 |NO_ERROR | | ||
+ | |349 |ERROR_VIO_INVALID_MASK | | ||
+ | |403 |ERROR_VIO_INVALID_ASCIIZ | | ||
+ | |426 |ERROR_VIO_REGISTER | | ||
+ | |494 |ERROR_VIO_EXTENDED_SG | | ||
+ | |||
+ | **Remarks** | ||
+ | |||
+ | Notification of VIO calls issued within the hard error handler and DOS (real mode) sessions is not provided. | ||
+ | |||
+ | When control is routed to // | ||
+ | |||
+ | For example, if [[setcurpos|VioSetCurPos]] were a registered function, the stack would appear as if the following instruction sequence were executed if [[setcurpos|VioSetCurPos]] were called and control routed to // | ||
+ | |||
+ | < | ||
+ | | ||
+ | │ PUSH | ||
+ | │ PUSH | ||
+ | │ PUSH | ||
+ | │ CALL | ||
+ | │ PUSH | ||
+ | │ CALL | ||
+ | │ PUSH | ||
+ | │ CALL | ||
+ | | ||
+ | </ | ||
+ | |||
+ | The index numbers that correspond to the registered functions are listed below: | ||
+ | |||
+ | |0 |VioGetPhysBuf |22 |VioSetAnsi | | ||
+ | |1 |VioGetBuf |23 |VioGetAnsi | | ||
+ | |2 |VioShowBuf |24 |VioPrtSc | | ||
+ | |3 |VioGetCurPos |25 |VioScrLock | | ||
+ | |4 |VioGetCurType |26 |VioScrUnLock | | ||
+ | |5 |VioGetMode |27 |VioSavRedrawWait | | ||
+ | |6 |VioSetCurPos |28 |VioSavRedrawUndo | | ||
+ | |7 |VioSetCurType |29 |VioPopUp | | ||
+ | |8 |VioSetMode |30 |VioEndPopUp | | ||
+ | |9 |VioReadCharStr |31 |VioPrtScToggle | | ||
+ | |10 |VioReadCellStr |32 |VioModeWait | | ||
+ | |11 |VioWrtNChar |33 |VioModeUndo | | ||
+ | |12 |VioWrtNAttr |34 |VioGetFont | | ||
+ | |13 |VioWrtNCell |35 |VioGetConfig | | ||
+ | |14 |VioWrtCharStr |36 |VioSetCp | | ||
+ | |15 |VioWrtCharStrAtt |37 |VioGetCp | | ||
+ | |16 |VioWrtCellStr |38 |VioSetFont | | ||
+ | |17 |VioWrtTTY |39 |VioGetState | | ||
+ | |18 |VioScrollUp |40 |VioSetState | | ||
+ | |19 |VioScrollDn |41 |VioRegister | | ||
+ | |20 |VioScrollLf |42 |VioDeRegister | | ||
+ | |21 |VioScrollRt | | ||
+ | |||
+ | On entry to the global subsystem, AX contains the return code that is returned to the application that issued the VIO call. The global subsystem must return with all stack parameters and all general purpose registers, including AX, restored to the same values as on entry. | ||
+ | |||
+ | All VIO functions within a session are serialized on a thread basis. That is, when a global subsystem receives control, it can safely assume that it is not called again from the same session until the current call has completed. Note, however, that VIO calls across different sessions are not serialized. | ||
+ | |||
+ | [[globalreg|VioGlobalReg]] may only be issued during system initialization. After system initialization, | ||
+ | |||
+ | If multiple global subsystems are registered, they are given control in the order that they are registered. | ||
+ | |||
+ | A globally registered subsystem receives control on VIO calls issued from all full-screen sessions except the hard error handler and DOS (real mode) sessions. | ||
+ | |||
+ | === C bindings === | ||
+ | |||
+ | <code c> | ||
+ | #define INCL_VIO | ||
+ | |||
+ | USHORT | ||
+ | | ||
+ | |||
+ | PSZ ModuleName; | ||
+ | PSZ EntryPoint; | ||
+ | ULONG FunctionMask1; | ||
+ | ULONG FunctionMask2; | ||
+ | LONG | ||
+ | |||
+ | USHORT | ||
+ | </ | ||
+ | |||
+ | === MASM bindings === | ||
+ | |||
+ | <code asm> | ||
+ | EXTRN VioGlobalReg: | ||
+ | INCL_VIO | ||
+ | |||
+ | PUSH@ ASCIIZ ModuleName | ||
+ | PUSH@ ASCIIZ EntryPoint | ||
+ | PUSH DWORD FunctionMask1 | ||
+ | PUSH DWORD FunctionMask2 | ||
+ | PUSH DWORD 0 ; | ||
+ | CALL VioGlobalReg | ||
+ | |||
+ | Returns WORD | ||
+ | </ | ||