
                   Ŀ
                        Int51H.exe    
                                      
                    New Interrupt 51H 
                   


                          Ŀ
                           BY 
                          


               Ŀ
                  VT Virtual Technology   
                     Thierry Corniere     
                46, avenue Gnral Guisan 
                1009 Pully - SUISSE       
                                          
                Tl: (021) 729 97 12      
                Fax: (021) 728 69 76      
               

               Ŀ
                E-Mail : 101507.2370@compuserve.com 
               


    *** IMPORTANT ***

    unregistered copy = A - 30 days trial period

                        B - use INT51H2.EXE instead of INT51H.EXE


    Ŀ
     Description    
    

    Int 51H  is a resident part  of the system  installed at absolute
    address of  old int 51H  in order to offer you  powerful services
    when calling int 51H from your own program.
    From a simple dos program in the language of your choice  (C/C++,
    pascal, fortran, assembler, ...)   you will be able to  LOAD  and
    EXEC 32 bits or 16 bits programs under Windows 95 or Dos.

    Main Services : Load and Exec - Windows 95    32 bits programs
                    Load and Exec - Ms-Dos/Pc-Dos 16 bits programs
                    Run a 2nd copy of command.com
                    Perform available Dos functions
                    Reboot the computer
                    Copy n bytes from address_1 to address_2

    Ŀ
         Set up      
    

    Use PKUNZIP to get INT51H.EXE and readme.txt from INT51H.ZIP

    To make  int 51h always available, you have just to include it in
    your autoexec file ( c:\int51h.exe ) and reboot the computer.
    You can put int 51H  in the directory of your choice but you will
    have to indicate the right one in autoexec.bat.
    If you don't want to do this, you can also start  int 51H at  Dos
    prompt (c:\int51h.exe) or make a dynamic load (LH c:\int51h.exe).


    Ŀ
     How does it work ? 
    

    Service 01H   Load/exec a program (.exe or .com)

                  entry   AL=01H
                          DS:SI=segment/offset for program to exec
                          CX=length in bytes for program name
                             4 <= CX <= 60

                  return  AH=01H incorrect CX range
                          AH=02H deallocation failed
                          AH=03H load/exec failed
                          AH=04H function complete

    Service 02H   Reboot the computer (only from Dos)

                  entry   AL=02H

                  return  none

    Service 03H   Is int 51h installed ?

                  entry   AL=03H

                  return  AH=0FFH Int 51h is available

    Service 04H   copy CX byte from DS:SI to ES:DI

                  entry   AL=04H
                          DS:SI address_1
                          ES:DI address_2
                          CX=length in bytes

                  return  none

                  Can be commonly used for string copy but you also
                  have  a way  to  modify  your  program  code when
                  executing ... Be careful ...

    Service 05H   Run 2nd copy of command.com (taking the one which
                  is in root directory c:\command.com)

                  entry   AL=05H
                          DS:SI segment/offset of parameter block
                                (not used if CX=0)
                          CX=parameter block length in bytes
                             0 <= CX <= 57
                          CX=0 means "start command.com"
                          CX#0 means "start command.com and  exec
                                      the required Dos function"

                  return  AH=01H incorrect CX range
                          AH=02H deallocation failed
                          AH=03H load/exec failed
                          AH=04H function complete

    When calling int 51h,  registers  ES,DS,SI,DI,DX,CX,BX  will be
    saved then restored.

    Ŀ
     Examples 
    

    Example 1 : Load and exec Dos version of scandisk

                prog db "c:\dos\scandisk.exe",0

                        mov ax,@data
                        mov ds,ax
                        mov si,offset prog
                        mov cx,19
                        mov al,01H
                        INT 51H

    Example 2 : Load and exec regedit for Windows 95

                prog db "c:\win95\regedit.exe",0

                        mov ax,@data
                        mov ds,ax
                        mov si,offset prog
                        mov cx,20
                        mov al,01H
                        INT 51H

    Example 3 : Load and exec Windows 95 configuration panel

                prog db "c:\win95\control.exe",0

                        mov ax,@data
                        mov ds,ax
                        mov si,offset prog
                        mov cx,20
                        mov al,01H
                        INT 51H

    Example 4 : Start Windows

                prog db "c:\windows\win.com",0

                        mov ax,@data
                        mov ds,ax
                        mov si,offset prog
                        mov cx,18
                        mov al,01H
                        INT 51H

    Example 5 : Reboot the computer

                        mov al,02H
                        INT 51H

    Example 6 : Do a job if int 51H is installed

                        mov al,03H
                        INT 51H
                        cmp ah,0FFH
                        je exec_do
                        jmp exec_end

    Example 7 : copy n bytes from string1 to string2

                string1 db "game over ...",0
                string2 db "Teddy,Bob,Bill",0

                        mov ax,@data
                        mov ds,ax
                        mov es,ax
                        mov si,offset string1
                        mov di,offset string2
                        mov cx,9
                        mov al,04H
                        INT 51H

                (result in string2 = "game over,Bill")

    Example 8 : open a dos box or a dos screen

                        mov cx,0
                        mov al,05H
                        INT 51H

    Example 9 : exec dos command XCOPY

                comm db "xcopy a:\*.* c:\mydir\*.* > null",0

                        mov ax,@data
                        mov ds,ax
                        mov si,offset comm
                        mov cx,32
                        mov al,05H
                        INT 51H

    Example 10 : exec dos command FORMAT

                comm db "format a: /u /s /v:disk1",0

                        mov ax,@data
                        mov ds,ax
                        mov si,offset comm
                        mov cx,24
                        mov al,05H
                        INT 51H

    Ŀ
     Support 
    

    Support is provided using compuserve mail 101507.2370@compuserve.com

    You will receive an answer in a  reasonable time  ( probably  within
    24 hours ).

    Ŀ
     More ...  
    

    Int 51H is available for only 10 US $ . You can register following
    "instructions to register" with compuserve process.

    VT Virtual Technology is not responsible for any damage or improper
    use with int 51H.
