Keil Logo

POF Assembler Operator

Arguments
POF operand


Description

The POF (Page Offset) operator returns the 14-bit page offset of operand from the base address of the 16K page in which it is defined. POF may not be applied to group names.

The operand must be the name of a variable, section, special function register (SFR), or register bank. If POF is used on system names (SFRs), the result is the absolute page offset relative to page 3.

Note

  • The POF operator is implied when memory accesses to data variables are used in instructions since data is always located in 16K pages.
See Also

BOF, PAG, SOF

Example
                  1    D100    SECTION DATA
0000              2      V1    DSW     20
0028 0000 R       3      V2    DW      POF V1          ; page offset of V1
002A 0000 R       4      V3    DW      PAG V1          ; page number of V1
                  5    D100    ENDS
                  6
                  7    DSTP7   EQU     0FDFEh
                  8
                  9    C100    SECTION CODE
                 10    P100    PROC    NEAR
0000 E6F80000 R  11            MOV     R8,#POF V1
0004 E6F92800 R  12            MOV     R9,#POF V2
0008 E6F70C3F    13            MOV     R7,#POF SYSCON  ; system name
000C E6F60000 R  14            MOV     R6,#POF C100    ; segment to page conv
0010 E6F5FE3D    15            MOV     R5,#POF DSTP7   ; result is 3DFEh
                 16    P100    ENDP
                 17    C100    ENDS
                 18            END
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.