logoalt Hacker News

Yoricyesterday at 6:05 PM2 repliesview on HN

I remember the words "peeking" and "poking", but this may have been specific to basic.


Replies

zabzonkyesterday at 7:28 PM

Yes, most Basics had peek and poke commands with which you could read and write specific memory locations. For example - parentheses may or may net be needed, depending on the Basic implementation:

    X = PEEK( 123 )
would read the byte at memory location 123 and store its value in X. Then

   POKE( 123, 42 )
would change the byte at 123 to be 42.

But these didn't normally have so much to do with patching executables to add/change functionality.

show 1 reply
ale42yesterday at 8:33 PM

I remember looking into BASIC sources to figure out how they did some things I had no idea how to do with BASIC... and finding POKE statements with weird numbers, it was looking a bit like magic... (I was probably 10 or so, though)