Keil™, An ARM® Company

Technical Support

A51: USING 'AT' RELOCATION TYPE WITH SEGMENT DIRECTIVE


Information in this article applies to:

  • C51 Version 5.50

SYMPTOMS

I am trying to use the 'AT' relocation type with the SEGMENT directive. I have followed the example on page 53 of the A51 Assembler/A251 Assembler User's Guide (07.98) which shows:

MYSEG   SEGMENT   CODE AT 0FF2000H

When assembling my code I get a syntax error on the word 'AT'. Why do I get an error?

CAUSE

The AT relocation type is only supported in the A251 assembler, and this is indicated with the annotation on page 51 of the A51 Assembler/A251 Assembler User's Guide.

RESOLUTION

An absolute code segment is declared using something like:

CSEG AT 300H

The segment declaration should be changed to:

MYSEG   SEGMENT   CODE

When your code is assembled and linked the segment name will not appear in the .m51 file. This is because with the A51 assembler the segment names are only used for relocatable segments.

A similar method is employed for BIT, DATA, IDATA and XDATA absolute segments by using the BSEG, DSEG, ISEG and XSEG directives respectively.

MORE INFORMATION

Refer to page 54 in the A51 Assembler/A251 Assembler User's Guide (07.98) for information on the BSEG, CSEG, DSEG, ISEG and XSEG directives.

Last Reviewed: Tuesday, July 19, 2005


Did this article provide the answer you needed?
 
Yes
No
Not Sure