In the context of games for many 8-bit computers, users could load games into memory and, before launching them, modify specific memory addresses in order to
cheat, getting an unlimited number of lives, immunity, invisibility, etc. Such modifications were performed using POKE statements. The
Commodore 64,
ZX Spectrum and
Amstrad CPC also allowed players with one of the relevant cartridges (such as
Action Replay or
Multiface) to freeze the running program, enter POKEs, and resume. Usually however, the POKE was typed in along with a BASIC loader which, when run, loaded the game and inserted the POKE during loading. These POKES were common features printed in the tips and cheats sections of computer magazines of the time. For example, in
Knight Lore for the
ZX Spectrum, immunity can be achieved with the following command: POKE 47196,201 In this case, the value 201 corresponds to a
RET instruction, so that the game returns from a subroutine early before triggering
collision detection. Magazines such as
Your Sinclair published lists of such POKEs for games. Such codes were generally identified by reverse-engineering the machine code to locate the memory address containing the desired value that related to, for example, the number of lives, detection of collisions, etc. Using a 'POKE' cheat is more difficult in modern games, as many include anti-cheat or copy-protection measures that inhibit modification of the game's memory space. Modern operating systems enforce
virtual memory protection schemes to deny external program access to non-shared memory (for example, separate
page tables for each application, hence inaccessible memory spaces). ==Generic usage of POKE==