Action
Returns a byte stored
in code memory.
Syntax
var = CPEEK( address )
Remarks
var Numeric variable that
is assigned with the content of the program memory at address
address Numeric variable or constant with the address location
There is no CPOKE statement because you can not write into program memory.
See also
PEEK , POKE , INP , OUT
Example
'-----------------------------------------------------
' (c) 1998 MCS Electronics
' PEEK.BAS
' demonstrates PEEk, POKE, CPEEK, INP and OUT
'
'-----------------------------------------------------
Dim I As Integer
, B1 As Byte
'dump
internal memory
For I = 0 To
127 'for a 8052 225 could be used
' Break
B1 = Peek(i) 'get byte
from internal memory
Printhex B1 ; " ";
'Poke I , 1 'write
a value into memory
Next
Print 'new line
'be careful when writing into internal memory !!
|