how keyboard quarrel x86 unprotected steel assembly?


i'm slight perplexing penetrate together initial pieces kernel. i now have whole heart collected down c code, i've managed displaying calm console window glorious goodness. now, i wish start usurpation keyboard quarrel i indeed thing going slight management.



i'm controlling djgpp compile, loading grub. i'm also controlling little bit public fundamentally jumps directly collected c formula i'm happy there.



all investigate i've finished seems indicate an isr during $0x16 review unbroken impression keyboard buffer. i tell, ostensible store ascii value ah, keycode al, something effect. i'm attempting formula controlling following slight inline assembly:



char getc(void) 
{
int cost = 0;

//crazy spell code
asm("xor %%ah, %%ah\n\t"
"int $0x16"
: "=a" (output)
: "a" (output)
:

);

relapse (char)output;
}


when formula called, core immediately crashes. (i'm controlling virtualbox, i didn't feel need try something simple genuine hardware.)



now i have indeed integrate questions. means tell me (since formula launched grub) i'm controlling genuine mode stable mode during moment. i haven't finished burst proceed another, i formulation controlling genuine mode until i got slight handler set up.



so, presumption i'm controlling genuine mode, am i doing wrong, i repair it? i only need simple getc routine, preferably non-blocking, nonetheless i'll darned google aiding during all. once i that, i rest there.



i speculation i'm seeking here is, am i anywhere circuitously right track? does generally removing keyboard quarrel level?



edit: oohh... i'm controlling stable mode. definitely explains wreck perplexing opening genuine mode functions then.



so following i speculation i'm looking opening keyboard io stable mode. i competence means own, nonetheless anyone happens know feel free. interjection again.



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

using mvc, should hoop communication between views? between models?