; ; Generateur aleatoire de fautes de frappes ; et autres désagréements divers z'et variés. ; (Win95 a du être programmé avec ca) ; ; Pour TASM (testé avec la version 3.1) ; TABS = 18 .386P LOCALS b EQU ; pour alleger la frappe w EQU d EQU o EQU Code SEGMENT USE16 ASSUME cs:Code ; == Code resident ==== ORG 100h Start: jmp Install New_Int16: cmp ah,0 ; un programme veut lire le clavier ? je MiamMiam ; oui ? Alors on s'en charge, hinhinhin cmp ah,10h ; Vraiment pas ? jne JmpOldInt ; non ? Alors on appelle l'ancienne ; interruption MiamMiam: push eax imul eax,Rand32,22695477 inc eax mov Rand32,eax test eax,110010010000000000000b pop eax jnz JmpOldInt ; C'est maintenant qu'on s'amuse reelement >8-] pusha mov bx,w Rand32+2 and bx,110b jmp [Vacheries+bx] Delete: popa mov ax,0e08h iret CarAleat: popa mov ax,w Rand32 iret Flash: mov dx,3c7h mov al,0 ; couleur 0 = souvent celle du fond out dx,al mov dl,0c9h in al,dx mov ah,al in al,dx mov bh,al in al,dx mov bl,al xor ah,00111111b xor bx,0011111100111111b mov dl,0c8h mov al,0 out dx,al inc dx mov al,ah out dx,al mov al,bh out dx,al mov al,bl out dx,al popa jmp Int16_addy Bip: mov al,142 out 43h,al out 4Fh,al mov ax,w Rand32 and ah,11111b out 42h,al out 4Fh,al mov al,ah out 42h,al in al,61h ; et en avant la musique ! xor al,11b out 61h,al popa jmp Int16_addy JmpOldInt: jmp Int16_addy ; == Datas redidentes ==== Vacheries DW o Delete,o CarAleat,o Flash,o Bip Rand32 DD ? Int16_addy LABEL DWORD Int16_offset DW ? Int16_segment DW ? ; == Installation/Desinstallation ==== Install: mov ah,0 int 01ah mov w Rand32+2,dx mov ah,2 int 01ah xor cx,dx mov w Rand32,cx xor ax,ax mov ds,ax mov eax,d ds:[4*16h] mov Int16_addy,eax les bx,Int16_addy mov ax,w cs:[o New_Int16-2] cmp ax,es:[bx-2] je Desinstall ; Ici, il faut installer le TSR mov ax,cs shl eax,16 mov ax,o New_Int16 mov ds:[4*16h],eax push cs pop ds mov dx,o Msg1 mov ah,9 int 21h mov es,cs:[2ch] mov ah,49h int 21h ;mov dx,((o Install)/16) +1 mov dx,100 mov ax,3100h int 21h Desinstall: ; ici, il faut desinstaller le TSR mov eax,es:[bx+Int16_addy-o New_Int16] mov ds:[4*16h],eax mov es,Int16_segment mov ah,49h int 21h push cs pop ds mov dx,o Msg2 mov ah,9 int 21h mov ax,4c00h int 21h Msg1 DB "TSR Installé",13,10 DB "Essayez de relancer le programme" DB "pour le desinstaller :)",13,10,36 Msg2 DB "TSR Desinstallé",13,10,36 Code ENDS END Start