[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 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()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson