There is a resident program in pascal. When you press the Enter key on the command line when the program is running, some event occurs (for example, displaying on the screen) by handling the keyboard interrupt. When any command (dir, cls, mem) is executed and the Enter event is pressed from the keyboard of the resident program, it is not executed.
I apologize! My first question :) Here is a minimal example:
{$M, $1000, 0,0} program lab5; uses crt, dos; type video = array [1..25,1..80] of record symbol : char; attr : byte; end; var memory : video absolute $B800:$0000; OldKey : procedure; {$F+} procedure Key; Interrupt; begin if (Port[$60] = 156) then {Скан-код клавиши Enter} begin memory[WhereY,WhereX].Symbol := '1'; end; Inline($9C); OldKey; end; {$F-} begin GetIntVec($9, @OldKey); SetIntVec($9, Addr(Key)); Keep(0); end.
Team
inline($9C)
similar to:
asm PUSHF end;
The problem is that cascading interrupt processing is not performed when invoking an external command from the shell. I tried to use the line parallel IRQ 2.
GetIntVec($71, @OldKey); SetIntVec($71, Addr(Key));
The most interesting thing is that it started working, but it stopped processing the Enter key without a command and did not work stably. And in the end, after a short time, it stopped working. I did not understand what the problem is.