x86 machine code on DOS - 14 bytes
I think it doesn't get much shorter than this.
00000000 b4 08 cd 21 34 01 88 c2 b4 02 cd 21 eb f2 |...!4......!..|
This version features advanced interactivity™ - after running it from the command line, it spits out the "inverted" characters as long as you write the input digits (which are not echoed); to exit, just do a Ctrl-C.
Unlike the previous solution, this has some trouble running in DosBox - since DosBox doesn't support Ctrl-C correctly, you are forced to close the DosBox window if you want to exit. In a VM with DOS 6.0, instead, it runs as intended.
Old solution -
27 25 22 bytes
This accepted its input from the command line; runs smoothly as a .COM file in DosBox.
00000000 bb 01 00 b4 02 8a 97 81 00 80 f2 01 cd 21 43 3a |.............!C:|
00000010 1e 80 00 7c f0 c3 |...|..|
mov bx, 1
mov ah, 2
mov dl, byte[bx+81h]
xor dl, 1
cmp bl, byte[80h]