The PTR operator specifies a type for a memory
address. The type may be one of the following:
Type
Description
BIT
Specifies the operand addresses a BIT.
BYTE
Specifies the operand addresses a BYTE.
FAR
Specifies the operand address is a FAR
address.
NEAR
Specifies the operand address is a NEAR
address.
WORD
Specifies the operand addresses a WORD.
The operand may be any address expression representing a
data variable or a code label. The PTR operator may be used to
override the default type of the operand.
Note
When specifying pointer overrides, the PTR keyword is
optional and may be omitted.
The PTR operator may not be used on section and group
names or external constants (ie. extern DATAn:name).
The BIT PTR type may be applied only on bits—it is not possible
to change the access type from some other type to a BIT type.
Example
D100 SECTION DATA
V1 DSW 1
V2 DSW 1
B1 DSB 1
B2 DSB 1
D100 ENDS
EXTRN XPROC:NEAR
C100 SECTION CODE
CALL FAR PTR XPROC ; override type near by far
MOV RL0,BYTE PTR V2
MOV R15,WORD B1
MOV [R1],200 ; type of move unsure
MOV [R1],BYTE 200 ; byte move
MOV [R1],WORD 200 ; word move
C100 ENDS
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.