Memory-resident keyboard activation in the way to control the speed of the game, in the game by CTRL-F9 activation, the effect is obvious!! (no keyboard unlock processing, interested to add)
Source:
Code segment
Assume Cs:code,ds:code
Org 100h
BEGIN:JMP Init
ZD db ' FAST V1.0 zdsoft 1995 ', 0dh,0ah, ' $ '
Mes db ' press CTRL-F9 to fast! ', 0dh,0ah, ' $ '
Mes1 db ' already install!$ '
INT9 DD?
Mark DB ' Zd '
New_int proc Far
STi
Push AX
Push ES
XOR Ax,ax
MOV Es,ax
In al,60h
Test al,80h
JNZ exit1
Test byte ptr es:[0417h],100b
JZ exit1
CMP al,67
JZ OK
JMP exit1
Ok:
Push AX
Push BX
Push CX
Push DX
Push BP
Push di
Push SI
Push DS
Push CS
Pop ds
In al,61h
Push AX
or al,80h
Out 61h,al
Pop ax
Out 61h,al
MOV al,20h
Out 20h,al
Call my
Pop ds
Pop si
Pop di
Pop bp
Pop DX
Pop CX
Pop bx
Pop ax
EXIT1:
Pop es
Pop ax
JMP Cs:int9
New_int ENDP
My proc near
MOV al,36h
Out 43h,al
MOV al,0
Out 40h,al
MOV al,10h
Out 40h,al
Ret
My ENDP
Init:
Cli
Push CS
Pop ds
MOV dx,offset ZD
MOV ah,9
int 21h
MOV ax,3509h
int 21h
CMP word ptr es:[bx-2], ' DZ '
JNZ Install
MOV Dx,offset mes1
MOV ah,9
int 21h
MOV ah,4ch
int 21h
Install
MOV Di,offset int9
mov [DI],BX
mov [di+2],es
Push CS
Pop ds
MOV Dx,offset new_int
MOV ax,2509h
int 21h
STi
mov dx,offset mes
MOV ah,9
int 21h
MOV dx,offset init
int 27h
Code ends
End begin