;-----------------------------------------------------------------
;         GSHACK.COM (C)1988 BY DAVID W. GUNNELL
;         COMPILE WITH MICROSOFT MACRO ASSEMBLER 4.0 OR GREATER
;         LINK WITH MICROSOFT LINKER - NOT OVERLAY LINKER
;         EXE2BIN GSHACK HSHACK.COM
;         TO USE SIMPLY MAKE A COPY OF GUNSHIP DISK A WITH
;         COPYIIPC 3.09 OR GREATER ALWAYS USE A COPY ESPECIALLY
;         IF YOUR ARE GOING TO INSTALL GUNSHIP ON A HARD DISK
;         RUN GSHACK
;         YOU CAN EITHER RUN GUNSHIP FROM FLOPPY OR INSTALL
;         GUNSHIP ON HARD DISK.
;         IF YOUR HARD DISK TAKES A SHIT SIMPLY MAKE ANOTHER
;         WORKING COPY OF DISK A FROM YOUR UNINSTALLED ORIGINAL
;         AND REPEAT THE ABOVE STEPS
;         DISK B IS NOT COPY PROTECTED SO YOU CAN USE DOS DISKCOPY
;         THIS HAS BEEN TESTED ON VERSION 429.01 OF GUNSHIP
;         AND MAY NOT WORK ON ANY OTHER VERSION
;         ESPECIALLY IF THEY MADE PROTECTION CHANGES
;-----------------------------------------------------------------
CODE        SEGMENT PARA PUBLIC 'CODE'
            ORG     100H
            ASSUME  CS:CODE, DS:NOTHING, ES:NOTHING, SS:NOTHING
ENTRY:      JMP     INSTALL
OLD13       DD      ?              ;OLD INT 13 SAVE AREA

NEW_INT13   PROC    FAR
            CMP     DX,0           ;IS THIS A DRIVE 0 REQUEST
            JNZ     SKIP           ;IF NOT GOTO OLD INT 13
            CMP     CH,04H         ;IS THIS Q REQUEST FOR TRACK 4
            JNZ     SKIP
            CMP     CL,0           ;IS THIS A REQUEST FOR SECTOR 0
            JNZ     SKIP
            NOP                     ;NOP'S ARE FOR TIMING DELAYS
            NOP
            NOP
            NOP
            NOP
            NOP
            NOP
            POP     AX
            MOV     AX,0D5DH       ;PASS TO GUNSHIP WHAT ERROR
            PUSH    AX             ;CODE HE WANTS
            IRET
SKIP:       JMP     DWORD PTR CS:OLD13
NEW_INT13   ENDP

MESSAGE     DB      'GUNSHIP HACK NOW INSTALLED',13,10
            DB      '(C) 1988 David W. Gunnell',13,10,'$'

INSTALL     PROC    NEAR
            ASSUME  CS:CODE, DS:CODE, ES:NOTHING, SS:CODE
            MOV     AX,3513H       ;GET INT13 VECTOR ADDRESS
            INT     21H            ;THROUGH DOS
            MOV     WORD PTR OLD13,BX ;SAVE THE ADDRESS
            MOV     WORD PTR OLD13+2,ES
            MOV     DX,OFFSET NEW_INT13 ;POINT TO NEW INT 13 HANDLER
            MOV     AX,2513H       ;CHANGE INT 13 VECTOR
            INT     21H            ;THROUGH DOS
            MOV     AH,9           ;PRINT INSTALL MESSAGE
            MOV     DX,OFFSET MESSAGE
            INT     21H            ;PRINT MESSAGE
            INT     27H            ;TERMINATE STAY RESIDENT
INSTALL     ENDP
CODE        ENDS
            END     ENTRY
