i have recently heard about these 2, i know what they do, but i don't know how to use them properly, and manuals don't seem to have info on them, so could anyone here tell me?


Re: peek & poke

jackduffybailey ... PEEK is a Function in GW-BASIC. POKE is a Statement in GW-BASIC. Neither PEEK nor POKE do anything in True BASIC. To learn anything about PEEK or POKE, Google these search terms. GW-BASIC, frequently referred to as "gee-whiz BASIC" is Microsoft BASIC, and is interpreted, and is not compiled. It can be Googled also. Regards ... Tom M

o rly?

that is odd because i saw it online(maybe i misread it) and because i don't get an error message when i try to do that, tbasic just crashes with a "True Basic has stopped working" message

and are there any commands that are like this in TB?



In the DOS version of TrueBASIC both PEEK and POKE are valid functions. PEEK allows you to inspect the value of the memory address specified in PEEK. POKE allowed you to specify a memory address to insert a value at that address.

PEEK and POKE are no long valid in the Windows version of TrueBASIC.

Big John

ok, thanks both, i already

ok, thanks both, i already knew what they do, i was just wondering about validity

an btw, any way to do this, even without those specific functions, synonyms, work arounds, ect.?

Re: peeking and poking in True BASIC

jackduffybailey ... Yes, one can manipulate bytes of memory. Back in 2006, I spent four months finding and fixing problems in a software package used for wavelet analysis. It was a very complicated process. Regards ... Tom M


cool, can i has methods? if it is really big, then i can always make it into a library, i would love to learn this, if possible

Peek and Poke

These functions were OK in the days of DOS because DOS was loaded into a specific area of memory, but Windows doesn't work that way. Changing the values in memory locations is a risky business. TB for windows doesn't have a function that tells you the address of any program variables - this is the whole point of higher level languages. Lower level languages such as C or C++ can tell you the address of any variable. TB takes the view that it doesn't tell you what you don't need to know.

Big John


Big John ... I totally agree with you. Regards ... Tom M


k, just curious about these



If you want to explore the PEEK and POKE functions, you can do this by first writing a program in TB for DOS, and then CHAINING to this DOS program from a normal TB for windows program.

You need to be very careful when using POKE in these circumstances because you will be changing the value in certain memory locations and this could upset your computer and you could have your computer do things that may be unexpected and catastrophic. You need to know what each memory location does and why it contains its current value.

You can use PEEK freely because it only looks into memory locations and tells you what is there.

In the days of DOS, the operating system was installed in specific memory locations. As a result you could POKE certain memory locations to achieve specific effects. Windows doesn't work this way.

Big John


jackduffybailey ... You could use PEEK and/or POKE as a numeric variable name in True BASIC, but that's all. If you are trying to convert a Microsoft BASIC program listing, using the BASIC to TrueBASIC converter utility program, you might encounter something if PEEK or POKE is in the Microsoft BASIC program listing. I have never tried to convert a BASIC program with PEEK or POKE in it. Regards ... Tom M