Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| en:docs:mvm:api:1 [2026/03/20 03:03] – prokushev | en:docs:mvm:api:1 [2026/03/20 03:11] (current) – prokushev | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== SVC_ERROREXIT ====== | ====== SVC_ERROREXIT ====== | ||
| - | Terminate MVM with an error message. This call displays a message and then terminates the current MVM session. | + | ===== Brief ===== |
| - | ===== Parameters ===== | + | Terminate MVM with error message (far pointer to ASCIIZ message on stack) |
| - | ^ Register ^ Description ^ | + | ===== Input ===== |
| - | | Stack (top) | Far pointer (segment: | + | |
| - | ===== Return Value ===== | + | * Stack (top) = far pointer (segment: |
| - | This function does not return; it terminates the MVM. | + | ===== Return ===== |
| - | ===== Description ===== | + | This function does not return. The MVM is terminated and control passes to the host operating system. |
| - | **SVC_ERROREXIT** provides a way to terminate the MVM (Multiple Virtual DOS Machine) with a user‑supplied error message. It is specific to the OS/2 MVDM environment and has no direct equivalent in DOS INT 21h (the closest is AH=4Ch, which terminates without a message). | + | ===== Notes ===== |
| - | Before invoking the call, the far pointer (segment and offset) of a null‑terminated ASCII string must be pushed onto the stack. The host system | + | * The message must be a null‑terminated ASCII string. |
| + | * The far pointer | ||
| + | * Because the call never returns, no registers are preserved | ||
| - | ===== Interface | + | ===== Binding |
| + | ====MASM | ||
| - | <code c> | ||
| - | /* SVC_ERROREXIT – terminate with error message (far pointer on stack) */ | ||
| - | extern void SvcErrorExit(const char far *msg); | ||
| - | #pragma aux SvcErrorExit = \ | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | parm caller [] [msg] \ | ||
| - | modify [ax bx cx dx]; | ||
| - | </ | ||
| - | |||
| - | ===== Example ===== | ||
| - | |||
| - | **MASM** | ||
| <code asm> | <code asm> | ||
| Line 45: | Line 33: | ||
| </ | </ | ||
| - | **C** | + | ==== C ==== |
| <code c> | <code c> | ||
| Line 55: | Line 43: | ||
| </ | </ | ||
| + | The underlying pragma is defined as: | ||
| + | <code c> | ||
| + | extern void SvcErrorExit(const char far *msg); | ||
| + | #pragma aux SvcErrorExit = \ | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | parm caller [] [msg] \ | ||
| + | modify [ax bx cx dx]; | ||
| + | </ | ||
| - | ===== Notes ===== | + | ===== See also ===== |
| - | + | ||
| - | * The message string must be in the ASCIIZ format (zero‑terminated). | + | |
| - | * After this call, the MVM is terminated and control returns to the host operating system. | + | |
| - | * Because the call never returns, no register values are preserved. | + | |
| - | + | ||
| - | ===== See Also ===== | + | |
| - | + | ||
| - | * [[en: | + | |
| - | * [[en: | + | |
| + | * [[en: | ||
| + | * [[en: | ||
| {{page> | {{page> | ||




