home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Interdit
/
pc-interdit.iso
/
nodebug
/
nodeb.asm
< prev
next >
Wrap
Assembly Source File
|
1994-10-19
|
3KB
|
142 lines
.386p
.MODEL TPASCAL
.DATA
oldint3 dd ?
anc_interrupt3 dd ?
.CODE
public PIQ_Stop_System
public Keyboard_off
public Keyboard_on
public No_Stepping
keyb_off macro
push ax
in al,21h
or al,02
out 21h,al
pop ax
endm
keyb_on macro
push ax
in al,21h
and al,0Fdh
out 21h,al
pop ax
endm
PIQ_Stop_System proc near
push ds
push ax
push bx
push cs
pop ds ; CS en DS
mov cs:word ptr [@int_21_fonct],4CB4h ; Fonction arrêter le Programme
@int_21_fonct:
mov ah,30h ; Fonction lire la version du DOS
int 21h
pop bx
pop ax
pop ds
ret
PIQ_Stop_System endp
Keyboard_off proc near
keyb_off
ret
Keyboard_off endp
Keyboard_on proc near
keyb_on
ret
Keyboard_on endp
No_Stepping proc near
push ax
jmp @Nostep+2
@Nostep:
mov ds:byte ptr [06EBh],00
mov ax,4C01h
int 21h
pop ax
ret
No_Stepping endp
public protected_stopping
protected_stopping proc pascal
pusha
cli ; inhibe les interruptions
mov eax,cr0 ; active le mode protégé
or eax,1
mov cr0,eax
jmp PROTECTION_ENABLED ; efface le canal d'exécution
PROTECTION_ENABLED:
and al,0FEh ; rétablit le mode réel
mov cr0,eax ; ne remet pas à zéro le processeur
jmp PROTECTION_DISABLED ; efface le canal d'exécution
PROTECTION_DISABLED:
sti ; restaure les interruptions
popa
ret
protected_stopping endp
public Check_vector
Check_vector proc pascal check : dword;
mov bx,0
mov es,bx
mov bx,18
mov eax,es:[bx]
mov oldint3,eax
mov eax,check
mov es:[bx],eax
ret
Check_vector endp
public Vector_ok
Vector_ok proc pascal check : dword;
mov bx,0
mov es,bx
mov bx,18
mov eax,es:[bx]
cmp eax,check
je @check_ok
mov al,0
jmp @check_fin
@check_ok:
mov al,1
@check_fin:
ret
Vector_ok endp
public restore_Checkvector
restore_Checkvector proc pascal
mov bx,0
mov es,bx
mov bx,18
mov eax,oldint3
mov es:[bx],eax
ret
restore_Checkvector endp
public Copy_int21_int3
Copy_int21_int3 proc pascal
mov bx,0
mov es,bx
mov bx,18
mov eax,es:[bx]
mov anc_interrupt3,eax ; sauvegarde l'ancienne int 3
mov bx,84 ; charge l'int 21
mov eax,es:[bx]
mov bx,18 ; et la mémorise en int3
mov es:[bx],eax
ret
Copy_int21_int3 endp
end