[<<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
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson