Green spots when scrolling?
Posted: Wed Apr 08, 2009 4:03 pm
Ok, I have this very strange problem..
Whenever my OS scrolls, there are a few blocks where there attribute byte(I'm in text mode) change from 0x07 to 0x27, seemingly random.
It also happens sometimes with one or two blocks when I cls.
my scrolling and cls code:
Note, nothing ever changes except for the attribute byte, and it always makes the background green and never changes the foreground..
Also, my video does not work by video-repost interrupt. I do not think it's relevant, as all modern video adapters have fixes for the snow problem.
This only happens on real computers. Certain computers don't do it, but the 3 I have at my house do. They include a new netbook, a older hp computer and a really old gateway computer..
Whenever my OS scrolls, there are a few blocks where there attribute byte(I'm in text mode) change from 0x07 to 0x27, seemingly random.
It also happens sometimes with one or two blocks when I cls.
my scrolling and cls code:
Code: Select all
volatile uint8_t *vram=(uint8_t *)0xB8000;
volatile uint8_t kd_color=0x07;
void kd_scroll_down(){
memcpy(vram,vram+(80*2),80*2*25);
uint32_t i;
for(i=0;i<=((80*2));i+=2){
vram[i+(80*24*2)]=0;
vram[i+1+(80*24*2)]=kd_color; //set color
}
}
void kd_cls(){
uint32_t i;
for(i=0;i<=((80*25*2));i+=2){
vram[i]=0;
vram[i+1]=kd_color; //set color
}
}
Also, my video does not work by video-repost interrupt. I do not think it's relevant, as all modern video adapters have fixes for the snow problem.
This only happens on real computers. Certain computers don't do it, but the 3 I have at my house do. They include a new netbook, a older hp computer and a really old gateway computer..