Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
if ((_char==0x08)&&(strlen((char*)prompt)<curpos))
{
// Step 1:
// Erase what character is under the cursor by going back
// character and printing a whitespace.
curpos--;
video.setX(curpos);
video.putch(0x20);
// Step 2:
// Move the cursor back one position
// I am assuming putch() increments curpos?
// In that case, when we "blanked" the character, curpos was
// incremented, so we must decrement it again.
curpos--;
video.setX(curpos);
video.move_csr();
}
Yeah you have to read from port 0x60 when a key stroke is detected. Just do a simple IN AL , 0x60 and the scan code is in AL then. Watch out for extended keys (2 or even 3 bytes).
On the field with sword and shield amidst the din of dying of men's wails. War is waged and the battle will rage until only the righteous prevails.