3 times faster than other roms??
any way, here s the code:
#define ushort unsigned short
#include <dos.h>
ushort cur_segm=0x1A20;
void interrupt int53()
{
asm{
push ax
push dx
mov ax,[cur_segm]
mov dx,ax
and dx,0xF000
shr dx,12
shl ax,4
out 05h,ax
mov al,dl
out 07h,al
cmp word [cur_segm],1A20h
jne pass
add word [cur_segm],040h
jmp end
}
pass:
asm{
sub word [cur_segm],040h
}
end:
asm{
pop dx
pop ax
int 5
}
}
void interrupt (*oldint)(void);
//Entrer dans le mode 5 couleurs
void set_grey()
{
oldint = _dos_getvect(0x53);
_dos_setvect(5,oldint);
_dos_setvect(0x53,int53);
asm{
mov al,2 //;Vitesse balayage rapide
out 4,al
mov al,0xDB //; Passage en niveaux de gris lineaire
out 2,al
mov bp,7
}
cont_loop: //Constaste vers le haut
asm{ mov ah,22h
xor bl,bl
int 7Ch
dec bp
jnz cont_loop
}
return;
}
//Quitter le mode 5 couleurs
void clr_grey()
{
asm{
mov bp,7
}
cont_loop: //Constaste vers le bas
asm{
mov ah,22h
mov bl,1
int 7Ch
dec bp
jnz cont_loop
mov al,0xC3 //; Passage mode normal ecran
out 2,al
mov al,4 //; Vitesse balayage normale
out 4,al
}
// Recharger les interruptions du balayage de l'?cran
_dos_setvect(0x53,oldint);
//Retour page 0x1a20
asm{
mov ax,0x1a20
mov dx,ax
and dx,0xF000
shr dx,12
shl ax,4
out 05h,ax
mov al,dl
out 07h,al
}
}
So as you can easily see it, it's the int53 which is redirected to int 5...
If I make a demo but using int2 would bitwhise be ok to betatest it?