views:

104

answers:

1

I'm writing an assembly language program using lc3 and when I run trap x23 (IN) the message "input a character" comes up. I want it to come up saying

Please enter an integer between 1 and 15:

but it ends up like this:

Please enter an integer between 1 and 15:

input a character:

Help please

+1  A: 

Look at this page: http://www.lc3help.com/tutorials/Getting_User_Input/.

Read about traps x20..x23 and decide whether you are using the correct trap or whether one of the other I/O traps might be more appropriate.

Paul R