Madhur's link pretty much covers it, have you read this?
if you already understand a 2d array at the C programming level, for example, assembler is the next logical step.
8- , , z [1] [2] , , , C- z , , 13 , so & z + (13 * 1) +2 = & z + 15;
, x86 ( , ).
;brute force
ldr r0,=z ;load address of z into r0
mov r1,#13
mul r1,#1 ;make this a register or load from a memory location
mov r2,#2 ;make this a register or load from a memory location
add r0,r1
add r0,r2
ldrb r1,[r0] ;read the byte
strb r3,[r0] ;write the byte
;if your instruction set allows register offset
ldr r0,=z ;load address of z into r0
mov r1,#13
mul r1,#1
mov r2,#2
add r1,r2
ldrb r4,[r0,r1] ;read the byte
strb r3,[r0,r1] ;write the byte
;or immediate offset and offset is hardcoded
ldr r0,=z ;load address of z into r0
mov r1,#13
mul r1,#1
add r0,r1
ldrb r4,[r1,#2] ;read the byte
strb r3,[r1,#2] ;write the byte
C
unsigned char x[4][16];
unsigned char z[4][16];
unsigned int ra,rb;
for(ra=0;ra<4;ra++)
{
for(rb=0;rb<16;rb++)
{
x[ra][rb]=z[ra][rb];
}
}
.
ldr r0,=x
ldr r1,=z
mov r2,#0 ;ra
outer:
mov r3,#0 ;rb
inner:
mov r4,r2 lsl #2 ;16 bytes wide
add r4,r3
ldrb r5,[r1,r4]
strb r5,[r0,r4]
add r3,r3,#1
cmp r3,#16
bne inner
add r2,r2,#1
cmp r2,#4
bne outer
, - + ( ) + ( ). , , , , , , , / # 2 , , 2. .., , , , , , , , , .
, [r0, r1], , , , . (* ptr ++), , , [r0], # 16 r0, r0 16 r0, ... , x86 , , .
, x86, , , , , , , ( , x86 ) .