Text Mode Cursor: Difference between revisions
Jump to navigation
Jump to search
m
→Get Cursor Data
[unchecked revision] | [unchecked revision] |
m (→Without the BIOS: Add code to get the cursor position.) |
|||
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'''
|