Peek and Poke in BBC BASIC
BBC BASIC, used on the BBC Micro and other Acorn Computers machines, did not feature the keywords PEEK and POKE but used the question mark symbol (?), known as query in BBC BASIC, for both operations, as a function and command. For example:
> DIM W% 4 : REM reserve 4 bytes of memory, pointed TO by INTEGER variable W% > ?W% = 42 : REM store constant 42; equivalent of 'POKE W%, 42' > PRINT ?W% : REM PRINT the byte pointed TO by W%; equivalent of 'PRINT PEEK(W%)' 4232-bit values could be POKEd and PEEKed using the exclamation mark symbol (!), known as pling, with the least significant byte first (little-endian). In addition, the address could be offset by specifying either query or pling after the address and following it with the offset:
> !W% = &12345678 : REM ampersand (&) specifies hexadecimal > PRINT ~?W%, ~W%?3 : REM tilde (~) prints in hexadecimal 78 12Strings of text could be PEEKed and POKEd in a similar way using the Dollar sign ($). The end of the string is marked with the Carriage return character (&0D in ASCII); when read back, this terminating character is not returned. Offsets cannot be used with the dollar sign.
> DIM S% 20 : REM reserve 20 bytes of memory pointed TO by S% > $S% = "MINCE PIES" : REM store STRING 'MINCE PIES', terminated by &0D > PRINT $(S% + 6) : REM retrieve STRING, termined by &0D started at S% + 6 bytes PIESRead more about this topic: PEEK And POKE
Famous quotes containing the words peek, poke, bbc and/or basic:
“Ive stayed in the front yard all my life.
I want a peek at the back
Where its rough and untended and hungry weed grows.
A girl gets sick of a rose.”
—Gwendolyn Brooks (b. 1917)
“I drink the five oclock martinis
and poke at this dry page like a rough
goat. Fool! I fumble my lost childhood
for a mother and lounge in sad stuff
with love to catch and catch as catch can.”
—Anne Sexton (19281974)
“To err is human, but to really foul things up requires a computer.”
—Anonymous. quoted in Quote Unquote, Feb. 22, 1982, BBC Radio 4.
“Our basic ideas about how to parent are encrusted with deeply felt emotions and many myths. One of the myths of parenting is that it is always fun and games, joy and delight. Everyone who has been a parent will testify that it is also anxiety, strife, frustration, and even hostility. Thus most major parenting- education formats deal with parental emotions and attitudes and, to a greater or lesser extent, advocate that the emotional component is more important than the knowledge.”
—Bettye M. Caldwell (20th century)