Skip to content

MartyPC Service Interrupts

dbalsom edited this page Aug 11, 2026 · 3 revisions

MartyPC Service Interrupts

MartyPC has a service interrupt vector, which is F5h by default as of 0.4.2.

I plan to use this vector to provide various MartyPC-specific DOS utilities that do otherwise "impossible" things, like crossing guest-host boundaries.

Identifying MartyPC

The actual service interrupt vector is configurable and should not be assumed to be a specific value. The exact vector can be queried via int 2Fh, the DOS mux-chain interrupt. This interrupt discovery mechanism will work even outside of DOS, since MartyPC hooks it at the CPU level.

Int 2Fh Probe

Input:

  • AX == F500h
  • BX == DEADh
  • CX == BEEFh

Output if running in MartyPC:

  • AL == FFh ; AL==FFh = installed
  • BX == 4D50h ; "MP"
  • CX == MartyPC version
    • MSB: Major Version
    • LSB: Minor Version
  • DL == service interrupt vector
  • DH == service flags
  • SI == API version (currently 0100h)

Service Flags

  • Bit 0:
    • 0 ; Service Interrupt Vector not installed
    • 1 ; Service Interrupt Vector installed

MartyPC Service Interrupt Functions

Interrupt functions are specified via AH, aligned with typical convention.

00h Service Control

Input:

  • BX == DEADh
  • CX == BEEFh
  • AL:
    • 00h ; disable MartyPC services
    • 01h ; enable MartyPC services
    • 02h ; query service state

Output:

  • AL:
    • 00h ; services disabled
    • 01h ; services enabled

Clone this wiki locally