weird blinking

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
User avatar
overburn
Member
Member
Posts: 50
Joined: Sun Feb 22, 2009 9:15 am

weird blinking

Post by overburn »

i've made a a barebones kernel with a few functions , it compiles alright, acts alright on virtualBox, but when i strap it to a floppy and boot it on my pc, i load it throught grub and it blinks... in virtual box it doesn't blink. and i don't want it to blink. so... :

this is loader.s:
http://pastebin.com/m133f951

this is kernel.c:
http://pastebin.com/m37d5dd86

and this is link.ld
http://pastebin.com/m6a10effc

and you can get the floppy image from the site on my sig

thanx in advance :)
One Tequila, Two Tequila, Three Tequila, Floor!
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: weird blinking

Post by AJ »

Hi,

It's because you are using a white background for your text, which in some situations is used to indicate a blinking character on the VGA. You can change this by either reprogramming the attribute registers on your VGA, or using a background with a colour from 0-7 (it's the high bit of the nibble that selects blinking).

Cheers,
Adam
User avatar
overburn
Member
Member
Posts: 50
Joined: Sun Feb 22, 2009 9:15 am

Re: weird blinking

Post by overburn »

by reprogramming the attribute registers on my vga you mean altering my own graphics card? or it's just a program?
if it's the first, how can i use white without doing that?
One Tequila, Two Tequila, Three Tequila, Floor!
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: weird blinking

Post by AJ »

Hi,

What I mean is, programming the VGA directly (as you would if you were writing a VGA driver).

The attribute controller address register is at port 0x03C0 (data register is 0x03C1). Register index 0x10, bit 3 controls the character blink status. You'd need to read in this register, OR it with 0x08 and then write the value back. For more information see this link.

...or just use a darker background :)

Cheers,
Adam
egos
Member
Member
Posts: 612
Joined: Fri Nov 16, 2007 1:59 pm

Re: weird blinking

Post by egos »

AJ wrote:The attribute controller address register is at port 0x03C0 (data register is 0x03C1).
It's incorrect. Index and data are output one by one at 0x3C0. To write exactly the index, read ISR1 (0x3DA) firstly.
If you have seen bad English in my words, tell me what's wrong, please.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: weird blinking

Post by AJ »

Ah sorry - my mistake. 0x03C1 is only a data read register.

Cheers,
Adam
Post Reply