I need to check whether the insert key, num lock, and the left shift and right shift keys were pressed. I do this:

push ax mov ah, 02h int 16h test al, 10000000b jnz exit2 pop ax 

and respectively for the rest: test al, 00100000b, test al, 00000010b, test al, 00000001b

but all this does not work (((

  • What is the code execution environment? OS? - dsnk
  • in dos box, through tasm - FireLion
  • What does "does not work" mean. What value does int16h return? And what you have on the exit2 tag, I hope there is the same pop ax - Mike
  • I read on the Internet and found that the al register contains the bytes of the flags, and depending on whether the insert flag is set or not, I need to go to exit2, in this case, I need to go if insert is on, and exit2: pop a, and exit - FireLion
  • I actually just need to check pressing insert, numlock, shift (left and right), in this case I am writing an interrupt handler - FireLion

1 answer 1

Anyways, everything is right here, it works correctly, the error was a hike in the fact that when the program was first called, the interrupt handler was first written and then written out from the system