ARM Technical Support Knowledge Articles | |
Applies to: C251 C Compiler
Information in this article applies to:
How do I create ECODE tables in assembly and access them from C?
The following assembly code defines a table named tab in ECODE (or far const) memory:
?HC?T_ASM SEGMENT HCONST RSEG ?HC?T_ASM tab: DB 001H DB 002H DB 003H DB 004H DB 005H PUBLIC tab
The following C code will read the contents of this table:
extern unsigned char const far tab []; void main (void) { unsigned char tab_copy [5]; unsigned char i; for (i = 0; i < 5; i++) tab_copy [i] = tab [i]; while (1); }
Article last edited on: 2001-01-11 00:00:00
Did you find this article helpful? Yes No
How can we improve this article?