Text Mode Cursor: Difference between revisions

[unchecked revision][unchecked revision]
Content deleted Content added
Rod (talk | contribs)
m →‎Without the BIOS: Add code to get the cursor position.
Rod (talk | contribs)
Line 163:
===Get Cursor Data===
 
With this code, you get: <tt>pos = y * VGA_WIDTH + x</tt>. To obtain the coordinates, just calculate: <tt>y = pos / VGA_WIDTH; x = pos % VGA_WIDTH</tt>.
 
'''Source in C'''