Hi,
Blagoje wrote:I'm new in OS development, and i don't know how to add cursor, i'm try with this code, but dose't work.
The cursor that code is trying to use assumes the video card is in a legacy "VGA compatible" mode (e.g. and not less obsolete SVGA mode or its own "native PCI" mode), requires an obsolete/ugly text mode, can only provide an ugly/blocky cursor, has poor "one character" precision (e.g. you can't use it for a mouse pointer where pixel precision is standard), there's only one (can't use it for both keyboard cursor and mouse cursor) and the IO port writes are much slower than accessing display memory. Basically it's deprecated, unreliable/not portable, ugly, limited and slow.
In general I'd recommend forgetting that text mode exists, setting a higher resolution graphical mode (e.g. with VBE), using a framebuffer, and drawing your own cursor/s however you want wherever you want in software (until you've got native drivers capable of using hardware acceleration).
Note that (depending on OS/boot loader) there's a brief period of time (during very early boot) where you want to display things like error messages before a usable video mode (and/or fonts) are setup. This is the only case where text mode is acceptable; but for this case you're never waiting for user input and therefore a cursor should not be shown to begin with.
Cheers,
Brendan