CT_POKEBYTE

 POKEBYTE()
 Writes a byte to memory
------------------------------------------------------------------------------
 Syntax

     POKEBYTE(<nSegment|cHexSegment>,<nOffset|cHexOffset>,
         <nByte|cHexByte>) --> lSuccessful

 Arguments

     <nSegment|cHexSegment>  Designates the segment address in which a
     byte is stored.  This value can be a decimal integer or hexadecimal
     string.  The maximum is 65520 ("FFF0").

     <nOffset|cHexOffset>  Designates the offset address within the
     segment specified by <nSegment|cHexSegment>.  This value can be a
     decimal integer or hexadecimal string.  The maximum is 65535 ("FFFF").

     <nByte|cHexByte>  Designates the byte to store in memory.  This
     value can be a decimal integer or hexadecimal string.  The maximum is
     255 ("FF").

 Returns

     POKEBYTE() returns .T., if the operation is successfully completed.  A
     return value of .F. indicates a parameter error.

 Description

     POKEBYTE() writes a byte to a desired memory area within conventional
     memory.  The segment address and offset are required.

     Warning!  Be aware that this is not always safe.  If you
     inadvertently manipulate the wrong memory location, there may be serious
     consequences.  Use POKEBYTE() ONLY when you have a thorough knowledge of
     the system environment and there is no other solution than to directly
     alter a memory location.

 Note

     .  The function does not check if you can store the byte in
        memory.

 Examples

     .  Poke a byte using decimal parameters:

        ? POKEBYTE(32768, 1000, 65)           // Can be dangerous!

     .  Poke a byte using hexadecimal parameters:

        ? POKEBYTE("F000", "8000", "41")      // Impossible, ROM area

See Also: PEEKBYTE() POKEWORD()



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.