This procedure's call allows us to input value to the variables
of different types directly from keyboard. This action would be done after
program's compilation when you run the result executable code.
It is evident from above that this construction is in some parts
similar to assign operator: both of them
save the result of some operation into variable.
The execution of READ construction consists from 2 steps:
get value from keyboard to fixed register (R1 for "E97" and AX for Intel)
save the result of previous actions.
Here we'll consider mainly first part, because the second was under discussion
in assignment.
"COMPAS" compiles READ construction to a call of standard input subroutine.
In "E97" these subroutines are placed into ROM, and for Intel code - into
Run-Time Library (RTL), which automatically adds to every executable program code.
Operator's structure
"E97" code bricks
Example of full operator in "E97" code
Intel code bricks
Example of full operator in Intel code
I called bricks the short pieces of code,
that "COMPAS" generate as a part of operator. Compiler builds result machine
code from the bricks.