CURSORS

<< Embedding   ·    Home   ·   Modes >>

There are two independent cursors. The user's program has to write their coordinates (outside the video interrupt routine) at 16-bit variables CURSOR1 and CURSOR2 (the low byte is X coordinate, and the high byte is Y). Cursor colours may be written at CURCOL1 and CURCOL2 in format xxxxxBGR, and the blinking periods in PERIOD1 and PERIOD2. You can also preset those periods by writing to variables CUR1SPEED and CUR2SPEED (in the range 0-15) and then calling subroutine SETSPEED, which will read the lookup table SPEEDTABLE and preset both cursor periods.

There are three flags which affect cursor operation. They are:

CURFLAG,#0  Cursor select: CLR: Cursor 1 selected
                           SET: Cursor 2 selected

CURFLAG,#1  SET: Hide unselected cursor

CURFLAG,#2  SET: Hide both cursors

Bits CURFLAG,#3 and CURFLAG,#4 are used by the interrupt routine for cursor blinking and should not be modified outside the routine.

Only the selected cursor blinks and the other one (if CURFLAG,#1 is not set) is steady on. You can set bit CURFLAG,#1 if you want to hide the unselected cursor (which will not disable the cursor switching option by toggling CURFLAG,#0). If you set CURFLAG,#2, both cursors will be hidden.

If the cursor is placed over the character, that character will take the cursor's colour while the cursor is displayed during blinking. This is normal and can not be avoided in this routine concept.

<< Embedding   ·    Home   ·   Modes >>