lalaland
lalaland

Reputation: 1

LC-3 operation TRAP IN

What function does IN do? The textbook says it "Print prompt on console, read (and echo) one character from keybd. Character stored in R0[7:0]". Does it mean that IN can print out the input character on the console? Also, I wonder if I use GETC and OUT together, can it have the same effect as IN ?

Upvotes: 0

Views: 74

Answers (1)

user6258659
user6258659

Reputation: 11

I suggest testing it in a simulator. You can just write a program like the below, run it in the simulator (make sure to load the OS also!) and you can answer your own question...

                 .orig x3000
TEST_IN          IN
TEST_GETCOUT     GETC
                 OUT
                 BR TEST_IN
                 .end

Upvotes: 1

Related Questions