Guillermo via fpc-pascal
2021-04-09 17:56:12 UTC
Hi pascaloids,
I'm doing DOS development for fun and, after installing the compiler
(was quite hard), I'm having problems handling interrupts.
I started with keyboard and it doesn't work. The handler declaration:
procedure DOS_KbdHandler; interrupt;
but compiler says:
keybrd.inc(14,29) Warning: Calling convention directive ignored:
"OldFPCCall"
When running the program in DOSBox it just executes the interruption
once when I press any key and then the interruption doesn't executes
anymore. I thought the compiler doesn't manage the interruption
enter/exit stuff properly (since it says the calling convention was
ignored) so I tried to add the "CLI" and "STI IRET" by myself, but the
compiler sayd:
keybrd.inc(21,7) Error: Instruction not supported by the selected
instruction set
The instruction not supported is IRET.
BTW, I tried the same thing for DOS 32bits (with all the GO32V2 stuff)
and it worked as expected. I've attached both 16bits and 32bits code,
complete with initialization, handling and finalization.
Do anybody see what I'm doing wrong? How can I fix it?
Guillermo "Ãuño" MartÃnez
I'm doing DOS development for fun and, after installing the compiler
(was quite hard), I'm having problems handling interrupts.
I started with keyboard and it doesn't work. The handler declaration:
procedure DOS_KbdHandler; interrupt;
but compiler says:
keybrd.inc(14,29) Warning: Calling convention directive ignored:
"OldFPCCall"
When running the program in DOSBox it just executes the interruption
once when I press any key and then the interruption doesn't executes
anymore. I thought the compiler doesn't manage the interruption
enter/exit stuff properly (since it says the calling convention was
ignored) so I tried to add the "CLI" and "STI IRET" by myself, but the
compiler sayd:
keybrd.inc(21,7) Error: Instruction not supported by the selected
instruction set
The instruction not supported is IRET.
BTW, I tried the same thing for DOS 32bits (with all the GO32V2 stuff)
and it worked as expected. I've attached both 16bits and 32bits code,
complete with initialization, handling and finalization.
Do anybody see what I'm doing wrong? How can I fix it?
Guillermo "Ãuño" MartÃnez