ARM GAS  array-str1.s 			page 1


   1              	/* --------------------------------------------------
   2              	   Define required labels for EGTAPI
   3              	   -------------------------------------------------- */
   4              	        .global main, Stop, CodeEnd
   5              		.global DataStart, DataEnd
   6              	
   7              		.global i1, i2, s1, s2, b1, b2	
   8              	
   9              	/* -------------------------------------------------------
  10              	   Store 222 into A[3] (byte), B[3] (short) and C[3] (int)
  11              	   ------------------------------------------------------- */
  12              		.text
  13              	main:
  14              	// ============================================================ A[3]
  15 0000 2C10A0E3 		mov	r1, #44		// Value to be stored
  16              	
  17              	
  18 0004 000000E3 		movw	r0, #:lower16:A
  19 0008 000040E3 		movt	r0, #:upper16:A		// r0 = base address of array A
  20              	
  21              						// Address of A[3] = base addr + 3*1
  22 000c 0310C0E5 		strb    r1, [r0, #3]		// Store r1 into A[3] (byte)
  23              	
  24              	// ============================================================ B[3]
  25 0010 000000E3 	        movw    r0, #:lower16:B
  26 0014 000040E3 	        movt    r0, #:upper16:B         // r0 = base address of array B
  27              	
  28              	                                        // Address of B[3] = base addr + 3*2
  29 0018 B610C0E1 	        strh    r1, [r0, #6]            // Store r1 into B[3] (short)
  30              	
  31              	// ============================================================ C[3]
  32 001c 000000E3 	        movw    r0, #:lower16:C
  33 0020 000040E3 	        movt    r0, #:upper16:C         // r0 = base address of array C
  34              	
  35              	                                        // Address of C[3] = base addr + 3*4
  36 0024 0C1080E5 	        str     r1, [r0, #12]           // Store r1 into C[3] (int)
  37              	
  38              	Stop:
  39              	CodeEnd:
  40 0028 0000A0E1 	    	nop
  41              	
  42              	/* --------------------------------------------------
  43              	   Begin of the permanent program variables
  44              	   -------------------------------------------------- */
  45              		.data
  46              	DataStart:
  47              	
  48 0000 0B0C0D0E 	A:	.byte   11, 12, 13, 14, 15     // byte typed initialzied array A 
  48      0F
  49              	
  50 0005 00       		.align 1
  51 0006 6F007000 	B:	.2byte  111, 112, 113, 114, 115 // short typed initialzied array B 
  51      71007200 
  51      7300
  52              	
  53              		.align 2
  54 0010 57040000 	C:	.4byte  1111, 1112, 1113, 1114, 1115 // int typed initialzied array C 
ARM GAS  array-str1.s 			page 2


  54      58040000 
  54      59040000 
  54      5A040000 
  54      5B040000 
  55              	
  56              	
  57              	DataEnd:
  58              	
  59              		.end
ARM GAS  array-str1.s 			page 3


DEFINED SYMBOLS
        array-str1.s:13     .text:0000000000000000 main
        array-str1.s:38     .text:0000000000000028 Stop
        array-str1.s:39     .text:0000000000000028 CodeEnd
        array-str1.s:46     .data:0000000000000000 DataStart
        array-str1.s:57     .data:0000000000000024 DataEnd
        array-str1.s:15     .text:0000000000000000 $a
        array-str1.s:48     .data:0000000000000000 A
        array-str1.s:51     .data:0000000000000006 B
        array-str1.s:54     .data:0000000000000010 C
        array-str1.s:50     .data:0000000000000005 $d

UNDEFINED SYMBOLS
i1
i2
s1
s2
b1
b2
