Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Assembly Language - <b>ptr change type of variable masm operator</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
PTR              Change Type of Variable                        MASM Operator

  type PTR expression

    Temporarily changes the type of the expression (which can be a label
    or variable) from its default to type.

    The type parameter can be one of the following values or names:

                    Name           Value
                    BYTE           1
                    WORD           2
                    DWORD          4
                    QWORD          8
                    TBYTE          10
                    NEAR           0FFFFh
                    FAR            0FFFEh

    BYTE, WORD, and DWORD can only be used with memory operands.  NEAR and
    FAR can only be used with labels.

       Notes:     PTR is generally used to access a variable in a way
                  differently than the way it is defined, for example, to
                  access the high-order byte of a word variable.  Also PTR
                  is used to explicitly define the type of a variable or
                  label which is a forward reference.

  -------------------------------- Example ---------------------------------

           MOV       AL, BYTE PTR WORDVAR
           CALL      FAR PTR ROUTINE

See Also: BYTE WORD DWORD QWORD TBYTE NEAR FAR

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson