Vajad kellegagi rääkida?
Küsi julgelt abi LasteAbi
Logi sisse
Sulge

"lod13" - 1 õppematerjal

Programmeerimiskeel
555
doc

Programmeerimiskeel

number stored in memory location 2. But if you look at what's stored in that location, you'll find the instruction lod 12, which is part of the program. This seems odd. What happens when you "add 1" to an instruction? Remember that machine language instructions are really just numbers. There is no problem with adding 1 to a number. However, the meaning of the instruction represented by the number is changed. If you add 1 to the number that encodes "lod 12," the meaning of the answer is "lod13." If you want to understand exactly why this is true, look at the binary representations of the machine language instructions. (The details are given in Section 3.2 of the text, if you want to check there.) Run this program and see what it does. To fully appreciate this program, you should run it at "Fastest Speed" with the memory display set to "Graphics". You can watch as the memory is gradually filled with numbers.

Informaatika → Infotehnoloogia
160 allalaadimist


Sellel veebilehel kasutatakse küpsiseid. Kasutamist jätkates nõustute küpsiste ja veebilehe üldtingimustega Nõustun