1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
|
org 100h
mov ax,cs
mov ds,ax
;sauvegarde du pointeur originale sur IRQ 12=int 74h (souris)
push 0
pop es
mov si,74h
shl si,2
cli
mov ax,[es:si]
mov [offset_IRQ12_original],ax
mov ax,[es:si+2]
mov [segment_IRQ12_original],ax
;mis en place de notre IRQ12 perso
mov ax,souris
mov [es:si],ax ;offset
mov ax,cs
mov [es:si+2],ax ;segment
sti
;mode texte 80*25 16 couleurs
mov ah,0
mov al,3h
int 10h
;boucle infinie
jmp $
;restauration de IRQ12 original (qu'on n'atteint jamais ici)
cli
push 0
pop es
mov si,74h
shl si,2
mov ax,[offset_IRQ12_original]
mov [es:si],ax
mov ax,[segment_IRQ12_original]
mov [es:si+2],ax
sti
ret
;-----------------------
souris:
push ax
push bx
push cx
mov ah,9
mov al,'A'
mov bh,0
mov bl,2
mov cx,1
int 10h ;affiche 'A'
mov cx,65535 ;tempo
A: loop A
mov ah,9
mov al,' '
mov bh,0
mov bl,2
mov cx,1
int 10h ;efface 'A'
pop cx
pop bx
pop ax
iret
;-----------------------
offset_IRQ12_original resw 1
segment_IRQ12_original resw 1 |
Partager