Hi,
Quick question. I am working on a GUI and I would like (but not necessary) to provide the end-user with some sort of ACK that they have summoned the focus of an input area. I think the best way is to use a blinking cursor. I have not designed a multi-tasking environment and I am at a loss for ideals on how to implement this effect without it. I find it a bit overboard to implement multi-tasking to be used solely for a blinking cursor effect, so is there an alternative way to do it in a mono-tasking environment without locking up the rest of the code using a loop? I thought about using the PIT timer, but that thing is so unpredictable. On some systems it may run quicker/slower than others, so I would like to stay away from that unless there is a way to make it a constant value on any system. Thanks
Blinking Cursor
Re: Blinking Cursor
Hi,purage wrote:Hi,
Quick question. I am working on a GUI and I would like (but not necessary) to provide the end-user with some sort of ACK that they have summoned the focus of an input area. I think the best way is to use a blinking cursor. I have not designed a multi-tasking environment and I am at a loss for ideals on how to implement this effect without it. I find it a bit overboard to implement multi-tasking to be used solely for a blinking cursor effect, so is there an alternative way to do it in a mono-tasking environment without locking up the rest of the code using a loop? I thought about using the PIT timer, but that thing is so unpredictable. On some systems it may run quicker/slower than others, so I would like to stay away from that unless there is a way to make it a constant value on any system. Thanks
You've got the wrong end of the stick there, the PIT timer runs at a constant rate of 1.1931MHz. It has an adjustable divisor register so that it can interrupt at any rate between 1.1931MHz and 18.2Hz. All you have to do is set up the divisor properly, and it will be the same on all boxen.
Cheers,
James
Re: Blinking Cursor
OK, I will give it a shot, thanks.
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Blinking Cursor
Question using the topic title: in VGA graphics modes, the text cursor disappears. Do I have to draw one myself or can I re-enable the standard one (since you can use the BIOS text routines in graphics modes.)
- Firestryke31
- Member
- Posts: 550
- Joined: Sat Nov 29, 2008 1:07 pm
- Location: Throw a dart at central Texas
- Contact:
Re: Blinking Cursor
In text mode the cursor is handled by hardware. In graphics mode it would be difficult to know exactly where to put the cursor, so the hardware just doesn't bother. In other words, you have to draw the cursor yourself.
Owner of Fawkes Software.
Wierd Al wrote: You think your Commodore 64 is really neato,
What kind of chip you got in there, a Dorito?