Text Mode Cursor: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
Line 95:
 
==Disabling The Cursor Without the BIOS==
To diable the cursor without the bios we need to use vga's 0x3d4 index port and his data register located one port above it, we need to set bits 5-0 of register index 0x0a , the LOW cursor shape (we don't need to alter the HIGH cursor shape, he doesn't contain the 'cursor disable' bit inside him .), here's how it translate into code:
 
===Source in C===
<source lang="c">
Line 105:
{
 
outb(0x3D4, 0x0A); // LOW cursor shape port to vga INDEX register
outb(0x3D5, 0x3f); //bits 6-7 must be 0 , if bit 5 set the cursor is disable , bits 0-4 controll the cursor shape .
// LOW cursor shape port to vga INDEX register
}
</source>
Line 114 ⟶ 113:
 
<source lang="asm">
;madewritten by Elad Ashkcenazi.
;year - 2017
 
;==========================================================
 
disable_cursor: pushf
push rax