home *** CD-ROM | disk | FTP | other *** search
-
- **************************************************************
- INTERRUPT 49H INTERFACE FOR MAGIC
- **************************************************************
-
- This interface allows external programs to control MAGIC TSR.
- The default interrupt number is changable via command line switch
- /Inn, e.g. /I64 would set interrupt 64 hex.
-
- In order for caller to identify whether MAGIC holds the interrupt 49h,
- @@--NEW-->@@
- there is a 6 byte ID stored immediately preceeding the interrupt service.
- The ID is: " MAGic" (case as shown, quotes are not part of the string).
- For MAGic Deluxe the ID string is "xMAGic". The ID string will not wrap
- around the segment boundaries, thus the offset of the interrupt vector
- must be at least 6.
-
- ID can be used to identify MAGIC and also to find which interrupt
- vector is used - application can examine 256 interrupt vectors
- and check 6 bytes preceeding the service routine. As an additional
- check, in the same segment at offset 0 there will be standard
- CodeRunneR ID: RT followed by 4 byte TSR ID: VMAG (for VGA MAGIC).
-
-
-
- INT 49h OPERATIONAL CONVENTIONS
-
- 1. Caller's registers AX,BX,CX,DX are modified.
- Registers DS,ES,SI,DI,BP,SS,SP and Flags are preserved.
-
- 2. Function number (1,2,..) is passed in AX register. Any other
- arguments are passed in BX,CX,DX.
-
- 4. Operation status is returned in AX. Any other return values
- are passed in BX,CX,DX.
-
- 5. The following return status values (AX) are common to all
- functions:
-
- -1 TSR was busy, try same call later
- -2 Invalid function number
- -3 Function works only in magnified mode
- -4 Function works only in unmagnified mode
- -5 Function works only for MAGic Deluxe
-
-
- 6. Horizontal (X) and vertical (Y) coordinates or sizes are passed
- (or returned) in registers DX for X and BX for Y.
-
- 7. The coordinates/sizes are measured in the same units as
- those used by VGA hardware:
-
- a) In graphics modes
-
- X: 8 pixel units
- Y: 1 pixel units
-
- b) Text modes
-
- X: character columns
- Y: character lines
-
- All coordinates are 0 based, sizes are 1 based.
-
-
- 8. Interrupts are enabled during command execution and any other
- MAGIC operations are locked out.
-
-
- *************************************************************************
- FUNCTIONS
- *************************************************************************
-
-
- --01-- Magnify ON
-
- ENTRY: AX = 1
- EXIT: AX = 0 Cannot magnify in current video state
- = 2 Magnified in text mode
- = 3 Magnified in graphics mode
-
- --02-- Magnify OFF
-
- ENTRY: AX = 2
- EXIT: AX = * Same as function 1
-
-
- --03-- Capture screen point (e.g. mouse cursor)
-
- ENTRY: AX = 3
- DX = X
- BX = Y
-
- EXIT: AX = 0 Ok
-
- Specified X,Y point is made part of magnified window. No window
- movement is done is the point is already within the window.
-
-
- --04-- Reposition magnified window
-
- ENTRY: AX = 4
- DX = X of upper left corner
- BX = Y of upper left corner
-
- EXIT: AX = 0 Ok
-
- Sets upper left corner of the magnified window to requested
- coordinates. If the coordinates are outside of valid screen
- boundaries, the nearest position is set.
-
-
- --05-- Get position of magnified window
-
- ENTRY: AX = 5
- EXIT: AX = 0 Position in DX,BX is valid only if AX is 0.
- DX = X
- BX = Y
-
-
- --06-- Get full screen size (valid only in magnified mode)
-
- ENTRY: AX = 6
- EXIT: AX = 0 Sizes in DX,BX is valid only if AX is 0.
- DX = Horizontal size
- BX = Vertical size
-
-
- --07-- Get magnified window size
-
- ENTRY: AX = 7
- EXIT: AX = 0 Sizes in BX,DX is valid only if AX is 0.
- DX = Horizontal size
- BX = Vertical size
-
- The sizes returned are always smaller or equal than those
- of full screen (equal only in modes where no magnification
- is possible).
-
- --08-- Set text mode magnification size
-
- ENTRY: AX = 8
- BX = Scaling factor 1,2,4,6,8,9
- Values 4,6,8,9 are available only for MAGic Deluxe
-
- EXIT: AX = 0 Ok
- = -4 MAGic is in magnified state, can't set size
- = -5 Requested size works only for MAGic Deluxe
-
- This function may be called only in unmagnified state to set
- the size for subsequent magnify-on call (func AX=1).
-
- Regular MAGic supports only BX=1 and 2 (magnifications 1.4 and
- 2 times). MAGic Deluxe supports additional values BX=4,6,8,9
- (magnifications 4,6,8,12 times).
-
-