home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Interdit
/
pc-interdit.iso
/
trainer
/
tr_raid.asm
< prev
next >
Wrap
Assembly Source File
|
1994-10-19
|
3KB
|
138 lines
; **************************************
; *** ***
; *** Entraîneur pour R A I D E R ***
; *** ***
; *** (c) 1994 by MICRO Application ***
; *** ***
; *** Auteur: Boris Bertelsons ***
; *** ***
; **************************************
;
;
.286
jumps
w equ word ptr
b equ byte ptr
code segment public
public insthand
public handler9
public reslim
public oldint9
public signature
public siglong
public check_inst
assume cs:code,ds:code
signature: db 'Entraîneur pour MICRO APPLICATION par InspirE / TC'
oldint9: dd 0
procedure: dd ?
siglong equ offset oldint9 - offset signature
; *********************************************************************
; *** ***
; *** Ici commencent les routines proprement dites de l'entraîneur ***
; *** ***
; *********************************************************************
; **********************************************************************
; *** ***
; *** Nouvelle interruption 9h. La procédure teste si une touche a ***
; *** a été tapée et modifie des variables le cas échéant ***
; *** ***
; **********************************************************************
handler9 proc pascal
pushf
push bp
push ds
push bx
in al,60h ; lit un caractère
cmp al,59 ; touche F1
je Game_over
cmp al,63 ; touche F5
je Longue_vie
cmp al,64 ; touche F7
je Add_Points
jmp fin_keyb
Fin_reguliere:
Fin_keyb:
pop bx
pop ds
pop bp
popf
jmp dword ptr cs:oldint9 ; appelle l'ancienne int 9h
Game_over:
pushf
PUSHA
; A adapter à vos besoins!!
mov ds:byte ptr [0648h],1
POPA
popf
jmp fin_reguliere
Longue_vie:
pushf
PUSHA
; A adapter à vos besoins !!
mov ds:byte ptr [0648h],255
POPA
popf
jmp fin_reguliere
Add_Points:
pushf
PUSHA
; A adapter à vos besoins!!
mov bx,ds:word ptr [064Ah]
add bx,1000d
mov ds:word ptr [064Ah],bx
POPA
popf
jmp fin_reguliere
handler9 endp
insthand proc pascal
reslim label byte
push ds
pop ds
mov ax,3509h ; sauve l'ancienne INT 21
int 21h
mov w oldint9,bx
mov w oldint9 + 2,es
mov ax,2509h ; détourne l'INT 21h
lea dx,handler9
int 21h
ret
insthand endp
check_inst proc near
mov ax,3509h ; lit le vecteur d'interruption
int 21h
mov di,bx
mov si,offset signature
mov di,si
mov cx,siglong
repe cmpsb ; teste la signature
ret
check_inst endp
code ends
end