FreeBSD/sys/dev/fb/vga.c
/*
 * set_hw_cursor():
 * Move the hardware text cursor.  If col and row are both -1, 
 * the cursor won't be shown.
 *
 * all adapters
 */
Move the hardware text cursor.  If col and row are both -1,
the cursor won't be shown.

all adapters
Move the hardware text cursor . If col and row are both - 1 the cursor won ' t be shown . all adapters
static int
vga_set_hw_cursor(video_adapter_t *adp, int col, int row)
{
    u_int16_t off;
    int s;
    if (!vga_init_done)
	return ENXIO;
    if ((col == -1) && (row == -1)) {
	off = -1;
    } else {
	if (adp->va_info.vi_flags & V_INFO_GRAPHICS)
	    return ENODEV;
	off = row*adp->va_info.vi_width + col;
    }
    s = spltty();
    outb(adp->va_crtc_addr, 14);
    outb(adp->va_crtc_addr + 1, off >> 8);
    outb(adp->va_crtc_addr, 15);
    outb(adp->va_crtc_addr + 1, off & 0x00ff);
    splx(s);
    return 0;
}
static int vga_set_hw_cursor ( video_adapter_t * adp , int col , int row ) { u_int16_t off ; int s ; if ( ! vga_init_done ) return ENXIO ; if ( ( col == -1 ) && ( row == -1 ) ) { off = -1 ; } else { if ( adp -> va_info . vi_flags & V_INFO_GRAPHICS ) return ENODEV ; off = row * adp -> va_info . vi_width + col ; } s = spltty ( ) ; outb ( adp -> va_crtc_addr , 14 ) ; outb ( adp -> va_crtc_addr + 1 , off >> 8 ) ; outb ( adp -> va_crtc_addr , 15 ) ; outb ( adp -> va_crtc_addr + 1 , off & 0x00ff ) ; splx ( s ) ; return 0 ; }
set_hw_cursor():
 Move the hardware text cursor.
set_hw_cursor () : Move the hardware text cursor .