I have a problem with keyboard processing. If I use a virtual function call esp = handlers[interruptNumber]->HandleInterrupt(esp); in InterruptManager::DoHandleInterrupt(uint8_t interruptNumber, uint32_t esp) then on exit from DoHandleInterrupt(...) function MyOS crashes.
If I replace the line with call to handlers[interruptNumber]->HandleInterrupt(esp) with code doing the same port operation: //esp = handlers[interruptNumber]->HandleInterrupt(esp); Port8Bit dataPort(0x60); uint8_t key = dataPort.Read(); printf(" KEY "); printHex(key); printf("\n"); everyting works fine.
I can't guess what may be wrong with virtual function call, that it makes such problems. Thank you for any help in advance!