Prev | Current Page 243 | Next

Carl Reynolds and Paul Tymann

"Schaum's Outline of Principles of Computer Science"

The machine can also compare two values, and skip an instruction if the values are different (or, using
a complementary instruction, if the values are the same). There??™s also a jump instruction to allow the machine
to execute an instruction elsewhere in the program.
Such primitive operations are a long way from doing anything really useful for people, and even at that,
with nothing but the bare machine, one would have to know the bit code for each instruction, enter the sequence
of instructions one bit at a time, and then press the start button! Early computers (even as recently as the early
1980s) usually had a ???front panel??? with rocker switches and lights to allow one to do just that.
If one were to write a program to act as a simple four-function integer (no decimals) calculator, with
nothing but the bare machine, one would write something like the following.
1 Enable a read from the keyboard by using one of I/O instructions in the machine instruction set to ready
the keyboard interface (the electronics behind the connector port to which the keyboard is attached) to
accept a character from the keyboard.
2 Wait by entering a ???loop,??? continuously testing the flag signal on the keyboard interface.


Pages:
231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255
CSS Ninja remont warszawa tanie hotele nad morzem traktorki ogrodowe kolej transsyberyjska