# Command: PeekByte

PeekByte bank,offset Definition:

Reads a byte from a memory bank.

Parameter Description:

bank = variable containing handle to valid bank offset = offset in bytes to read the value

Command Description:

This command reads a byte type value from a memory bank created with the CreateBank command. Also see PokeInt, PokeFloat, PokeByte, and PokeShort. To retrieve from a memory bank, use PeekInt, PeekFloat, and PeekShort.

Example:

; Bank Commands Example bnkTest=CreateBank(500) For t = 1 To 50 PokeByte bnkTest,t,Rnd(255) PokeInt bnkTest,t+1,Rnd(10000) PokeShort bnkTest,t+2,Rnd(10000) PokeFloat bnkTest,t+3,Rnd(-.999,.999) Next For t = 1 To 50 Print PeekByte (bnkTest,t) Print PeekInt (bnkTest,t+1) Print PeekShort (bnkTest,t+2) Print PeekFloat (bnkTest,t+3) Next Freebank bnkTest

Index