Am suppose to exit a loop when ctrl+d(x04) is typed in lc-3 so I'm trying to detect this from console input by using getc.
Is there a easy way doing this? Or I have to convert input to a negative number and add with x04?
Can some one help me?
The easiest way to do this is to check R0 to see if it is set to 4.
A marginally easier way would be to simply add -4 to the input rather than inverting the input and adding +4.