home *** CD-ROM | disk | FTP | other *** search
- { Cursor.inc - GotoRC, CursorChange ver 2.0, 11-24-86 }
-
- { GotoRC - move cursor ver 1.3, 11-10-86 }
- { This is the inverse of Turbo's GotoXY procedure and just as fast. It applies
- to the currently displayed page and ignores Turbo Windows. Turbo's GotoXY
- only works on page 0, while GotoRC works on all pages. }
- procedure GotoRC (Row, Col: Byte);
- begin
- Inline(
- $B4/$02 { MOV AH,$02 ;Set AH = $02}
- /$31/$DB { XOR BX,BX ;Set BX=0}
- /$8E/$C3 { MOV ES,BX ;Set ES=0}
- /$26/$8A/$3E/$62/$04 { ES: MOV BH,[$0462] ;Set BH=current page}
- /$8A/$76/<ROW { MOV DH,[BP+<Row] ;Move Row}
- /$FE/$CE { DEC DH ;Convert to 0-?? range}
- /$8A/$56/<COL { MOV DL,[BP+<Col] ;Move Col}
- /$FE/$CA { DEC DL ;Convert to 0-?? range}
- /$CD/$10 { INT $10 ;Set cursor position}
- );
- end;
-
-
- { CursorChange - changes type or hides cursor, saves old ver 1.3, 11-10-86 }
- { This utility will let you change the type (shape and visibility) of the
- cursor. At the same time, it saves the previous type.
-
- Shape: Mono - top row = 0; bottom row = 13 (Default is 12,13)
- CGA - top row = 0; bottom row = 7 (Default is 6, 7)
- Invisibilty: Set top row = 32 (bits 5-6 = 01)
- (Setting top > bottom also seems to work.)
- Blinking: Set top row + 96 (bits 5-6 = 11)
- (Supposedly this does a faster blink, but it doesn't
- work on all machines.)
- Value: >>>>>> SET New:= top shl 8 + bottom <<<<<<
-
- Suggestions: For block cursor, set new:= 13 (Works on all machines.)
- For invis cursor, set new:=8192 }
-
- procedure CursorChange (New: integer; VAR Old: integer);
- begin
- Inline(
- $31/$C0 { XOR AX,AX ;Set AX=0}
- /$8E/$C0 { MOV ES,AX ;Set ES=0}
- /$26/$A1/$60/$04 { ES: MOV AX,WO[$0460] ;Read old cursor type}
- /$C4/$7E/<OLD { LES DI,[BP+<Old] ;Set address for Old}
- /$AB { STOSW ;Store old value}
- /$B4/$01 { MOV AH,$01 ;}
- /$8B/$4E/<NEW { MOV CX,[BP+<New] ;Get New value}
- /$CD/$10 { INT $10 ;Set cursor change}
- );
- end;
-