PeekBankByte
ByteValue = PeekBankByte(BankNumber, AddressOffset)
 
Parameters:

    BankNumber = The Index Identifier of the bank that you wish to peek
    AddressOffset = The Address you want to read this data from within the bank
Returns:

    ByteValue = The BYTE value that was read from this bank
 

     PeekBankByte will peek (read) a 8bit integer value from a memory bank.



FACTS:


      * Byte values can only represent a numeric range from 0 to 255
      * Byte values are NOT signed.
      * Bytes contain 8 Bits.
      * Two Bytes are the same width as a 16bit Word.
      * Four Bytes are the same width as a 32bit Integer.




Mini Tutorial:


      This simple example Create a bank, pokes some Byte values into and then peek and display them.

  
  
; Create Memory Bank #1 and make it 1000 bytes in size
  CreateBank 1,1000
  
  
; Store some 8bit Byte values into the bank
;===========================================
  
; Poke the integer value 255 into memory bank 1 at
; address offset 500
  
  PokeBankByte 1500255
  
; Poke next BYTE value 23799 at 501. So it doesn't overwrite
; the previous poke.
  
  PokeBankByte 150179
  
  
; Read and Display the previously poked values again.
  Print "Your Byte Value:"+Str$(PeekBankByte(1,500))
  
; Read and Display the previously poke value again.
  Print "Your Byte Value:"+Str$(PeekBankByte(1,501))
  
  
; Display the Screen and wait for the user to press a key
  Sync
  WaitKey
  
  



This example would output.

  
  Your Byte Value: 255
  Your Byte Value: 79
  

 
Related Info: CreateBank | NewBank | PeekBankFloat | PeekBankInt | PeekBankString | PeekBankWord | PokeBankByte | PokeBankFloat | PokeBankInt | PokeBankString | PokeBankWord :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com