robert@gitpyr.UUCP (Robert Viduya) (04/02/85)
] I'm currently writing a terminal program for the PC and one of the cap- abilities I'm building into it is the ability to change your cursor. I want to support block-cursor, blink-block-cursor, underline-cursor blink-underline-cursor and an invisible cursor. I've got everything almost done, with the non-blinking cursors done via character attributes and the blinking cursors done using the real cursor. However, I'm running into a major difficulty making the real cursor disappear whenever I switch to a pseudo-cursor (non-blinking) or an invisible cursor. I know you can make the cursor disappear by moving it off the end of the screen, but I'm using the hardware scrolling capabilities of the 6845 CRT Controller (as opposed to moving blocks of memory around as IBM chose to (yuck :-)) and the end of the screen changes everytime I scroll up or down a line. I could keep up with where the end of the screen is, but I'd rather not. Since I want this thing to operate at 9600 or greater baud, I want it to be as fast as possible (it actually talks at 19200 baud right now, with XON/XOFF handshaking, but screen I/O slows it down so that there doesn't appear to be a difference between 9600 and 19200). I tried using the following to turn the cursor off (in C): outp (0x3B4,10); /* select cursor scan-line start */ outp (0x3B5,0x0E); /* one greater than max scan line */ outp (0x3B4,11); /* select cursor scan-line end */ outp (0x3B5,0x0E); /* again, one greater */ Since the maximum scan line address is 0x0D, setting the cursor to one greater than that should turn it off. This worked MOST of the time. Every once in a while, I would get a blinking block cursor, however. It isn't very consistent, so I have nothing to go on except for the possibility that it might be a timing problem (which I hope it isn't). If it makes any difference, I'm using the monochrome adapter. I've got the code in to handle the color-graphics adapter (really, just changing the port addresses), but I haven't had the chance to test that out yet. Can anyone give any hints on this? Thanks in advance. robert -- Robert Viduya Georgia Institute of Technology ...!{akgua,allegra,amd,hplabs,ihnp4,masscomp,ut-ngp}!gatech!gitpyr!robert ...!{rlgvax,sb1,uf-cgrl,unmvax,ut-sally}!gatech!gitpyr!robert