Mail Archives: djgpp-workers/1998/01/13/10:06:44
> Also, the name of this user-defined callback should begin with an
> underscore, since it (the name) gets linked into every application and
> will pollute the ANSI/POSIX name space. I suggest something like
> `__djgpp_kbd_callback'.
Agreed.
> > + sti /* disable interrupts */
>
> Charles, isn't this dangerous/slow/unnecessary in the keyboard
> handler?
Agreed. And usually STI doesn't disable...
> The current keyboard handler already sets its DS to point to
> conventional memory, with this line:
>
> movw %cs:___djgpp_dos_sel, %ds
>
> Isn't it better to just move this line a couple of lines up, so it
> takes effect before _calluserskeyboardhandler is called, instead of
> doing it twice and bloating the code?
I didn't have much time to review, but it's not clear to me what the
limitations on this handler are. The stack does not seem to be set
up properly, which GCC assumes, so there are lots of things to
consider.
- Raw text -