CT_POKEWORD

 POKEWORD()
 Writes a 16-bit word to memory
------------------------------------------------------------------------------
 Syntax

     POKEWORD(<nSegment|cHexSegment>,<nOffset|cHexOffset>,
        <nWord|cHexWord>) --> lSuccessful

 Arguments

     <nSegment|cHex>  Designates the segment address where a word 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 65534 ("FFFE").

     <nWord|cHexWord>  Designates the word to be stored in memory.  This
     value can be a decimal integer or  hexadecimal string.  The maximum is
     65535 ("FFFF").

 Returns

     POKEWORD() returns .T. when the operation is successfully completed.  A
     return value of .F. indicates an error.

 Description

     POKEWORD() writes a word to a desired memory area within the
     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 POKEWORD() ONLY when you have a thorough knowledge of
     the system environment and there is no other solution than to directly
     alter a memory location.

 Notes

     .  The function does not test whether the word is stored in
        memory.

     .  POKEWORD() stores the <nWord|cHexWord> word in memory in the
        low-byte/high-byte sequence.

 Examples

     .  Poke a word using decimal parameters:

        ? POKEWORD(32768, 1000, 65535)          // Can be dangerous!

     .  Poke a word using hexadecimal parameters:

        ? POKEWORD("F000", "8000", "FFFF")      // Impossible, ROM area

See Also: PEEKWORD() POKEBYTE()



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.