PEEK and POKE - Memory Cells and Hardware Registers

Memory Cells and Hardware Registers

The address locations POKEd to or PEEKed from may refer either to ordinary memory cells or to memory-mapped hardware registers of I/O units or support chips such as sound chips and video graphics chips, or even to memory-mapped registers of the CPU itself (making possible the software implementation of powerful machine code monitors and debugging/simulation tools). As an example of POKE-driven support chip control, the following POKE command is directed at a specific register of the Commodore 64's built-in VIC-II graphics chip, which will make the screen border turn black:

POKE 53280, 0

Pre and non-PC computers usually differ as to the memory address areas designated for user programs, user data, operating system code and data, and memory-mapped hardware units. For these reasons, PEEK functions and POKE commands are inherently non-portable, meaning that a given sequence of those statements will almost certainly not work on any system other than the one for which the program was written.

Read more about this topic:  PEEK And POKE

Famous quotes containing the words memory, cells, hardware and/or registers:

    His memory is like wares at the auction—going, going, and anon it will be gone.
    Herman Melville (1819–1891)

    The twelve Cells for Incorrigibles ... are also carved out of the solid rock hill. On the walls of one of the cells human “liberty” is clearly inscribed, with the “liberty” in significant quotation marks.
    —Administration in the State of Ariz, U.S. public relief program (1935-1943)

    A friend of mine spoke of books that are dedicated like this: “To my wife, by whose helpful criticism ...” and so on. He said the dedication should really read: “To my wife. If it had not been for her continual criticism and persistent nagging doubt as to my ability, this book would have appeared in Harper’s instead of The Hardware Age.”
    Brenda Ueland (1891–1985)

    We may prepare food for our children, chauffeur them around, take them to the movies, buy them toys and ice cream, but nothing registers as deeply as a simple squeeze, cuddle, or pat on the back. There is no greater reassurance of their lovability and worth than to be affectionately touched and held.
    Stephanie Martson (20th century)