-
Notifications
You must be signed in to change notification settings - Fork 0
Legacy IO
sevonj edited this page Apr 1, 2023
·
1 revision
CRT and KBD (Monitor and Keyboard) are the simplest way to input and display numbers.
OUT R1, =CRT
This will send the value of R1 to CRT
IN R1, =KBD
This will take input and store it in R1
KBD is a read only device. CRT is a write only device. Writing to KBD or reading from CRT will result in error.
Picture shows example use. The program has output value 4 to the CRT, and after that it has requested input from KBD. When reading, the machine has to stop until the user presses the send button.